Compilation of VASP 6.4.3 with DFT-D4 3.6.0

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
Fabian Pieck
Newbie
Newbie
Posts: 2
Joined: Mon Jan 23, 2023 9:40 am

Compilation of VASP 6.4.3 with DFT-D4 3.6.0

#1 Post by Fabian Pieck » Thu Jun 06, 2024 10:51 am

Hello everyone,

while trying to compile VASP 6.4.3 with DFT-D4 3.6.0 I'm running into the problem that during the final linking "undefined reference" errors appear (see attached log).
Since these errors are known in case the makefile (also attached) is incorrect (see for example https://github.com/dftd4/dftd4/issues/216) I double checked that. However, I couldn't find any source of errors.

To check whether I did some mistakes in the compilation of D4 I also tried an older version 3.5.0, which I used with VASP 6.4.2. Here, I observed the same linking errors. However, if I use VASP 6.4.2 with the same makefile everything compiles without errors.

So, my question would be if anyone already compiled the latest VASP version with D4 and could assist me here? Also, I'm not really sure whether this problem has to be addressed by VASP staff or is related to some problems within D4 - so I appreciate your hints.

Thanks in advance!

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

pedro_melo
Global Moderator
Global Moderator
Posts: 139
Joined: Thu Nov 03, 2022 1:03 pm

Re: Compilation of VASP 6.4.3 with DFT-D4 3.6.0

#2 Post by pedro_melo » Mon Jun 17, 2024 2:52 pm

Dear Fabian Pieck,

From what I can see in your make.log, you cannot find the libraries related to the multicharge. I managed to compile vasp 6.4.3. with DFT-D4 3.6 support without any errors at the end using the following lines in the makefile.include

# For the dftd4 interface (optional)
CPP_OPTIONS += -DDFTD4
LLIBS += -L$(PATH_TO_DFTD4)/_build -ldftd4
LLIBS += -L$(PATH_TO_DFTD4)/_build/_deps/mctc-lib-build/ -lmctc-lib
LLIBS += -L$(PATH_TO_DFTD4)/_build/_deps/multicharge-build/ -lmulticharge
INCS += -I$(PATH_TO_DFTD$)/_build/include

Could you try this with your own PATH_TO_DTFD4?

Kind regards,
Pedro

Fabian Pieck
Newbie
Newbie
Posts: 2
Joined: Mon Jan 23, 2023 9:40 am

Re: Compilation of VASP 6.4.3 with DFT-D4 3.6.0

#3 Post by Fabian Pieck » Wed Jun 19, 2024 7:41 am

Dear Pedro,

thanks for the feedback.

Within my D4 build folder there isn't even a "_deps" folder. I tried to replace that with the "subproject" folder as I can find the "libmstore.a", "libmctc-lib.a", and "libmulticharge.a" files there. However, I run into the same error of an undefined reference to `__mctc_io_math_MOD_matinv_3x3' within the multicharge lib.

Would you mind sharing how you installed the D4 package? I used CMake/3.24.3 with Ninja/1.10.2, GCC/11.3.0 and FlexiBLAS/3.2.0, and the following command to build D4 "cmake -DBLA_STATIC=ON -DWITH_OpenMP=ON -DWITH_API_V2=ON -B _build -G Ninja".

I'd like to check that my D4 compilation is correct - otherwise I would reach out to the D4 developers.

Thanks for your help!

Best,
Fabian

pedro_melo
Global Moderator
Global Moderator
Posts: 139
Joined: Thu Nov 03, 2022 1:03 pm

Re: Compilation of VASP 6.4.3 with DFT-D4 3.6.0

#4 Post by pedro_melo » Mon Jun 24, 2024 12:37 pm

Dear Fabian,

I used

Code: Select all

cmake -B _build -DWITH_API_V2=ON -DCMAKE_INSTALL_PREFIX=/fsc/home/pmelo/codes/dftd4
I took the latest version of DFT-D4 from their github, and am using VASP 6.4.3.

Also, in your VASP makefile.include, did you activate support for openMP? Here's the makefile.include that I used.

Kind regards,
Pedro
You do not have the required permissions to view the files attached to this post.

Post Reply