Vasp 6.4.2 build error cannot find -lfftw3_omp

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
jaime_gutierrez
Newbie
Newbie
Posts: 2
Joined: Tue Feb 18, 2025 5:31 pm

Vasp 6.4.2 build error cannot find -lfftw3_omp

#1 Post by jaime_gutierrez » Mon Mar 24, 2025 9:29 pm

Hello,

I'm having trouble building Vasp 6.4.2 as I am receiving the error "/usr/bin/ld: cannot find -lfftw3_omp".
I've loaded the Nvidia HPC SDK module (24.9) as well as fftw3.

I've attached a zip file containing full output as well as the makefile.include which I edited from the template arch/makefile.include.nvhpc_omp_acc from the vasp package.
Any help is greatly appreciated.

Best Regards,
Jaime

You do not have the required permissions to view the files attached to this post.

marie-therese.huebsch
Full Member
Full Member
Posts: 234
Joined: Tue Jan 19, 2021 12:01 am

Re: Vasp 6.4.2 build error cannot find -lfftw3_omp

#2 Post by marie-therese.huebsch » Tue Mar 25, 2025 10:32 am

Hello,

Nvidia HPC SDK brings its own cuFFT library. When I compare your makefile with arch/makefile.include.nvhpc_omp_acc there are changes that probably cause the issue.

Please don't add the line

Code: Select all

OBJECTS     = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o

Please also revert the changes to the precompiler flags and try again. Let me know how it goes!

Best regards,
Marie-Therese


jaime_gutierrez
Newbie
Newbie
Posts: 2
Joined: Tue Feb 18, 2025 5:31 pm

Re: Vasp 6.4.2 build error cannot find -lfftw3_omp

#3 Post by jaime_gutierrez » Wed Mar 26, 2025 5:47 pm

Hello Marie-Therese,

Thank you for your reply. Could you confirm what 'changes to the precompiler flags' you're referring to. I'm thinking perhaps lines for FC and FCL, such as:

Code: Select all

FC          = mpif90 -acc -gpu=cc60,cc70,cc80,cuda11.0 -mp    | FC          = mpif90 -acc -gpu=cc60,cc70,cc80,cuda12.6 -mp
FCL         = mpif90 -acc -gpu=cc60,cc70,cc80,cuda11.0 -mp -c | FCL         = mpif90 -acc -gpu=cc60,cc70,cc80,cuda12.6 -mp -c

The changes I made to these were switching cuda11.0 to cuda12.6.

My initial attempt of the vasp build was picking a template that I believed best matched the HPC cluster. Upon further investigation, it appears that fftw3_omp is not installed or available even after installing the HPC SDK. I could be wrong on the latter, but no matter what options I changed in regards to FFTW, including commenting out the OBJECTS line you mentioned, switching to a nvhpc fft related lib/include paths, I would continue to get different errors around missing items related to fftw.

I decided to switch to a different makefile.include template from arch/makefile.include.nvhpc_omp_acc to arch/makefile.include.nvhpc_acc which resulted in a build completion.

I then ran 'make test' which resulted in what appears to be a successful completion as well, noted below.

Code: Select all

==================================================================
SUCCESS: ALL SELECTED TESTS PASSED
==================================================================
make[1]: Leaving directory '/home/jgutierrez/vasp.6.4.2/testsuite'

I did get a build error with the new makefile from makefile.include.nvhpc_acc when CPP_OPTIONS+= -DVASP_HDF5 was uncommented, so I re-ran it with it commented, which was successful. The output indicated that the hdf5 include directory was being utilized. I'm not sure if having CPP_OPTIONS+= commented is a problem that needs to be addressed or not and I'm unsure if the hdf5 related portion of the vasp build is greatly impacted by the lack of -DVASP_HDF5.

The hdf5 error related to hdf5 CPP_OPTIONS+= was:

Code: Select all

mpif90 -acc -gpu=cc60,cc70,cc80,cuda12.6 -Mfree -Mbackslash -Mlarge_arrays -tp host -fast -I/cm/shared/apps/nvhpc/24.9/Linux_x86_64/24.9/compilers/extras/qd/include/qd -I/cm/shared/apps/fftw/openmpi/gcc/64/3.3.10//include -I/cm/shared/apps/hdf5/1.12.1//include  -c vhdf5_base.f90
NVFORTRAN-F-0004-Corrupt or Old Module file /cm/shared/apps/hdf5/1.12.1//include/hdf5.mod (vhdf5_base.F: 9)
NVFORTRAN/x86-64 Linux 24.9-0: compilation aborted
make[2]: *** [makefile:167: vhdf5_base.o] Error 2
make[2]: Leaving directory '/home/jgutierrez/vasp.test/build/std'
cp: cannot stat 'vasp': No such file or directory
make[1]: *** [makefile:129: all] Error 1
make[1]: Leaving directory '/home/jgutierrez/vasp.test/build/std'
make: *** [makefile:17: std] Error 2

Additionally, I left the new makefile.include template (nvhcp_acc) with the OBJECTS line uncommented as it was originally. Would that be a problem even though the build is successful?

I've attached a new output and makefile.include in regards to the DVASP_HDF5 related build error.

Best Regards,
Jaime

You do not have the required permissions to view the files attached to this post.

marie-therese.huebsch
Full Member
Full Member
Posts: 234
Joined: Tue Jan 19, 2021 12:01 am

Re: Vasp 6.4.2 build error cannot find -lfftw3_omp

#4 Post by marie-therese.huebsch » Tue Apr 01, 2025 10:14 am

Hello,

First of all, I must apologize because I accidentally compared your makefile.include with the arch of VASP version 5.1. I am glad you succeeded in building VASP 6.4.2 with arch/makefile.include.nvhpc_acc.

Are you still aiming at compiling with omp? Or shall we focus on linking to HDF5?

The warning for HDF5 linking says

NVFORTRAN-F-0004-Corrupt or Old Module file /cm/shared/apps/hdf5/1.12.1//include/hdf5.mod

So I would suggest recompiling the latest version of hdf5 and try again. We indeed recommend linking to hdf5 since some output is only written there. The number of quantities that are only in the h5 files will increase in future. However if the features you are using do not rely on the h5 files, then you can proceed without it.

Does this help?

Marie-Therese


Post Reply