Instability of a function Band_DFT_NonCol in the case of GCC |
- Date: 2021/08/02 20:56
- Name: Naoya Yamaguchi
- Dear all,
I often encountered several noncollinear calculation cases with segmentation faults in Ver. 3.9.2 in using GCC, and I was able to avoid them by suppressing the optimization level for a function `Band_DFT_NonCol`.
The way is wrapping the function with pragma statements, as you may know. #pragma GCC optimize("O2") double Band_DFT_NonCol( ... #pragma GCC reset_options
My makefile included the following: CC = mpicc -Dkcomp -O3 -ffast-math -march=znver2 -mfma -fomit-frame-pointer -fopenmp -I${MKLROOT}/include/fftw FC = mpif90 -Dkcomp -O3 -ffast-math -march=znver2 -mfma -fomit-frame-pointer -fopenmp LIB= -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgfortran -lpthread
You can see my modification in https://gist.github.com/Ncmexp2717/6355db544fecd711725fa5958b2959cf The above also includes some treatment to avoid issues reported in the following. http://www.openmx-square.org/forum/patio.cgi?mode=view&no=2728 http://www.openmx-square.org/forum/patio.cgi?mode=view&no=2747
Note: pragma statements of the Intel style (#pragma optimization_level 1) doesn't seem to work properly with GCC.
Regards, Naoya Yamaguchi
| |