Identify what's causing segmentation fault in Yambo: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 24: | Line 24: | ||
## for intel fortran <code>./configure FCFLAGS="-O1 -g -CB -CA -debug" UFLAGS="-O0 -g -CB -CA -debug" FFLAGS="-O1 -g -CB -CA -debug" --enable-keep-src"</code> | ## for intel fortran <code>./configure FCFLAGS="-O1 -g -CB -CA -debug" UFLAGS="-O0 -g -CB -CA -debug" FFLAGS="-O1 -g -CB -CA -debug" --enable-keep-src"</code> | ||
# '''Use a debugger''': Compile with debugging options, "-O1 -g" for gfortran "-O1 -g -debug for ifortran, plus the <code>--enable-keep-src</code> flag, then execute your job in a debugger for example <code>gdb --args yambo -F yambo_input.in</code>. It can work also in parallel see [https://www.open-mpi.org/faq/?category=debugging here] and [https://stackoverflow.com/questions/329259/how-do-i-debug-an-mpi-program here] | # '''Use a debugger''': Compile with debugging options, "-O1 -g" for gfortran "-O1 -g -debug for ifortran, plus the <code>--enable-keep-src</code> flag, then execute your job in a debugger for example <code>gdb --args yambo -F yambo_input.in</code>. It can work also in parallel see [https://www.open-mpi.org/faq/?category=debugging here] and [https://stackoverflow.com/questions/329259/how-do-i-debug-an-mpi-program here] | ||
# "Memory leaks": [only for experts] compile Yambo with debugging option then run your job with valgrind: <code>valgrind --tool=memcheck --leak-check=summary ./yambo</code> |
Revision as of 17:53, 10 January 2021
There may be different reasons why the Yambo code generates segmentation faults in a run.
To help Yambo developers understand where the problem lies and help you, please follow the steps below.
If one of the step solves your problem and please report the result in the forum.
Rule out possible causes of the segmentation fault:
- GPU: are you running Yambo with GPU support? In this case try to recompile without
--enable-cuda
flag. If this solve the problem report your bug in the section Yambo on GPU machines otherwise to the next step. - OPEN-MP: compile and run Yambo without open-mp support, no
--enable-open-mp
flag in compilation andOMP_NUM_THREADS="1"
. - Internal Lapack/Blas: compile Yambo with internal Lapack/Blas libraries
--enable-int-linalg
in the configure. - Internal FFT: compile Yambo with internal FFT libraries
--enable-internal-fftsg
in the configure. - Scalapack: compile without Scalpack, unset the flag
--with-scalapack-libs
if you use it. - Parallelism
- Change the number of processors
- Use automatic parallelization, unset all parallel variable input
- Run in serial
- Optimization: use a lower optimization level for example O1 or O0, by doing
./configure FCFLAGS="-O0" F77FLAGS="-O1"
- Compilers: change C/Fortran compiler if it is possible, for example for intel fortran
./configure FC=ifort F77=ifort CC=icc
or for gfortran./configure FC=gfortran F77=gfortran CC=gcc
Debugging the segmentation fault:
- Checing options: compile Yambo with the compiler checking options and run again your simulation, report the result in the forum:
- for g-fortran compiler
./configure FCFLAGS="-O1 -g -fcheck=all" UFLAGS="-O0 -g -fcheck=all" FFLAGS="-O1 -g -fcheck=all" --enable-keep-src"
- for intel fortran
./configure FCFLAGS="-O1 -g -CB -CA -debug" UFLAGS="-O0 -g -CB -CA -debug" FFLAGS="-O1 -g -CB -CA -debug" --enable-keep-src"
- for g-fortran compiler
- Use a debugger: Compile with debugging options, "-O1 -g" for gfortran "-O1 -g -debug for ifortran, plus the
--enable-keep-src
flag, then execute your job in a debugger for examplegdb --args yambo -F yambo_input.in
. It can work also in parallel see here and here - "Memory leaks": [only for experts] compile Yambo with debugging option then run your job with valgrind:
valgrind --tool=memcheck --leak-check=summary ./yambo