Page 1 of 1

segmentation fault occurred with tutorial input file

Posted: Wed Jul 09, 2014 12:35 am
by khoa
Hello,
I got the segmentation fault message while I was doing the tutorial with input file tbase3_1.in. I hope you can give me some hints to correct it.
Below is the mesage from the log file:
================================================================================

getcut: wavevector= 0.0000 0.0000 0.0000 ngfft= 20 20 20
ecut(hartree)= 8.000 => boxcut(ratio)= 2.18216

ITER STEP NUMBER 1
vtorho : nnsclo_now= 2, note that nnsclo,dbl_nnsclo,istep= 0 0 1
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
libirc.so 00007FE99CF9D2C9 Unknown Unknown Unknown
libirc.so 00007FE99CF9BB9E Unknown Unknown Unknown
libifcore.so.5 00007FE99E67AF3F Unknown Unknown Unknown
libifcore.so.5 00007FE99E5E2D7F Unknown Unknown Unknown
libifcore.so.5 00007FE99E5F3F43 Unknown Unknown Unknown
libpthread.so.0 00007FE99CD83BB0 Unknown Unknown Unknown
libatlas.so.3 00007FE99F6EB450 Unknown Unknown Unknown

Re: segmentation fault occurred with tutorial input file

Posted: Thu Jul 10, 2014 7:24 pm
by Jordan
Hi,

Do you have the log file (standard output)?
Can you provide the configure file (.ac) used to configure and compile abinit ?
What is the OS/distribution you are using ?

The more information we have, the better.

Cheers,

Jordan

Re: segmentation fault occurred with tutorial input file

Posted: Sat Jul 12, 2014 4:39 am
by khoa
Thanks for your help. Below is my config file
prefix="/home/khoa/abinit_781"
enable_mpi="yes"
enable_mpi_io="yes"
with_mpi_prefix="/usr/local"
with_netcdf_incs="-I/usr/include"
with_netcdf_libs="-L/usr/lib -lnetcdf -lnetcdff"
with_fft_flavor="fftw3"
with_fft_incs="-I/usr/include/"
with_fft_libs="-L/usr/lib/x86_64-linux-gnu/ -lfftw3 -lfftw3f"
#with_trio_flavor="netcdf+etsf_io"
#with_etsf_io_incs="-I/usr/include"
#with_etsf_io_libs="-L/usr/lib -letsf_io_low_level -letsf_io_utils -letsf_io"
with_linalg_flavor="atlas"
with_linalg_libs="-L/usr/lib -llapack -lf77blas -lcblas -latlas"
#with_dft_flavor="atompaw+libxc"
with_dft_flavor="atompaw+bigdft+libxc+wannier90"
enable_gw_dpc="yes"
#enable_maintainer_checks="no"
#enable_test_timeout="yes"
#enable_gui_build="no"
Intel Compiler and Openmpi were used on Linux Ubuntu 13.10 64bit
Also, attached is the log file.

Re: segmentation fault occurred with tutorial input file

Posted: Sat Jul 12, 2014 3:28 pm
by khoa
Attached is the config.log for your convenience. Thanks.

Re: segmentation fault occurred with tutorial input file

Posted: Sat Jul 12, 2014 8:36 pm
by Jordan
Here is my suggestion.

A few weeks ago I encoutered the same problem and solved it as explained now.
1) You are using the intel compiler which includes the MKL library optimized for intel cpu therefore you should use it.
2) I think the seg fault occures because of the fftw3 that uses the libfftw3 instead of the fftw3 in the MKL (don't ask me why).
I could get the libfftw3 working with intel compiler only if I configure and compile first with MKL as linalg and FFT and then reconfigure with the MKL and remaking what has changed (not much). (Or something like this I don't remerber the sequence, it's a bit confusing sorry)

Anyway, my suggestion is configure with

Code: Select all

with_linalg_flavor="mkl"
with_linalg_incs="with_linalg_incs="-I${MKLROOT}/include/"
with_linalg_libs="-L${MKLROOT}/lib/intel64/ -lmkl_blas95_lp64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm"
with_fft_flavor="fftw3"
with_fft_libs="-L${MKLROOT}/lib/intel64/ -Wl,--start-group -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -Wl,--end-group"


You may need to change the incs and libs options according to your installation but those are what I use on Ubuntu 13.10 with the intel14 compiler, like you.

This should result in a more efficient and faster executable than the one you got.
Tell me if it solves the problem.

Cheers,

Jordan

Re: segmentation fault occurred with tutorial input file

Posted: Sun Jul 13, 2014 1:58 am
by khoa
Problem solved!!!
Thanks for your help, Jordan.

Cheers,
Khoa

Re: segmentation fault occurred with tutorial input file

Posted: Tue Aug 26, 2014 11:49 am
by pouillon
There is a namespace conflict between FFTW3 and MKL. The latter is using identical routine names than the former but with a different way of handling the parameters. This means that you cannot mix FFTW3 and MKL.

This will be fixed in the build system of Abinit 8.