GithubHelp home page GithubHelp logo

Comments (9)

awvwgk avatar awvwgk commented on June 15, 2024

The library is currently not detected correctly by meson, there is a simple workaround presented in grimme-lab/xtb#402, which is basically adding -Dfortran_link_args=-qopenmp in the setup step.

from dftd4.

LePingKYXK avatar LePingKYXK commented on June 15, 2024

The library is currently not detected correctly by meson, there is a simple workaround presented in grimme-lab/xtb#402, which is basically adding -Dfortran_link_args=-qopenmp in the setup step.

Thank you very much for your help.
By adding -Dfortran_link_args=-qopenmp flag, it went on. However, a strange error reported.
meson.build:83:8: ERROR: add_install_script args must be strings

Please see the command below.

[root@grape dftd4]# FC=ifort meson setup _build -Dfortran_link_args=-qopenmp
The Meson build system
Version: 0.53.2
Source dir: /opt/dftd4
Build dir: /opt/dftd4/_build
Build type: native build
Project name: dftd4
Project version: 3.2.0
Fortran compiler for the host machine: ifort (intel unknown version "ifort (IFORT) 2021.2.0 20210228")
Fortran linker for the host machine: ifort ld.bfd 2.30-79
Host machine cpu family: x86_64
Host machine cpu: x86_64
C compiler for the host machine: cc (gcc 8.3.1 "cc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)")
C linker for the host machine: cc ld.bfd 2.30-79
Run-time dependency OpenMP found: YES 4.5
Library mkl_intel_lp64 found: YES
Library mkl_intel_thread found: YES
Library mkl_core found: YES

|Executing subproject mctc-lib method meson 
|
|Project name: mctc-lib
|Project version: 0.2.2
|Fortran compiler for the host machine: ifort (intel unknown version "ifort (IFORT) 2021.2.0 20210228")
|Fortran linker for the host machine: ifort ld.bfd 2.30-79
|Dependency openmp found: YES 4.5 (cached)
|Program asciidoctor found: YES (/opt/miniconda3/bin/asciidoctor)
|Configuring mctc-convert.1 with command
|Build targets in project: 4
|Subproject mctc-lib finished.


|Executing subproject multicharge method meson 
|
|Project name: multicharge
|Project version: 0.1.1
|Fortran compiler for the host machine: ifort (intel unknown version "ifort (IFORT) 2021.2.0 20210228")
|Fortran linker for the host machine: ifort ld.bfd 2.30-79
|Dependency openmp found: YES 4.5 (cached)
|Library mkl_intel_lp64 found: YES
|Library mkl_intel_thread found: YES
|Library mkl_core found: YES
|Program asciidoctor found: YES (/opt/miniconda3/bin/asciidoctor)
|Configuring multicharge.1 with command
|
||Executing subproject mstore method meson 
||
||Project name: mstore
||Project version: 0.1.2
||Fortran compiler for the host machine: ifort (intel unknown version "ifort (IFORT) 2021.2.0 20210228")
||Fortran linker for the host machine: ifort ld.bfd 2.30-79
||Build targets in project: 10
||Subproject mstore finished.
|
|Build targets in project: 11
|Subproject multicharge finished.

Program tester.py found: YES (/opt/dftd4/app/tester.py)
Program config/install-mod.py found: YES (/opt/dftd4/config/install-mod.py)

meson.build:83:8: ERROR: add_install_script args must be strings

A full log can be found at /opt/dftd4/_build/meson-logs/meson-log.txt
[root@grape dftd4]# 

from dftd4.

awvwgk avatar awvwgk commented on June 15, 2024

This seems to be an issue with your meson version, try to upgrade to at least 0.55.3

from dftd4.

LePingKYXK avatar LePingKYXK commented on June 15, 2024

This seems to be an issue with your meson version, try to upgrade to at least 0.55.3

Thanks for your suggestion. I upgrade meson to the version of 0.55.3. It works fine now.

