Difference between revisions of "Identify what's causing segmentation fault in Yambo"

From The Yambo Project
Jump to navigation Jump to search
Line 23: Line 23:
## for g-fortran compiler <code>./configure FCFLAGS="-O1 -g -fcheck=all" UFLAGS="-O0 -g -fcheck=all" FFLAGS="-O1 -g  -fcheck=all"  --enable-keep-src"</code>
## for g-fortran compiler <code>./configure FCFLAGS="-O1 -g -fcheck=all" UFLAGS="-O0 -g -fcheck=all" FFLAGS="-O1 -g  -fcheck=all"  --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>
## 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>
# Run in a debugger for example <code>gdb --args yambo -F yambo_input.in</code>
# Compile with debugging options the <code>--enable-keep-src</code> flag and execute your run in a debugger for example <code>gdb --args yambo -F yambo_input.in</code>

Revision as of 17:42, 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:

  1. 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.
  2. OPEN-MP: compile and run Yambo without open-mp support, no --enable-open-mp flag in compilation and OMP_NUM_THREADS="1".
  3. Internal Lapack/Blas: compile Yambo with internal Lapack/Blas libraries --enable-int-linalg in the configure.
  4. Internal FFT: compile Yambo with internal FFT libraries --enable-internal-fftsg in the configure.
  5. Scalapack: compile without Scalpack, unset the flag --with-scalapack-libs if you use it.
  6. Parallelism
    1. Change the number of processors
    2. Use automatic parallelization, unset all parallel variable input
    3. Run in serial
  7. Optimization: use a lower optimization level for example O1 or O0, by doing ./configure FCFLAGS="-O0" F77FLAGS="-O1"
  8. 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:

  1. Compile Yambo with checking options and run again your simulation, report the result in the forum:
    1. for g-fortran compiler ./configure FCFLAGS="-O1 -g -fcheck=all" UFLAGS="-O0 -g -fcheck=all" FFLAGS="-O1 -g -fcheck=all" --enable-keep-src"
    2. 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"
  2. Compile with debugging options the --enable-keep-src flag and execute your run in a debugger for example gdb --args yambo -F yambo_input.in