I am encountering a persistent error when compiling Gulp with fftw3. Without the -f flag in the mkgulp command, it compiles without error. I have tried two different fftw3 modules that should work with my other loaded modules.
Modules used: gcc/9.3.0 openmpi/4.1.1 netlib-scalapack/2.1.0-openblas (I use this just for scalapack, despite the name) gsl/2.7 openblas/0.3.19 fftw/3.3.9
I’ve modified the mkgulp file successfully to account for non-standard locations of the other modules, and as I said above they work fine. However, when I try to compile with fftw, I get the following error:
…/m_fft3D.F90:14: Error: Can’t open included file ‘fftw3-mpi.f03’
I can confirm that fftw3-mpi.f03 is in the fftw/include directory, that fftw is in a nonstandard location, and as such I have included the following in the mkgulp script:
if [ "$fftw3" = "" ]
then
echo 'FDEFS=' >> makefile
echo 'FLIBS=' >> makefile
else
echo 'FDEFS=-DFFTW3 ' >> makefile
if [ "$parallel" = "" ]
#--USER--Start
echo 'FLIBS=-I/sw/andes/spack-envs/base/opt/linux-rhel8-x86_64/gcc-9.3.0/fftw-3.3.9-ag7mcof5kg3ttvo3z2azdgx4jkrge2ly/include -L/sw/andes/spack-envs/base/opt/linux-rhel8-x86_64/gcc-9.3.0/fftw-3.3.9-ag7mcof5kg3ttvo3z2azdgx4jkrge2ly/lib -lfftw3.a' >> makefile
#--USER--End
then
#--USER--Start
echo 'FLIBS=-I/sw/andes/spack-envs/base/opt/linux-rhel8-x86_64/gcc-9.3.0/fftw-3.3.9-ag7mcof5kg3ttvo3z2azdgx4jkrge2ly/include -L/sw/andes/spack-envs/base/opt/linux-rhel8-x86_64/gcc-9.3.0/fftw-3.3.9-ag7mcof5kg3ttvo3z2azdgx4jkrge2ly/lib -lfftw3 -lfftw3_mpi' >> makefile
# The following is for NCI
# echo 'FLIBS=-mkl -lfftw3x_cdft_openmpi_lp64'
#--USER--End
fi
fi
Any help would be greatly appreciated.