(base) [root@grape dftd4]# FC=ifort meson setup _build -Dfortran_link_args=-qopenmp
The Meson build system
Version: 0.55.3
Source dir: /opt/dftd4
Build dir: /opt/dftd4/_build
Build type: native build
Using 'PKG_CONFIG_PATH' from environment with value: '/opt/intel/oneapi/mkl/latest/tools/pkgconfig:/opt/intel/oneapi/inspector/2021.2.0/include/pkgconfig/lib64:/opt/intel/oneapi/advisor/2021.2.0/include/pkgconfig/lib64:'
Using 'PKG_CONFIG_PATH' from environment with value: '/opt/intel/oneapi/mkl/latest/tools/pkgconfig:/opt/intel/oneapi/inspector/2021.2.0/include/pkgconfig/lib64:/opt/intel/oneapi/advisor/2021.2.0/include/pkgconfig/lib64:'
Project name: dftd4
Project version: 3.2.0
Using 'FC' from environment with value: 'ifort'
Using 'FC' from environment with value: 'ifort'
Fortran compiler for the host machine: ifort (intel 2021.2.0 "ifort (IFORT) 2021.2.0 20210228")
Fortran linker for the host machine: ifort ld.bfd 2.30-79
Host machine cpu family: x86_64
Host machine cpu: x86_64
C compiler for the host machine: cc (gcc 8.3.1 "cc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)")
C linker for the host machine: cc ld.bfd 2.30-79
Run-time dependency OpenMP found: YES 4.5
Library mkl_intel_lp64 found: YES
Library mkl_intel_thread found: YES
Library mkl_core found: YES

|Executing subproject mctc-lib method meson 
|
|Using 'PKG_CONFIG_PATH' from environment with value: '/opt/intel/oneapi/mkl/latest/tools/pkgconfig:/opt/intel/oneapi/inspector/2021.2.0/include/pkgconfig/lib64:/opt/intel/oneapi/advisor/2021.2.0/include/pkgconfig/lib64:'
|Using 'PKG_CONFIG_PATH' from environment with value: '/opt/intel/oneapi/mkl/latest/tools/pkgconfig:/opt/intel/oneapi/inspector/2021.2.0/include/pkgconfig/lib64:/opt/intel/oneapi/advisor/2021.2.0/include/pkgconfig/lib64:'
|Project name: mctc-lib
|Project version: 0.2.2
|Fortran compiler for the host machine: ifort (intel 2021.2.0 "ifort (IFORT) 2021.2.0 20210228")
|Fortran linker for the host machine: ifort ld.bfd 2.30-79
|Dependency openmp found: YES 4.5 (cached)
|Build targets in project: 3
|Subproject mctc-lib finished.


|Executing subproject multicharge method meson 
|
|Using 'PKG_CONFIG_PATH' from environment with value: '/opt/intel/oneapi/mkl/latest/tools/pkgconfig:/opt/intel/oneapi/inspector/2021.2.0/include/pkgconfig/lib64:/opt/intel/oneapi/advisor/2021.2.0/include/pkgconfig/lib64:'
|Using 'PKG_CONFIG_PATH' from environment with value: '/opt/intel/oneapi/mkl/latest/tools/pkgconfig:/opt/intel/oneapi/inspector/2021.2.0/include/pkgconfig/lib64:/opt/intel/oneapi/advisor/2021.2.0/include/pkgconfig/lib64:'
|Project name: multicharge
|Project version: 0.1.1
|Fortran compiler for the host machine: ifort (intel 2021.2.0 "ifort (IFORT) 2021.2.0 20210228")
|Fortran linker for the host machine: ifort ld.bfd 2.30-79
|Dependency openmp found: YES 4.5 (cached)
|Library mkl_intel_lp64 found: YES
|Library mkl_intel_thread found: YES
|Library mkl_core found: YES
|
||Executing subproject mstore method meson 
||
||Using 'PKG_CONFIG_PATH' from environment with value: '/opt/intel/oneapi/mkl/latest/tools/pkgconfig:/opt/intel/oneapi/inspector/2021.2.0/include/pkgconfig/lib64:/opt/intel/oneapi/advisor/2021.2.0/include/pkgconfig/lib64:'
||Using 'PKG_CONFIG_PATH' from environment with value: '/opt/intel/oneapi/mkl/latest/tools/pkgconfig:/opt/intel/oneapi/inspector/2021.2.0/include/pkgconfig/lib64:/opt/intel/oneapi/advisor/2021.2.0/include/pkgconfig/lib64:'
||Project name: mstore
||Project version: 0.1.2
||Fortran compiler for the host machine: ifort (intel 2021.2.0 "ifort (IFORT) 2021.2.0 20210228")
||Fortran linker for the host machine: ifort ld.bfd 2.30-79
||Build targets in project: 7
||Subproject mstore finished.
|
|Build targets in project: 8
|Subproject multicharge finished.

