Error when enabling OpenMP

Hello all,

I am new using Abinit and OpenMP.
I got the below error message while compiling Abinit 9.6.2:


 ==============================================================================
 === Linear algebra support                                                 ===
 ==============================================================================

checking for the requested linear algebra flavor... openblas
checking for the serial linear algebra detection sequence... openblas netlib
checking how to detect linear algebra libraries... verify
checking for BLAS support in the specified libraries... no
checking for AXPBY support in the BLAS libraries... no
checking for GEMM3M in the BLAS libraries... no
checking for GEMMT in the BLAS libraries... no
checking for mkl_imatcopy in the specified libraries... no
checking for mkl_omatcopy in the specified libraries... no
checking for mkl_omatadd in the specified libraries... no
checking for mkl_set/get_threads in the specified libraries... no
checking how linear algebra parameters have been set... dir (flavor: kwd)
checking for the actual linear algebra flavor... openblas
checking for linear algebra C preprocessing flags...  -I/usr/local/include
checking for linear algebra C flags... none
checking for linear algebra C++ flags... none
checking for linear algebra Fortran flags...  -I/usr/local/include
checking for linear algebra linker flags... none
checking for linear algebra library flags... -L/usr/local/lib 
configure: WARNING: linear algebra does not work

 ==============================================================================
 === Optimized FFT support                                                  ===
 ==============================================================================

checking which FFT flavors to enable... fftw3-threads fftw3 goedecker
configure: WARNING: MKL is incompatible with FFTW3

                    Please use DFTI instead and consult
                    https://software.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-fortran/top/fourier-transform-functions.html

                    If you set the FFT flavor to fftw3, the configure script
                    will abort. Otherwise, your FFTW3 settings will be ignored.


checking for FFT flavor... fftw3-threads
checking for FFT C preprocessing flags... 
checking for FFT C flags... 
checking for FFT Fortran flags... 
checking for FFT linker flags... 
checking for FFT library flags... 
checking for the FFT flavor to try... fftw3-threads
checking whether to enable FFTW3... yes
checking how FFTW3 parameters have been set... env
checking for FFTW3 C preprocessing flags... -I/root/local/include -I/usr/lib/gcc/x86_64-linux-gnu/7/include
checking for FFTW3 C flags... none
checking for FFTW3 Fortran flags... -L/root/local/include
checking for FFTW3 linker flags... none
checking for FFTW3 library flags... -L/root/local/lib -lfftw3f_threads -lfftw3_threads -lm
checking whether the FFTW3 library works... no
configure: error: in `/root/local/src/abinit-9.6.2/build_gpu':
configure: error: invalid FFTW3 configuration
See `config.log' for more details

I attached my configure file and config.log
config.log (140.9 KB)
configure_gpu.ac9 (2.3 KB)

I am not sure of what is wrong. Can someone help me by giving some comments.

Thanks in advance
Francis

Hello world,

I believe that I solved the FFTW-related issue, modifying the attached configure_gpu.ac9 as follows:

#----------------------------------------------------------------------------#
## MPI/OpenMP
#---------------------------------------------------------------------------#
# Tell Abinit buildsys that we want to activate Openmp (necessary condition but not sufficient)
with_mpi="no"
enable_mpi_io="no"
enable_openmp="yes"
FCFLAGS_OPENMP="-fopenmp"
.
.
.
# Explicit options for fftw3
with_fft_flavor="fftw3-threads"
FFTW3_LIBS="-L$HOME/local/lib -lfftw3f -lfftw3 -lfftw3f_threads -lfftw3_threads -lfftw3f_omp -lfftw3_omp"
FFTW3_FCFLAGS="-L$HOME/local/include"
FFTW3_CPPFLAGS="-I$HOME/local/include -I/usr/lib/gcc/x86_64-linux-gnu/7/include"
.
.
.

However, after running …/configure, this message pops up:

==============================================================================
 === Linear algebra support                                                 ===
 ==============================================================================

checking for the requested linear algebra flavor... openblas
checking for the serial linear algebra detection sequence... openblas netlib
checking how to detect linear algebra libraries... verify
checking for BLAS support in the specified libraries... no
checking for AXPBY support in the BLAS libraries... no
checking for GEMM3M in the BLAS libraries... no
checking for GEMMT in the BLAS libraries... no
checking for mkl_imatcopy in the specified libraries... no
checking for mkl_omatcopy in the specified libraries... no
checking for mkl_omatadd in the specified libraries... no
checking for mkl_set/get_threads in the specified libraries... no
checking how linear algebra parameters have been set... dir (flavor: kwd)
checking for the actual linear algebra flavor... openblas
checking for linear algebra C preprocessing flags...  -I/usr/local/include
checking for linear algebra C flags... none
checking for linear algebra C++ flags... none
checking for linear algebra Fortran flags...  -I/usr/local/include
checking for linear algebra linker flags... none
checking for linear algebra library flags... -L/usr/local/lib 
configure: WARNING: linear algebra does not work

This is my first time trying to compile threaded libraries, so any help regarding the specific error or even just resources for me to understand the terminal commands and compiling in general would be much appreciated! I really want to learn this stuff, but I can’t even figure out HOW to learn it effectively! Thanks in advance!

Hi,

in the ac9 file, I see perhaps inconsistencies:

with_linalg="/usr/local"
with_linalg_flavor="openblas"
LINALG_CPPFLAGS="-I/usr/local/include"
...
LINALG_LIBS="-L$HOME/local/lib -lopenblas_openmp"

if you use with_linalg_flavor, you should not use with_linalg.

and why not use $HOME for LINALG_CPPFLAGS :

LINALG_CPPFLAGS="-I$HOME/local/include"

PS : perhaps needs to add in the ac9 file to active OpenMP:

FCFLAGS_EXTRA="-fopenmp"
FC_LDFLAGS_EXTRA="-fopenmp"

my 5¢

jmb