Program tester.py found: YES
Program config/install-mod.py found: YES
Program asciidoctor found: YES
Configuring dftd4.1 with command
Build targets in project: 13

dftd4 3.2.0

  Subprojects
       mctc-lib: YES
         mstore: YES
    multicharge: YES

Found ninja-1.10.2 at /opt/miniconda3/bin/ninja
(base) [root@grape dftd4]#                                                                          :00<00:00, 58.32it/s]

I also run a test. I seems OK.

(base) [root@grape dftd4]# meson test -C _build --print-errorlogs
ninja: Entering directory `/opt/dftd4/_build'
[226/226] Linking target test/unit/tester
 1/38 mctc-lib / math            OK             0.40s
 2/38 mctc-lib / read            OK             0.50s
 3/38 mctc-lib / read-ctfile     OK             0.25s
 4/38 mctc-lib / read-gaussian   OK             0.10s
 5/38 mctc-lib / read-genformat  OK             0.44s
 6/38 mctc-lib / read-pdb        OK             0.39s
 7/38 mctc-lib / read-turbomole  OK             0.13s
 8/38 mctc-lib / read-vasp       OK             0.48s
 9/38 mctc-lib / read-xyz        OK             0.12s
10/38 mctc-lib / symbols         OK             0.49s
11/38 mctc-lib / write           OK             0.49s
12/38 mctc-lib / write-ctfile    OK             0.49s
13/38 mctc-lib / write-gaussian  OK             0.44s
14/38 mctc-lib / write-genformat OK             0.48s
15/38 mctc-lib / write-pdb       OK             1.01s
16/38 mctc-lib / write-turbomole OK             0.28s
17/38 mctc-lib / write-vasp      OK             0.75s
18/38 mctc-lib / write-xyz       OK             0.74s
19/38 multicharge / model        OK             0.98s
20/38 multicharge / ncoord       OK             0.38s
21/38 multicharge / pbc          OK             1.17s
22/38 multicharge / wignerseitz  OK             0.63s
23/38 dftd4 / app-version        OK             0.32s
24/38 dftd4 / app-help           OK             0.32s
25/38 dftd4 / app-license        OK             0.35s
26/38 dftd4 / app-citation       OK             0.33s
27/38 dftd4 / app-noargs         EXPECTEDFAIL   0.32s
28/38 dftd4 / app-energy         SKIP           0.26s
29/38 dftd4 / app-gradient       SKIP           0.18s
30/38 dftd4 / app-properties     SKIP           0.12s
31/38 dftd4 / app-pair-analysis  SKIP           0.04s
32/38 dftd4 / api-test           OK             0.73s
33/38 dftd4 / ncoord             OK             0.64s
34/38 dftd4 / model              OK             0.47s
35/38 dftd4 / dftd4              OK             0.67s
36/38 dftd4 / pairwise           OK             0.57s
37/38 dftd4 / param              OK             0.72s
38/38 dftd4 / periodic           OK             1.04s

Ok:                 33  
Expected Fail:      1   
Fail:               0   
Unexpected Pass:    0   
Skipped:            4   
Timeout:            0   

Full log written to /opt/dftd4/_build/meson-logs/testlog.txt
(base) [root@grape dftd4]# 

from dftd4.

LePingKYXK avatar LePingKYXK commented on June 15, 2024

I would like to use the DFT-D4 in VASP code. I noticed that VASP was compiled via the Intel compiler, including icc ,ifort.
However, the DFT-D4 compiled now only with FC=ifort, the C compile is GCC.
Will it be the problem?

from dftd4.

awvwgk avatar awvwgk commented on June 15, 2024

DFT-D4 in Vasp currently only works with DFT-D4 version 2.5 and Intel Fortran 18, newer Intel versions did break the DFT-D4 implementation in 2.5 and the newer version of DFT-D4 had to break API compatibility in the process of supporting newer Intel Versions. See #85.

from dftd4.

LePingKYXK avatar LePingKYXK commented on June 15, 2024

DFT-D4 in Vasp currently only works with DFT-D4 version 2.5 and Intel Fortran 18, newer Intel versions did break the DFT-D4 implementation in 2.5 and the newer version of DFT-D4 had to break API compatibility in the process of supporting newer Intel Versions. See #85.

Thank you for your instruction. That is really a piece of unfortunate information.
I am trying to compile VASP 6.2. The online manual shows that I should activate the following flags in the makefile.include file in order to use dftd4.

CPP_OPTIONS += -DDFTD4
LLIBS       += -Lyour-libdftd4-build -ldftd4
INCS        += -Iyour-libdftd4-build/libdftd4.a.p

Of course, I should replace your-libdftd4-build with the correct directory.
After compiling and installing dftd4-3.2.0, I could not find the libdftd4.a.p file, only the libdftd4.a file in the /opt/dftd4-3.2.0/lib64 directory.

(base) [root@grape lib64]# ls
libdftd4.a  libdftd4.so  libdftd4.so.3  libdftd4.so.3.2.0  pkgconfig

That might another problem beside your mentioned the break of implementation by newer Intel compiler...

from dftd4.

awvwgk avatar awvwgk commented on June 15, 2024

Looks like the instructions are meant to use dftd4 from the build directory rather than the install directory.

from dftd4.

LePingKYXK avatar LePingKYXK commented on June 15, 2024

Looks like the instructions are meant to use dftd4 from the build directory rather than the install directory.

The build directory does not contain the libdftd4.a.p file, neither...

(base) [root@grape lib64]# cd /home/huan/Downloads/dftd4/_build/
(base) [root@grape _build]# ls
app          compile_commands.json  dftd4.1     libdftd4.so    libdftd4.so.3.2.0    meson-info  meson-private      src          test
build.ninja  config                 libdftd4.a  libdftd4.so.3  libdftd4.so.3.2.0.p  meson-logs  meson-uninstalled  subprojects
(base) [root@grape _build]# 
(base) [root@grape _build]# cd libdftd4.so.3.2.0.p/
(base) [root@grape libdftd4.so.3.2.0.p]# ls
dftd4_api.mod               dftd4_data_en.mod        dftd4_ncoord.mod           src_dftd4_blas.f90.o              src_dftd4_data.f90.o           src_dftd4_output.f90.o
dftd4_blas.mod              dftd4_data_hardness.mod  dftd4_output.mod           src_dftd4_charge.f90.o            src_dftd4_data_hardness.f90.o  src_dftd4_param.f90.o
dftd4_charge.mod            dftd4_data.mod           dftd4_param.mod            src_dftd4_cutoff.f90.o            src_dftd4_data_r4r2.f90.o      src_dftd4_reference.f90.o
dftd4_cutoff.mod            dftd4_data_r4r2.mod      dftd4_reference.mod        src_dftd4_damping_atm.f90.o       src_dftd4_data_zeff.f90.o      src_dftd4_utils.f90.o
dftd4_damping_atm.mod       dftd4_data_zeff.mod      dftd4_utils.mod            src_dftd4_damping.f90.o           src_dftd4_disp.f90.o           src_dftd4_version.f90.o
dftd4_damping.mod           dftd4_disp.mod           dftd4_version.mod          src_dftd4_damping_rational.f90.o  src_dftd4.f90.o
dftd4_damping_rational.mod  dftd4.mod                libdftd4.so.3.2.0.symbols  src_dftd4_data_covrad.f90.o       src_dftd4_model.f90.o
dftd4_data_covrad.mod       dftd4_model.mod          src_dftd4_api.f90.o        src_dftd4_data_en.f90.o           src_dftd4_ncoord.f90.o
(base) [root@grape libdftd4.so.3.2.0.p]# 
(base) [root@grape libdftd4.so.3.2.0.p]# ls *.a.p
ls: cannot access '*.a.p': No such file or directory
(base) [root@grape libdftd4.so.3.2.0.p]# 
(base) [root@grape libdftd4.so.3.2.0.p]# 

from dftd4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.