GithubHelp home page GithubHelp logo

dftd4 / dftd4 Goto Github PK

View Code? Open in Web Editor NEW
146.0 10.0 42.0 1.6 MB

Generally Applicable Atomic-Charge Dependent London Dispersion Correction

Home Page: https://dftd4.readthedocs.io

License: GNU Lesser General Public License v3.0

Fortran 82.78% Meson 2.13% Python 11.48% C 1.17% CMake 2.26% Shell 0.18%
quantum-chemistry dispersion-correction ase computational-chemistry pyscf qcschema fortran-package-manager

dftd4's People

Contributors

ajmay81 avatar aradi avatar awvwgk avatar dmejiar avatar e-kwsm avatar f3rmion avatar gorges97 avatar lgtm-migrator avatar loriab avatar lukaswittmann avatar marvinfriede avatar pavelstishenko avatar ricrogz avatar tybalduf avatar zerothi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dftd4's Issues

CI Migration

At some point a CI migration from Travis-CI to another provider has to be considered.

Travis-CI testing for this project currently covers

  • Ubuntu 18.04, GCC 5, meson
  • Ubuntu 18.04, GCC 6, meson
  • Ubuntu 18.04, GCC 7, meson
  • Ubuntu 18.04, GCC 8, meson

VASP Interface: different results between DFTD4 2.5.0 and 2.5.1

There is an issue with the VASP plugin of DFTD4:
The plugins from the master repository of DFTD4 (https://github.com/dftd4/dftd4, downloaded at 4th Jan. 2021 and compiled using ifort 2021.1) and the precompiled version 2.5.0 (downloaded from https://github.com/dftd4/dftd4/releases/tag/v2.5.0) yield different D4 corrections to the energy.
We are using VASP 6.1.1 (compiled with ifort 2021.1).

Example:
Example_VASP_DFTD4.zip

Specifically, the repository version 2.5.1 of DFTD4 does yield different partial charges and coordination numbers than the precompiled 2.5.0. Note, that for 2.5.1 coordination numbers of equivalent positions are not identical.
As a result, the dispersion corrections between 2.5.0 and 2.5.1 differ.

Gradients only available up to Rn?

Describe the bug
When asking for gradients for atoms beyond Rn the output is NaN.
I wonder if it is a bug.

To Reproduce
Steps to reproduce the behaviour:

  1. happens with input (include input files): rah2ob.xyz has gradients as NaN

  2. start dftd4 with (all the options here): dftd4 --func tpssh -c 2 --grad kk rah2ob.xyz

  3. output showing the error: rah2ob.out

Please provide all input and output file such that we confirm your report.
ra_and_rn.zip
Expected behaviour
A clear and concise description of what you expected to happen.
I expected a result similar to the one in rnh2ob.out

Additional context
If I run dftd4 rah2ob.xyz there is no data for Ra in the "Atomic reference systems (in atomic units):" table.

Error when Compiling with Intel OneAPI

Dear dftd4 developers,

I got a error when compiling the dftd4 with Intel OneAPI on CentOS 8.
The ifort and mkl were activated by using module load . The code is shown below.

[root@grape dftd4]# module list 
Currently Loaded Modulefiles:
 1) compiler-rt/2021.2.0   4) debugger/latest                                                             7) compiler/latest  
 2) tbb/2021.2.0           5) dpl/latest                                                                 
 3) mkl/latest             6) /opt/intel/oneapi/compiler/2021.2.0/linux/lib/oclfpga/modulefiles/oclfpga  
[root@grape dftd4]#
[root@grape dftd4]# ifort -v
ifort version 2021.2.0
[root@grape dftd4]# 
[root@grape dftd4]# FC=ifort meson setup _build
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

config/meson.build:58:6: ERROR: Fortran library 'mkl_intel_thread' not found

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

There was an error reported as "ERROR: Fortran library 'mkl_intel_thread' not found". However, the above line showed that the mkl_intel_lp64 has found.

I have no idea about what is the different between these two mkl? Looking forward to your suggestions.
Thanks a lot.

Huan

Build fails with CMake 3.17.3 on Cray environment

Seems like we can find BLAS and LAPACK correctly pre-CMake 3.18 due to the missing BLAS::BLAS and LAPACK::LAPACK targets in this versions.

[ 89%] Linking Fortran executable multicharge
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lFALSE
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: /opt/intel/compilers_and_libraries_2019.5.281/linux/compiler/lib/intel64_lin/libiomp5.a(ompt-general.o): in function `ompt_pre_init':
(.text+0x25f0): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
_deps/multicharge-build/app/CMakeFiles/multicharge-exe.dir/build.make:113: recipe for target '_deps/multicharge-build/app/multicharge' failed
make[2]: *** [_deps/multicharge-build/app/multicharge] Error 1
make[2]: Leaving directory '/.../SOURCE/DFTD4'
CMakeFiles/Makefile2:1013: recipe for target '_deps/multicharge-build/app/CMakeFiles/multicharge-exe.dir/all' failed
make[1]: *** [_deps/multicharge-build/app/CMakeFiles/multicharge-exe.dir/all] Error 2
make[1]: Leaving directory '/.../SOURCE/DFTD4'
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/.../SOURCE/DFTD4'

Thanks to @drmewes for reporting.

Is the dft4d library only intended to be run with vasp as a pure MPI application?

To whom it may concern,

I have built the MPI/OpenMP version of vasp 6.2.1 with dft4d.

Unfortunately, I cannot use multiple OpenMP threads with the vasp build.

Although the statement "running 18 mpi-ranks, with 2 threads/rank" appears in VASP's OUTCAR,
and the OPENMP banner appears in the log. Only 18 MPI single-threaded processes are run.

Is the dft4d library only intended to be run with vasp as a pure MPI application?

John J. Low
Argonne National Laboratory

Building with openMP and mkl (GCC 9, GCC 8)

I'm trying to build with GCC 9.1.0, Intel MKL & LAPACK. At the linking stage, it can't find GOMP (even though the library is in the path):

[63/65] Linking target dftd4_c.
FAILED: dftd4_c
cc  -o dftd4_c 'dftd4_c@exe/tests_c_api_example.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group libdftd4.so.2.3.1 -lpthread -lm -ldl -pthread '-Wl,-rpath,$ORIGIN/' -Wl,-rpath-link,/home/m212767/dftd4/dftd4-master/build/ -lgfortran -Wl,--end-group
libdftd4.so.2.3.1: undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next@GOMP_5.0'
libdftd4.so.2.3.1: undefined reference to `GOMP_parallel_loop_maybe_nonmonotonic_runtime@GOMP_5.0'
collect2: error: ld returned 1 exit status
[64/65] Linking target dftd4_cpp.
FAILED: dftd4_cpp
c++  -o dftd4_cpp 'dftd4_cpp@exe/tests_cpp_api_example.cpp.o' -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group libdftd4.so.2.3.1 -lpthread -lm -ldl -pthread '-Wl,-rpath,$ORIGIN/' -Wl,-rpath-link,/home/m212767/dftd4/dftd4-master/build/ -lgfortran -Wl,--end-group
libdftd4.so.2.3.1: undefined reference to `GOMP_loop_maybe_nonmonotonic_runtime_next@GOMP_5.0'
libdftd4.so.2.3.1: undefined reference to `GOMP_parallel_loop_maybe_nonmonotonic_runtime@GOMP_5.0'
collect2: error: ld returned 1 exit status
[65/65] Linking target d4test.
ninja: build stopped: subcommand failed.

How can this be solved?
Thanks,
Michal

program is not reading molecular charge from `.CHRG` file

Molecular charge specified in .CHRG is ignored in 84ce36d.

Steps to reproduce:

  1. create .CHRG file with molecular charge unequal to zero
  2. start calculation in same directory
  3. charge is not used for the DFT-D4 calculation

Expected behaviour:

Charge should be read from .CHRG file, priority is lower than corresponding commandline argument.

Files

Implement read before this part:

! ------------------------------------------------------------------------
! command line arguments
! ------------------------------------------------------------------------
call read_commandline_arguments(env,set)
call env%checkpoint
! ------------------------------------------------------------------------
! get molecular geometry
! ------------------------------------------------------------------------
call read_geometry(set%fname,mol,env)
call env%checkpoint
call generate_wsc(mol,mol%wsc)
if (set%inchrg) mol%chrg = set%chrg

Stress tensor shape not compatible with ASE stress tensor

This is an issue with the python interface to ASE. ASE and GPAW calculators return a stress tensor with shape (6,) by default. This is the Voigt style (xx, yy, zz, yz, xz, xy) (see ASE docs) dftd4 uses a (3,3) array. This causes an error in the get_property method of the DispersionCalculator class where the ASE/GPAW calculator result is added to the dftd4 result and the array shapes do not match. A quick fix is to reshape the self_result array, but there should be more robust checking implemented.

if calc_result.shape == (6,) and self_result.shape == (3,3):
    self_result = np.array([self_result[0,0], self_result[1,1], self_result[2,2], self_result[1,2], self_result[0,2], self_result[0,1]])
       
return self_result + calc_result

wB97x s8 parameter is negative

Hi all,

I am using the D4 dispersion correction with a wB97x functional, however, I have come across the fact that the s8 parameter is negative. There are safe checks against negative values of s8 in the code.

Is it safe to use the wB97x parameters?

Thanks,
Adam

mol%lattice passed as potentially unallocated array to get_lattice_points

The intel run-time checker prints
forrtl: severe (408): fort: (8): Attempt to fetch from allocatable variable LATTICE when it is not allocated
due to lattice being not allocatable in the subroutine get_lattice_points->get_lattice_points_cutoff where the dummy
variable is just declared as:
real(wp), intent(in) :: lat(:, :)

According to the language standard it is not allowed to pass an unallocated array when the dummy variable is not also allocatable.

A possible fix for this would be to initialise it with
allocate(molecule%lattice(0,0))
in the molecule initialiser (when periodic=.false.).

Supported gcc compilers for dftd4

Describe the bug
I have installed multiple versions and combinations of meson (0.58.1, 0.59.0, 0.59.1), dftd4 (3.1.0, 3.2.0, 3.3.0) and gcc (4.8.5 and 6.5.0) and we're still trying to install the software without compilation errors. When I keep everything the same except for version of GCC (gfortran), a different set of compile errors pop up. I kind of suspect that the software requires a higher version of Fortran 2008 implementation that would come with a higher version of GCC (gfortran). I'm just wondering if there a minimum required GCC version to support the software build?

==========================================

HERE IS INSTALLATION OF DFTD4-3.3.0 USING MESON-0.59.1, GCC-4.8.5 and PYTHON-3.7.7:
export PATH=/share/apps/python-3.7.7/bin:$PATH
export PATH=/usr/local/cmake-3.9.6/bin:$PATH
export PKG_CONFIG_PATH=/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH=/share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:$PKG_CONFIG_PATH
export CC=gcc
 
tar zxf dftd4-3.3.0.tar.gz
cd dftb4-3.3.0
 
meson setup _build -Dpython=true -Dpython_version=3
 
The Meson build system
Version: 0.59.1
Source dir: /tmp/emerio/dftd4-3.3.0
Build dir: /tmp/emerio/dftd4-3.3.0/_build
Build type: native build
Project name: dftd4
Project version: 3.3.0
Fortran compiler for the host machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
Host machine cpu family: x86_64
Host machine cpu: x86_64
C compiler for the host machine: gcc (gcc 4.8.5 "gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
C linker for the host machine: gcc ld.bfd 2.25.1-32
Run-time dependency OpenMP found: YES 3.1
Found pkg-config: /usr/bin/pkg-config (0.27.1)
Run-time dependency lapack found: YES 3.9.0
Run-time dependency blas found: YES 3.9.0
Found CMake: /usr/local/cmake-3.9.6/bin/cmake (3.9.6)
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Run-time dependency mctc-lib found: NO (tried pkgconfig and cmake)
Cloning into 'mctc-lib'...
remote: Enumerating objects: 4620, done.
remote: Counting objects: 100% (2334/2334), done.
remote: Compressing objects: 100% (378/378), done.
remote: Total 4620 (delta 2115), reused 2125 (delta 1939), pack-reused 2286
Receiving objects: 100% (4620/4620), 1.93 MiB | 0 bytes/s, done.
Resolving deltas: 100% (4117/4117), done.
Note: checking out 'v0.2.3'.
 
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
 
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
 
  git checkout -b new_branch_name
 
HEAD is now at a2f70b0... Release version 0.2.3 (#17)
 
Executing subproject mctc-lib
 
mctc-lib| Project name: mctc-lib
mctc-lib| Project version: 0.2.3
mctc-lib| Fortran compiler for the host machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
mctc-lib| Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
mctc-lib| Dependency openmp found: YES 3.1 (cached)
mctc-lib| Build targets in project: 3
mctc-lib| Subproject mctc-lib finished.
 
Run-time dependency multicharge found: NO (tried pkgconfig and cmake)
Cloning into 'multicharge'...
remote: Enumerating objects: 182, done.
remote: Counting objects: 100% (182/182), done.
remote: Compressing objects: 100% (113/113), done.
remote: Total 182 (delta 92), reused 129 (delta 54), pack-reused 0
Receiving objects: 100% (182/182), 71.21 KiB | 0 bytes/s, done.
Resolving deltas: 100% (92/92), done.
Note: checking out 'v0.1.2'.
 
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
 
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
 
  git checkout -b new_branch_name
 
HEAD is now at dde0d67... Bump release version to 0.1.2 (#12)
 
Executing subproject multicharge
 
multicharge| Project name: multicharge
multicharge| Project version: 0.1.2
multicharge| Fortran compiler for the host machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
multicharge| Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
multicharge| Dependency openmp found: YES 3.1 (cached)
multicharge| Dependency lapack found: YES 3.9.0 (cached)
multicharge| Dependency blas found: YES 3.9.0 (cached)
multicharge| WARNING: Subproject 'mctc-lib' did not override 'mctc-lib' dependency and no variable name specified
multicharge| Dependency mctc-lib from subproject subprojects/mctc-lib found: NO
Cloning into 'mstore'...
remote: Enumerating objects: 143, done.
remote: Counting objects: 100% (143/143), done.
remote: Compressing objects: 100% (87/87), done.
remote: Total 143 (delta 70), reused 110 (delta 49), pack-reused 0
Receiving objects: 100% (143/143), 290.87 KiB | 0 bytes/s, done.
Resolving deltas: 100% (70/70), done.
Note: checking out 'v0.2.0'.
 
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
 
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
 
  git checkout -b new_branch_name
 
HEAD is now at 974fb59... Update dependency handling logic in meson and CMake (#9)
 
Executing subproject multicharge:mstore
 
mstore| Project name: mstore
mstore| Project version: 0.2.0
mstore| Fortran compiler for the host machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
mstore| Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
mstore| Dependency openmp found: YES 3.1 (cached)
mstore| WARNING: Subproject 'mctc-lib' did not override 'mctc-lib' dependency and no variable name specified
mstore| Dependency mctc-lib from subproject subprojects/mctc-lib found: NO
mstore| Build targets in project: 8
mstore| Subproject mstore finished.
 
multicharge| Build targets in project: 9
multicharge| Subproject multicharge finished.
 
Program tester.py found: YES (/tmp/emerio/dftd4-3.3.0/app/tester.py)
Program config/install-mod.py found: YES (/tmp/emerio/dftd4-3.3.0/config/install-mod.py)
Program asciidoctor found: NO
Program python3 (cffi) found: YES (/share/apps/python-3.7.7/bin/python3) modules: cffi
Dependency python found: YES (pkgconfig)
Configuring _libdftd4.h with command
Configuring _libdftd4.c with command
Build targets in project: 16
 
dftd4 3.3.0
 
  Subprojects
    mctc-lib   : YES
    mstore     : YES 1 warnings
    multicharge: YES 1 warnings
 
Found ninja-1.10.2.git.kitware.jobserver-1 at /share/apps/python-3.7.7/bin/ninja
 
==============================
meson test -C _build --print-errorlogs
 
ninja: Entering directory `/tmp/emerio/dftd4-3.3.0/_build'
[10/133] Compiling Fortran object subproject...lib/libmctc-lib.a.p/src_mctc_env_error.f90.
FAILED: subprojects/mctc-lib/libmctc-lib.a.p/src_mctc_env_error.f90.o subprojects/mctc-lib/libmctc-lib.a.p/mctc_env_error.mod
gfortran -Isubprojects/mctc-lib/libmctc-lib.a.p -Isubprojects/mctc-lib -I../subprojects/mctc-lib -D_FILE_OFFSET_BITS=64 -Wall -O2 -g -ffree-line-length-none -fbacktrace -fPIC -fopenmp -Jsubprojects/mctc-lib/libmctc-lib.a.p -o subprojects/mctc-lib/libmctc-lib.a.p/src_mctc_env_error.f90.o -c ../subprojects/mctc-lib/src/mctc/env/error.f90
../subprojects/mctc-lib/src/mctc/env/error.f90:46.46:
 
      character(len=:), allocatable :: message
                                              1
Error: Deferred-length character component 'message' at (1) is not yet supported
../subprojects/mctc-lib/src/mctc/env/error.f90:46.46:
 
      character(len=:), allocatable :: message
                                              1
Error: Deferred-length character component 'message' at (1) is not yet supported
[14/133] Compiling Fortran object subproject...ib/libmctc-lib.a.p/src_mctc_env_system.f90.
../subprojects/mctc-lib/src/mctc/env/system.f90:120.39:
 
   character(len=:), allocatable :: tmp
                                       1
Warning: Unused variable 'tmp' declared at (1)
[15/133] Compiling Fortran object subproject...b/libmctc-lib.a.p/src_mctc_io_filetype.f90.
ninja: build stopped: subcommand failed.
Could not rebuild /tmp/emerio/dftd4-3.3.0/_build
 
===================================================
cat /tmp/emerio/dftd4-3.3.0/_build/meson-logs/meson-log.txt
 
Build started at 2021-08-24T14:19:15.296381
Main binary: /share/apps/python-3.7.7/bin/python3.7
Build Options: -Dpython=true -Dpython_version=3
Python system: Linux
The Meson build system
Version: 0.59.1
Source dir: /tmp/emerio/dftd4-3.3.0
Build dir: /tmp/emerio/dftd4-3.3.0/_build
Build type: native build
Project name: dftd4
Project version: 3.3.0
Fortran compiler for the host machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
Fortran compiler for the build machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
Fortran linker for the build machine: gfortran ld.bfd 2.25.1-32
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Sanity testing C compiler: gcc
Is cross compiler: False.
Sanity check compiler command line: gcc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:
 
-----
Sanity check compile stderr:
 
-----
Running test binary command: /tmp/emerio/dftd4-3.3.0/_build/meson-private/sanitycheckc.exe
C compiler for the host machine: gcc (gcc 4.8.5 "gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
C linker for the host machine: gcc ld.bfd 2.25.1-32
Running compile:
Working directory:  /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmpnyq4qinf
Command line:  gcc /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmpnyq4qinf/testfile.c -E -P -D_FILE_OFFSET_BITS=64 -P -O0 -fopenmp
 
Code:
 
        #ifndef _OPENMP
        # define _OPENMP
        #endif
        "MESON_GET_DEFINE_DELIMITER"
_OPENMP
Compiler stdout:
         "MESON_GET_DEFINE_DELIMITER"
201107
 
Compiler stderr:
 
Running compile:
Working directory:  /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmpzi17wm8_
Command line:  gcc /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmpzi17wm8_/testfile.c -E -P -D_FILE_OFFSET_BITS=64 -P -O0
 
Code:
 
        #ifdef __has_include
         #if !__has_include("omp.h")
          #error "Header 'omp.h' could not be found"
         #endif
        #else
         #include <omp.h>
        #endif
Compiler stdout:
typedef struct
{
  unsigned char _x[4]
    __attribute__((__aligned__(4)));
} omp_lock_t;
typedef struct
{
  unsigned char _x[8 + sizeof (void *)]
    __attribute__((__aligned__(sizeof (void *))));
} omp_nest_lock_t;
typedef enum omp_sched_t
{
  omp_sched_static = 1,
  omp_sched_dynamic = 2,
  omp_sched_guided = 3,
  omp_sched_auto = 4
} omp_sched_t;
extern void omp_set_num_threads (int) __attribute__((__nothrow__));
extern int omp_get_num_threads (void) __attribute__((__nothrow__));
extern int omp_get_max_threads (void) __attribute__((__nothrow__));
extern int omp_get_thread_num (void) __attribute__((__nothrow__));
extern int omp_get_num_procs (void) __attribute__((__nothrow__));
extern int omp_in_parallel (void) __attribute__((__nothrow__));
extern void omp_set_dynamic (int) __attribute__((__nothrow__));
extern int omp_get_dynamic (void) __attribute__((__nothrow__));
extern void omp_set_nested (int) __attribute__((__nothrow__));
extern int omp_get_nested (void) __attribute__((__nothrow__));
extern void omp_init_lock (omp_lock_t *) __attribute__((__nothrow__));
extern void omp_destroy_lock (omp_lock_t *) __attribute__((__nothrow__));
extern void omp_set_lock (omp_lock_t *) __attribute__((__nothrow__));
extern void omp_unset_lock (omp_lock_t *) __attribute__((__nothrow__));
extern int omp_test_lock (omp_lock_t *) __attribute__((__nothrow__));
extern void omp_init_nest_lock (omp_nest_lock_t *) __attribute__((__nothrow__));
extern void omp_destroy_nest_lock (omp_nest_lock_t *) __attribute__((__nothrow__));
extern void omp_set_nest_lock (omp_nest_lock_t *) __attribute__((__nothrow__));
extern void omp_unset_nest_lock (omp_nest_lock_t *) __attribute__((__nothrow__));
extern int omp_test_nest_lock (omp_nest_lock_t *) __attribute__((__nothrow__));
extern double omp_get_wtime (void) __attribute__((__nothrow__));
extern double omp_get_wtick (void) __attribute__((__nothrow__));
void omp_set_schedule (omp_sched_t, int) __attribute__((__nothrow__));
void omp_get_schedule (omp_sched_t *, int *) __attribute__((__nothrow__));
int omp_get_thread_limit (void) __attribute__((__nothrow__));
void omp_set_max_active_levels (int) __attribute__((__nothrow__));
int omp_get_max_active_levels (void) __attribute__((__nothrow__));
int omp_get_level (void) __attribute__((__nothrow__));
int omp_get_ancestor_thread_num (int) __attribute__((__nothrow__));
int omp_get_team_size (int) __attribute__((__nothrow__));
int omp_get_active_level (void) __attribute__((__nothrow__));
int omp_in_final (void) __attribute__((__nothrow__));
 
Compiler stderr:
 
Run-time dependency OpenMP found: YES 3.1
Pkg-config binary for MachineChoice.HOST is not cached.
Pkg-config binary missing from cross or native file, or env var undefined.
Trying a default Pkg-config fallback at pkg-config
Found pkg-config: /usr/bin/pkg-config (0.27.1)
Determining dependency 'lapack' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --modversion lapack` -> 0
3.9.0
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --cflags lapack` -> 0
 
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
Called `/usr/bin/pkg-config --libs lapack` -> 0
-L/share/apps/lapack-3.9.0 -llapack
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --libs lapack` -> 0
-L/share/apps/lapack-3.9.0 -llapack
Running compile:
Working directory:  /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmplmqoiwhm
Command line:  gcc /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmplmqoiwhm/testfile.c -o /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmplmqoiwhm/output.exe -D_FILE_OFFSET_BITS=64 -O0
 
Code:
#include<stdio.h>
 
        int main(void) {
            printf("%ld\n", (long)(sizeof(void *)));
            return 0;
        };
Compiler stdout:
 
Compiler stderr:
 
Program stdout:
 
8
 
Program stderr:
 
Running compile:
Working directory:  /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmp6z7fm55i
Command line:  gcc /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmp6z7fm55i/testfile.c -o /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmp6z7fm55i/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 --print-search-dirs
 
Code:
 
Compiler stdout:
install: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/
programs: =/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/bin/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/bin/
libraries: =/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/lib/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/:/lib/x86_64-redhat-linux/4.8.5/:/lib/../lib64/:/usr/lib/x86_64-redhat-linux/4.8.5/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/lib/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../:/lib/:/usr/lib/
 
Compiler stderr:
 
Run-time dependency lapack found: YES 3.9.0
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'blas' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --modversion blas` -> 0
3.9.0
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --cflags blas` -> 0
 
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
Called `/usr/bin/pkg-config --libs blas` -> 0
-L/share/apps/lapack-3.9.0 -lblas
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --libs blas` -> 0
-L/share/apps/lapack-3.9.0 -lblas
Run-time dependency blas found: YES 3.9.0
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'mctc-lib' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --modversion mctc-lib` -> 1
 
CMake binary for 1 is not cached
CMake binary missing from cross or native file, or env var undefined.
Trying a default CMake fallback at cmake
Found CMake: /usr/local/cmake-3.9.6/bin/cmake (3.9.6)
Extracting basic cmake information
CMake Toolchain: Calling CMake once to generate the compiler state
Calling CMake (['/usr/local/cmake-3.9.6/bin/cmake']) in /tmp/emerio/dftd4-3.3.0/_build/meson-private/__CMake_compiler_info__ with:
  - "--trace"
  - "--trace-expand"
  - "--no-warn-unused-cli"
  - "-G"
  - "Ninja"
  - "-DCMAKE_TOOLCHAIN_FILE=/tmp/emerio/dftd4-3.3.0/_build/meson-private/__CMake_compiler_info__/CMakeMesonTempToolchainFile.cmake"
  - "."
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Try CMake generator: auto
Calling CMake (['/usr/local/cmake-3.9.6/bin/cmake']) in /tmp/emerio/dftd4-3.3.0/_build/meson-private/cmake_mctc-lib with:
  - "--trace"
  - "--trace-expand"
  - "--no-warn-unused-cli"
  - "-DCMAKE_TOOLCHAIN_FILE=/tmp/emerio/dftd4-3.3.0/_build/meson-private/cmake_mctc-lib/CMakeMesonToolchainFile.cmake"
  - "."
  -- Module search paths:    ['/', '/opt', '/usr', '/usr/local', '/usr/local/cmake-3.9.6']
  -- CMake root:             /usr/local/cmake-3.9.6/share/cmake-3.9
  -- CMake architectures:    []
  -- CMake lib search paths: ['lib', 'lib32', 'lib64', 'libx32', 'share']
Preliminary CMake check failed. Aborting.
Run-time dependency mctc-lib found: NO (tried pkgconfig and cmake)
 
Executing subproject mctc-lib
 
Project name: mctc-lib
Project version: 0.2.3
Fortran compiler for the host machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
Fortran compiler for the build machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
Fortran linker for the build machine: gfortran ld.bfd 2.25.1-32
Dependency openmp found: YES 3.1 (cached)
Adding test "math"
Adding test "read"
Adding test "read-ctfile"
Adding test "read-gaussian"
Adding test "read-genformat"
Adding test "read-pdb"
Adding test "read-turbomole"
Adding test "read-vasp"
Adding test "read-xyz"
Adding test "symbols"
Adding test "write"
Adding test "write-ctfile"
Adding test "write-gaussian"
Adding test "write-genformat"
Adding test "write-pdb"
Adding test "write-turbomole"
Adding test "write-vasp"
Adding test "write-xyz"
Build targets in project: 3
Subproject mctc-lib finished.
 
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'multicharge' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --modversion multicharge` -> 1
 
CMake binary for 1 is cached.
Preliminary CMake check failed. Aborting.
Run-time dependency multicharge found: NO (tried pkgconfig and cmake)
 
Executing subproject multicharge
 
Project name: multicharge
Project version: 0.1.2
Fortran compiler for the host machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
Fortran compiler for the build machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
Fortran linker for the build machine: gfortran ld.bfd 2.25.1-32
Dependency openmp found: YES 3.1 (cached)
Dependency lapack found: YES 3.9.0 (cached)
Dependency blas found: YES 3.9.0 (cached)
WARNING: Subproject 'mctc-lib' did not override 'mctc-lib' dependency and no variable name specified
Dependency mctc-lib from subproject subprojects/mctc-lib found: NO
 
Executing subproject multicharge:mstore
 
Project name: mstore
Project version: 0.2.0
Fortran compiler for the host machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
Fortran compiler for the build machine: gfortran (gcc 4.8.5 "GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
Fortran linker for the build machine: gfortran ld.bfd 2.25.1-32
Dependency openmp found: YES 3.1 (cached)
WARNING: Subproject 'mctc-lib' did not override 'mctc-lib' dependency and no variable name specified
Dependency mctc-lib from subproject subprojects/mctc-lib found: NO
Build targets in project: 8
Subproject mstore finished.
 
Adding test "model"
Adding test "ncoord"
Adding test "pbc"
Adding test "wignerseitz"
Build targets in project: 9
Subproject multicharge finished.
 
Adding test "app-version"
Adding test "app-help"
Adding test "app-license"
Adding test "app-citation"
Adding test "app-noargs"
Program tester.py found: YES (/tmp/emerio/dftd4-3.3.0/app/tester.py)
Adding test "app-energy"
Adding test "app-gradient"
Adding test "app-properties"
Adding test "app-pair-analysis"
Program config/install-mod.py found: YES (/tmp/emerio/dftd4-3.3.0/config/install-mod.py)
Program asciidoctor found: NO
Adding test "api-test"
Adding test "ncoord"
Adding test "model"
Adding test "dftd4"
Adding test "pairwise"
Adding test "param"
Adding test "periodic"
Program python3 (cffi) found: YES (/share/apps/python-3.7.7/bin/python3) modules: cffi
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'python-3.7m' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_LIBDIR]: /share/apps/python-3.7.7/lib/pkgconfig
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --modversion python-3.7m` -> 0
3.7
env[PKG_CONFIG_LIBDIR]: /share/apps/python-3.7.7/lib/pkgconfig
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --cflags python-3.7m` -> 0
-I/share/apps/python-3.7.7/include/python3.7m
env[PKG_CONFIG_LIBDIR]: /share/apps/python-3.7.7/lib/pkgconfig
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --libs python-3.7m` -> 0
-L/share/apps/python-3.7.7/lib -lpython3.7m
env[PKG_CONFIG_LIBDIR]: /share/apps/python-3.7.7/lib/pkgconfig
env[PKG_CONFIG_PATH]: /share/apps/OpenBLAS-0.3.10-gcc-4.8.5/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-4.8.5/pkgconfig
Called `/usr/bin/pkg-config --libs python-3.7m` -> 0
-L/share/apps/python-3.7.7/lib -lpython3.7m
Found "python-3.7m" via pkgconfig lookup in LIBPC (/share/apps/python-3.7.7/lib/pkgconfig)
Dependency python found: YES (pkgconfig)
Configuring _libdftd4.h with command
Running command: /usr/bin/gcc -E /tmp/emerio/dftd4-3.3.0/include/dftd4.h
--- stdout ---
# 1 "/tmp/emerio/dftd4-3.3.0/include/dftd4.h"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "/tmp/emerio/dftd4-3.3.0/include/dftd4.h"
# 17 "/tmp/emerio/dftd4-3.3.0/include/dftd4.h"
 
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdbool.h" 1 3 4
# 24 "/tmp/emerio/dftd4-3.3.0/include/dftd4.h" 2
 
typedef struct _dftd4_error* dftd4_error;
 
typedef struct _dftd4_structure* dftd4_structure;
 
typedef struct _dftd4_model* dftd4_model;
 
typedef struct _dftd4_param* dftd4_param;
 
extern int
dftd4_get_version() ;
 
extern dftd4_error
dftd4_new_error() ;
 
extern int
dftd4_check_error(dftd4_error ) ;
 
extern void
dftd4_get_error(dftd4_error ,
                char* ,
                const int* ) ;
 
extern void
dftd4_delete_error(dftd4_error* ) ;
 
extern dftd4_structure
dftd4_new_structure(dftd4_error ,
                    const int ,
                    const int* ,
                    const double* ,
                    const double* ,
                    const double* ,
                    const _Bool* ) ;
 
extern void
dftd4_delete_structure(dftd4_structure* ) ;
 
 
extern void
dftd4_update_structure(dftd4_error ,
                       dftd4_structure ,
                       const double* ,
                       const double* ) ;
 
extern dftd4_model
dftd4_new_d4_model(dftd4_error ,
                   dftd4_structure ) ;
 
extern dftd4_model
dftd4_custom_d4_model(dftd4_error ,
                      dftd4_structure ,
                      double ,
                      double ,
                      double ) ;
 
extern void
dftd4_delete_model(dftd4_model* ) ;
 
extern dftd4_param
dftd4_new_rational_damping(dftd4_error ,
                           double ,
                           double ,
                           double ,
                           double ,
                           double ,
                           double ) ;
 
extern dftd4_param
dftd4_load_rational_damping(dftd4_error ,
                            char* ,
                            _Bool ) ;
 
extern void
dftd4_delete_param(dftd4_param* ) ;
 
extern void
dftd4_get_properties(dftd4_error ,
                     dftd4_structure ,
                     dftd4_model ,
                     double* ,
                     double* ,
                     double* ,
                     double* ) ;
 
 
extern void
dftd4_get_dispersion(dftd4_error ,
                     dftd4_structure ,
                     dftd4_model ,
                     dftd4_param ,
                     double* ,
                     double* ,
                     double* ) ;
 
 
extern void
dftd4_get_pairwise_dispersion(dftd4_error ,
                              dftd4_structure ,
                              dftd4_model ,
                              dftd4_param ,
                              double* ,
                              double* ) ;
 
--- stderr ---
/tmp/emerio/dftd4-3.3.0/include/dftd4.h:17:9: warning: #pragma once in main file [enabled by default]
#pragma once
         ^
Configuring _libdftd4.c with command
Running command: /share/apps/python-3.7.7/bin/python3 /tmp/emerio/dftd4-3.3.0/python/dftd4/../build.py /tmp/emerio/dftd4-3.3.0/_build/python/dftd4/_libdftd4.h _libdftd4
--- stdout ---
generating ./_libdftd4.c
 
--- stderr ---
regenerated: './_libdftd4.c'
 
Build targets in project: 16
 
dftd4 3.3.0
 
  Subprojects
    mctc-lib   : YES
    mstore     : YES 1 warnings
    multicharge: YES 1 warnings
 
Found ninja-1.10.2.git.kitware.jobserver-1 at /share/apps/python-3.7.7/bin/ninja
Running compile:
Working directory:  /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmpwbdc23pc
Command line:  gfortran /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmpwbdc23pc/testfile.f90 -o /tmp/emerio/dftd4-3.3.0/_build/meson-private/tmpwbdc23pc/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 --print-search-dirs
 
Code:
 
Compiler stdout:
install: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/
programs: =/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/bin/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/bin/
libraries: =/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/lib/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/:/lib/x86_64-redhat-linux/4.8.5/:/lib/../lib64/:/usr/lib/x86_64-redhat-linux/4.8.5/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/lib/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../:/lib/:/usr/lib/
 
Compiler stderr:
 
=======================================================================================================================
 
HERE IS INSTALLATION OF DBTD4-3.3.0 USING MESON-0.59.1, GCC-6.5.0 AMD PYTHON-3.7.7:
 
export PATH=/share/apps/gcc-6.5.0/bin:$PATH
export PATH=/share/apps/python-3.7.7-gcc-6.5.0/bin:$PATH
export PATH=/usr/local/cmake-3.9.6/bin:$PATH
export PKG_CONFIG_PATH=/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH=/share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:$PKG_CONFIG_PATH
export CC=gcc
 
tar zxf dftd4-3.3.0.tar.gz
cd dftd4-3.3.0
 
meson setup _build -Dpython=true -Dpython_version=3
 
The Meson build system
Version: 0.59.1
Source dir: /tmp/emerio2/dftd4-3.3.0
Build dir: /tmp/emerio2/dftd4-3.3.0/_build
Build type: native build
Project name: dftd4
Project version: 3.3.0
Fortran compiler for the host machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
Host machine cpu family: x86_64
Host machine cpu: x86_64
C compiler for the host machine: gcc (gcc 6.5.0 "gcc (GCC) 6.5.0")
C linker for the host machine: gcc ld.bfd 2.25.1-32
Run-time dependency OpenMP found: YES 4.5
Found pkg-config: /usr/bin/pkg-config (0.27.1)
Run-time dependency lapack found: YES 3.9.0
Run-time dependency blas found: YES 3.9.0
Found CMake: /usr/local/cmake-3.9.6/bin/cmake (3.9.6)
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Run-time dependency mctc-lib found: NO (tried pkgconfig and cmake)
Cloning into 'mctc-lib'...
remote: Enumerating objects: 4620, done.
remote: Counting objects: 100% (2334/2334), done.
remote: Compressing objects: 100% (378/378), done.
remote: Total 4620 (delta 2115), reused 2125 (delta 1939), pack-reused 2286
Receiving objects: 100% (4620/4620), 1.93 MiB | 0 bytes/s, done.
Resolving deltas: 100% (4117/4117), done.
Note: checking out 'v0.2.3'.
 
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
 
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
 
  git checkout -b new_branch_name
 
HEAD is now at a2f70b0... Release version 0.2.3 (#17)
 
Executing subproject mctc-lib
 
mctc-lib| Project name: mctc-lib
mctc-lib| Project version: 0.2.3
mctc-lib| Fortran compiler for the host machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
mctc-lib| Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
mctc-lib| Dependency openmp found: YES 4.5 (cached)
mctc-lib| Build targets in project: 3
mctc-lib| Subproject mctc-lib finished.
 
Run-time dependency multicharge found: NO (tried pkgconfig and cmake)
Cloning into 'multicharge'...
remote: Enumerating objects: 182, done.
remote: Counting objects: 100% (182/182), done.
remote: Compressing objects: 100% (113/113), done.
remote: Total 182 (delta 92), reused 129 (delta 54), pack-reused 0
Receiving objects: 100% (182/182), 71.21 KiB | 0 bytes/s, done.
Resolving deltas: 100% (92/92), done.
Note: checking out 'v0.1.2'.
 
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
 
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
 
  git checkout -b new_branch_name
 
HEAD is now at dde0d67... Bump release version to 0.1.2 (#12)
 
Executing subproject multicharge
 
multicharge| Project name: multicharge
multicharge| Project version: 0.1.2
multicharge| Fortran compiler for the host machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
multicharge| Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
multicharge| Dependency openmp found: YES 4.5 (cached)
multicharge| Dependency lapack found: YES 3.9.0 (cached)
multicharge| Dependency blas found: YES 3.9.0 (cached)
multicharge| WARNING: Subproject 'mctc-lib' did not override 'mctc-lib' dependency and no variable name specified
multicharge| Dependency mctc-lib from subproject subprojects/mctc-lib found: NO
Cloning into 'mstore'...
remote: Enumerating objects: 143, done.
remote: Counting objects: 100% (143/143), done.
remote: Compressing objects: 100% (87/87), done.
remote: Total 143 (delta 70), reused 110 (delta 49), pack-reused 0
Receiving objects: 100% (143/143), 290.87 KiB | 0 bytes/s, done.
Resolving deltas: 100% (70/70), done.
Note: checking out 'v0.2.0'.
 
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
 
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
 
  git checkout -b new_branch_name
 
HEAD is now at 974fb59... Update dependency handling logic in meson and CMake (#9)
 
Executing subproject multicharge:mstore
 
mstore| Project name: mstore
mstore| Project version: 0.2.0
mstore| Fortran compiler for the host machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
mstore| Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
mstore| Dependency openmp found: YES 4.5 (cached)
mstore| WARNING: Subproject 'mctc-lib' did not override 'mctc-lib' dependency and no variable name specified
mstore| Dependency mctc-lib from subproject subprojects/mctc-lib found: NO
mstore| Build targets in project: 8
mstore| Subproject mstore finished.
 
multicharge| Build targets in project: 9
multicharge| Subproject multicharge finished.
 
Program tester.py found: YES (/tmp/emerio2/dftd4-3.3.0/app/tester.py)
Program config/install-mod.py found: YES (/tmp/emerio2/dftd4-3.3.0/config/install-mod.py)
Program asciidoctor found: NO
Program python3 (cffi) found: YES (/share/apps/python-3.7.7-gcc-6.5.0/bin/python3) modules: cffi
Dependency python found: YES (pkgconfig)
Configuring _libdftd4.h with command
Configuring _libdftd4.c with command
Build targets in project: 16
 
dftd4 3.3.0
 
  Subprojects
    mctc-lib   : YES
    mstore     : YES 1 warnings
    multicharge: YES 1 warnings
 
Found ninja-1.10.2.git.kitware.jobserver-1 at /share/apps/python-3.7.7-gcc-6.5.0/bin/ninja
 
 
==============================
meson test -C _build --print-errorlogs
 
ninja: Entering directory `/tmp/emerio2/dftd4-3.3.0/_build'
[16/133] Compiling Fortran object subproject...ib/libmctc-lib.a.p/src_mctc_env_system.f90.
../subprojects/mctc-lib/src/mctc/env/system.f90:120:39:
 
    character(len=:), allocatable :: tmp
                                       1
Warning: Unused variable ‘tmp’ declared at (1) [-Wunused-variable]
[20/133] Compiling Fortran object subproject...lib/libmctc-lib.a.p/src_mctc_io_resize.f90.
../subprojects/mctc-lib/src/mctc/io/resize.f90:85:0:
 
    character(len=:), allocatable :: tmp(:)
 
Warning: ‘.tmp’ is used uninitialized in this function [-Wuninitialized]
[33/133] Compiling Fortran object subproject...bmctc-lib.a.p/src_mctc_io_write_ctfile.f90.
../subprojects/mctc-lib/src/mctc/io/write/ctfile.f90:65:37:
 
    integer :: iatom, ibond, iatoms(3), list12(12)
                                     1
Warning: Unused variable ‘iatoms’ declared at (1) [-Wunused-variable]
../subprojects/mctc-lib/src/mctc/io/write/ctfile.f90:34:40:
 
    character(len=:), allocatable :: line
                                        1
Warning: Unused variable ‘line’ declared at (1) [-Wunused-variable]
[39/133] Compiling Fortran object subproject...ctc-lib.a.p/src_mctc_io_read_turbomole.f90.
../subprojects/mctc-lib/src/mctc/io/read/turbomole.f90:110:0:
 
             lattice_string = ''
 
Warning: ‘.lattice_string’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[40/133] Compiling Fortran object subproject...c-lib/libmctc-lib.a.p/src_mctc_io_read.f90.
FAILED: subprojects/mctc-lib/libmctc-lib.a.p/src_mctc_io_read.f90.o subprojects/mctc-lib/libmctc-lib.a.p/mctc_io_read.mod
gfortran -Isubprojects/mctc-lib/libmctc-lib.a.p -Isubprojects/mctc-lib -I../subprojects/mctc-lib -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -O2 -g -ffree-line-length-none -fbacktrace -fPIC -fopenmp -Jsubprojects/mctc-lib/libmctc-lib.a.p -o subprojects/mctc-lib/libmctc-lib.a.p/src_mctc_io_read.f90.o -c ../subprojects/mctc-lib/src/mctc/io/read.f90
../subprojects/mctc-lib/src/mctc/io/read.f90:115:3:
 
    procedure(structure_reader), pointer :: reader
   1
Error: Unclassifiable statement at (1)
../subprojects/mctc-lib/src/mctc/io/read.f90:132:3:
 
    procedure(structure_reader), pointer, intent(out) :: reader
   1
Error: Unclassifiable statement at (1)
../subprojects/mctc-lib/src/mctc/io/read.f90:141:24:
 
       reader => read_xyz
                        1
Error: Unexpected use of subroutine name ‘read_xyz’ at (1)
../subprojects/mctc-lib/src/mctc/io/read.f90:144:28:
 
       reader => read_molfile
                            1
Error: Unexpected use of subroutine name ‘read_molfile’ at (1)
../subprojects/mctc-lib/src/mctc/io/read.f90:147:24:
 
       reader => read_pdb
                        1
Error: Unexpected use of subroutine name ‘read_pdb’ at (1)
../subprojects/mctc-lib/src/mctc/io/read.f90:150:30:
 
       reader => read_genformat
                              1
Error: Unexpected use of subroutine name ‘read_genformat’ at (1)
../subprojects/mctc-lib/src/mctc/io/read.f90:153:24:
 
       reader => read_sdf
                        1
Error: Unexpected use of subroutine name ‘read_sdf’ at (1)
../subprojects/mctc-lib/src/mctc/io/read.f90:156:25:
 
       reader => read_vasp
                         1
Error: Unexpected use of subroutine name ‘read_vasp’ at (1)
../subprojects/mctc-lib/src/mctc/io/read.f90:159:26:
 
       reader => read_coord
                          1
Error: Unexpected use of subroutine name ‘read_coord’ at (1)
../subprojects/mctc-lib/src/mctc/io/read.f90:162:38:
 
       reader => read_gaussian_external
                                      1
Error: Unexpected use of subroutine name ‘read_gaussian_external’ at (1)
../subprojects/mctc-lib/src/mctc/io/read.f90:129:38:
 
subroutine get_structure_reader(reader, ftype)
                                      1
Error: Symbol ‘reader’ at (1) has no IMPLICIT type
../subprojects/mctc-lib/src/mctc/io/read.f90:117:29:
 
    call get_structure_reader(reader, ftype)
                             1
Error: Invalid procedure argument at (1)
../subprojects/mctc-lib/src/mctc/io/read.f90:118:23:
 
    if (.not.associated(reader)) then
                       1
Error: ‘pointer’ argument of ‘associated’ intrinsic at (1) must be a POINTER
ninja: build stopped: subcommand failed.
Could not rebuild /tmp/emerio2/dftd4-3.3.0/_build
 
 
=====================================================
cat /tmp/emerio2/dftd4-3.3.0/_build/meson-logs/meson-log.txt
 
Build started at 2021-08-24T15:43:27.958426
Main binary: /share/apps/python-3.7.7-gcc-6.5.0/bin/python3.7
Build Options: -Dpython=true -Dpython_version=3
Python system: Linux
The Meson build system
Version: 0.59.1
Source dir: /tmp/emerio2/dftd4-3.3.0
Build dir: /tmp/emerio2/dftd4-3.3.0/_build
Build type: native build
Project name: dftd4
Project version: 3.3.0
Fortran compiler for the host machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
Fortran compiler for the build machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
Fortran linker for the build machine: gfortran ld.bfd 2.25.1-32
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Sanity testing C compiler: gcc
Is cross compiler: False.
Sanity check compiler command line: gcc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:
 
-----
Sanity check compile stderr:
 
-----
Running test binary command: /tmp/emerio2/dftd4-3.3.0/_build/meson-private/sanitycheckc.exe
C compiler for the host machine: gcc (gcc 6.5.0 "gcc (GCC) 6.5.0")
C linker for the host machine: gcc ld.bfd 2.25.1-32
Running compile:
Working directory:  /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmp80ituf0d
Command line:  gcc /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmp80ituf0d/testfile.c -E -P -D_FILE_OFFSET_BITS=64 -P -O0 -fopenmp
 
Code:
 
        #ifndef _OPENMP
        # define _OPENMP
        #endif
        "MESON_GET_DEFINE_DELIMITER"
_OPENMP
Compiler stdout:
         "MESON_GET_DEFINE_DELIMITER"
201511
 
Compiler stderr:
 
Running compile:
Working directory:  /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmphqazbja9
Command line:  gcc /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmphqazbja9/testfile.c -E -P -D_FILE_OFFSET_BITS=64 -P -O0
 
Code:
 
        #ifdef __has_include
         #if !__has_include("omp.h")
          #error "Header 'omp.h' could not be found"
         #endif
        #else
         #include <omp.h>
        #endif
Compiler stdout:
 
Compiler stderr:
 
Run-time dependency OpenMP found: YES 4.5
Pkg-config binary for MachineChoice.HOST is not cached.
Pkg-config binary missing from cross or native file, or env var undefined.
Trying a default Pkg-config fallback at pkg-config
Found pkg-config: /usr/bin/pkg-config (0.27.1)
Determining dependency 'lapack' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --modversion lapack` -> 0
3.9.0
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --cflags lapack` -> 0
 
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
Called `/usr/bin/pkg-config --libs lapack` -> 0
-L/share/apps/lapack-3.9.0-gcc-6.5.0 -llapack
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --libs lapack` -> 0
-L/share/apps/lapack-3.9.0-gcc-6.5.0 -llapack
Running compile:
Working directory:  /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmpom5dnj__
Command line:  gcc /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmpom5dnj__/testfile.c -o /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmpom5dnj__/output.exe -D_FILE_OFFSET_BITS=64 -O0
 
Code:
#include<stdio.h>
 
        int main(void) {
            printf("%ld\n", (long)(sizeof(void *)));
            return 0;
        };
Compiler stdout:
 
Compiler stderr:
 
Program stdout:
 
8
 
Program stderr:
 
Running compile:
Working directory:  /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmp0vz7b3xn
Command line:  gcc /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmp0vz7b3xn/testfile.c -o /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmp0vz7b3xn/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 --print-search-dirs
 
Code:
 
Compiler stdout:
install: /share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/
programs: =/share/apps/gcc-6.5.0/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/libexec/gcc/x86_64-pc-linux-gnu/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../x86_64-pc-linux-gnu/bin/
libraries: =/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../x86_64-pc-linux-gnu/lib/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../x86_64-pc-linux-gnu/lib/../lib64/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../lib64/:/lib/x86_64-pc-linux-gnu/6.5.0/:/lib/../lib64/:/usr/lib/x86_64-pc-linux-gnu/6.5.0/:/usr/lib/../lib64/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../x86_64-pc-linux-gnu/lib/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../:/lib/:/usr/lib/
 
Compiler stderr:
 
Run-time dependency lapack found: YES 3.9.0
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'blas' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --modversion blas` -> 0
3.9.0
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --cflags blas` -> 0
 
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
Called `/usr/bin/pkg-config --libs blas` -> 0
-L/share/apps/lapack-3.9.0-gcc-6.5.0 -lblas
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --libs blas` -> 0
-L/share/apps/lapack-3.9.0-gcc-6.5.0 -lblas
Run-time dependency blas found: YES 3.9.0
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'mctc-lib' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --modversion mctc-lib` -> 1
 
CMake binary for 1 is not cached
CMake binary missing from cross or native file, or env var undefined.
Trying a default CMake fallback at cmake
Found CMake: /usr/local/cmake-3.9.6/bin/cmake (3.9.6)
Extracting basic cmake information
CMake Toolchain: Calling CMake once to generate the compiler state
Calling CMake (['/usr/local/cmake-3.9.6/bin/cmake']) in /tmp/emerio2/dftd4-3.3.0/_build/meson-private/__CMake_compiler_info__ with:
  - "--trace"
  - "--trace-expand"
  - "--no-warn-unused-cli"
  - "-G"
  - "Ninja"
  - "-DCMAKE_TOOLCHAIN_FILE=/tmp/emerio2/dftd4-3.3.0/_build/meson-private/__CMake_compiler_info__/CMakeMesonTempToolchainFile.cmake"
  - "."
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Try CMake generator: auto
Calling CMake (['/usr/local/cmake-3.9.6/bin/cmake']) in /tmp/emerio2/dftd4-3.3.0/_build/meson-private/cmake_mctc-lib with:
  - "--trace"
  - "--trace-expand"
  - "--no-warn-unused-cli"
  - "-DCMAKE_TOOLCHAIN_FILE=/tmp/emerio2/dftd4-3.3.0/_build/meson-private/cmake_mctc-lib/CMakeMesonToolchainFile.cmake"
  - "."
  -- Module search paths:    ['/', '/opt', '/usr', '/usr/local', '/usr/local/cmake-3.9.6']
  -- CMake root:             /usr/local/cmake-3.9.6/share/cmake-3.9
  -- CMake architectures:    []
  -- CMake lib search paths: ['lib', 'lib32', 'lib64', 'libx32', 'share']
Preliminary CMake check failed. Aborting.
Run-time dependency mctc-lib found: NO (tried pkgconfig and cmake)
 
Executing subproject mctc-lib
 
Project name: mctc-lib
Project version: 0.2.3
Fortran compiler for the host machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
Fortran compiler for the build machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
Fortran linker for the build machine: gfortran ld.bfd 2.25.1-32
Dependency openmp found: YES 4.5 (cached)
Adding test "math"
Adding test "read"
Adding test "read-ctfile"
Adding test "read-gaussian"
Adding test "read-genformat"
Adding test "read-pdb"
Adding test "read-turbomole"
Adding test "read-vasp"
Adding test "read-xyz"
Adding test "symbols"
Adding test "write"
Adding test "write-ctfile"
Adding test "write-gaussian"
Adding test "write-genformat"
Adding test "write-pdb"
Adding test "write-turbomole"
Adding test "write-vasp"
Adding test "write-xyz"
Build targets in project: 3
Subproject mctc-lib finished.
 
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'multicharge' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --modversion multicharge` -> 1
 
CMake binary for 1 is cached.
Preliminary CMake check failed. Aborting.
Run-time dependency multicharge found: NO (tried pkgconfig and cmake)
 
Executing subproject multicharge
 
Project name: multicharge
Project version: 0.1.2
Fortran compiler for the host machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
Fortran compiler for the build machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
Fortran linker for the build machine: gfortran ld.bfd 2.25.1-32
Dependency openmp found: YES 4.5 (cached)
Dependency lapack found: YES 3.9.0 (cached)
Dependency blas found: YES 3.9.0 (cached)
WARNING: Subproject 'mctc-lib' did not override 'mctc-lib' dependency and no variable name specified
Dependency mctc-lib from subproject subprojects/mctc-lib found: NO
 
Executing subproject multicharge:mstore
 
Project name: mstore
Project version: 0.2.0
Fortran compiler for the host machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
Fortran linker for the host machine: gfortran ld.bfd 2.25.1-32
Fortran compiler for the build machine: gfortran (gcc 6.5.0 "GNU Fortran (GCC) 6.5.0")
Fortran linker for the build machine: gfortran ld.bfd 2.25.1-32
Dependency openmp found: YES 4.5 (cached)
WARNING: Subproject 'mctc-lib' did not override 'mctc-lib' dependency and no variable name specified
Dependency mctc-lib from subproject subprojects/mctc-lib found: NO
Build targets in project: 8
Subproject mstore finished.
 
Adding test "model"
Adding test "ncoord"
Adding test "pbc"
Adding test "wignerseitz"
Build targets in project: 9
Subproject multicharge finished.
 
Adding test "app-version"
Adding test "app-help"
Adding test "app-license"
Adding test "app-citation"
Adding test "app-noargs"
Program tester.py found: YES (/tmp/emerio2/dftd4-3.3.0/app/tester.py)
Adding test "app-energy"
Adding test "app-gradient"
Adding test "app-properties"
Adding test "app-pair-analysis"
Program config/install-mod.py found: YES (/tmp/emerio2/dftd4-3.3.0/config/install-mod.py)
Program asciidoctor found: NO
Adding test "api-test"
Adding test "ncoord"
Adding test "model"
Adding test "dftd4"
Adding test "pairwise"
Adding test "param"
Adding test "periodic"
Program python3 (cffi) found: YES (/share/apps/python-3.7.7-gcc-6.5.0/bin/python3) modules: cffi
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'python-3.7m' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_LIBDIR]: /share/apps/python-3.7.7-gcc-6.5.0/lib/pkgconfig
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --modversion python-3.7m` -> 0
3.7
env[PKG_CONFIG_LIBDIR]: /share/apps/python-3.7.7-gcc-6.5.0/lib/pkgconfig
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --cflags python-3.7m` -> 0
-I/share/apps/python-3.7.7-gcc-6.5.0/include/python3.7m
env[PKG_CONFIG_LIBDIR]: /share/apps/python-3.7.7-gcc-6.5.0/lib/pkgconfig
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --libs python-3.7m` -> 0
-L/share/apps/python-3.7.7-gcc-6.5.0/lib -lpython3.7m
env[PKG_CONFIG_LIBDIR]: /share/apps/python-3.7.7-gcc-6.5.0/lib/pkgconfig
env[PKG_CONFIG_PATH]: /share/apps/openblas-0.3.10-gcc-6.5.0/lib/pkgconfig:/share/apps/lapack-3.9.0-gcc-6.5.0/pkgconfig
Called `/usr/bin/pkg-config --libs python-3.7m` -> 0
-L/share/apps/python-3.7.7-gcc-6.5.0/lib -lpython3.7m
Found "python-3.7m" via pkgconfig lookup in LIBPC (/share/apps/python-3.7.7-gcc-6.5.0/lib/pkgconfig)
Dependency python found: YES (pkgconfig)
Configuring _libdftd4.h with command
Running command: /share/apps/gcc-6.5.0/bin/gcc -E /tmp/emerio2/dftd4-3.3.0/include/dftd4.h
--- stdout ---
# 1 "/tmp/emerio2/dftd4-3.3.0/include/dftd4.h"
# 1 "<built-in>"
# 1 "<command-line>"
# 31 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "<command-line>" 2
# 1 "/tmp/emerio2/dftd4-3.3.0/include/dftd4.h"
# 17 "/tmp/emerio2/dftd4-3.3.0/include/dftd4.h"
 
# 1 "/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/include/stdbool.h" 1 3 4
# 24 "/tmp/emerio2/dftd4-3.3.0/include/dftd4.h" 2
 
typedef struct _dftd4_error* dftd4_error;
 
typedef struct _dftd4_structure* dftd4_structure;
 
typedef struct _dftd4_model* dftd4_model;
 
typedef struct _dftd4_param* dftd4_param;
 
extern int
dftd4_get_version() ;
 
extern dftd4_error
dftd4_new_error() ;
 
extern int
dftd4_check_error(dftd4_error ) ;
 
extern void
dftd4_get_error(dftd4_error ,
                char* ,
                const int* ) ;
 
 
extern void
dftd4_delete_error(dftd4_error* ) ;
 
extern dftd4_structure
dftd4_new_structure(dftd4_error ,
                    const int ,
                    const int* ,
                    const double* ,
                    const double* ,
                    const double* ,
                    const
# 84 "/tmp/emerio2/dftd4-3.3.0/include/dftd4.h" 3 4
                         _Bool
# 84 "/tmp/emerio2/dftd4-3.3.0/include/dftd4.h"
                             * ) ;
 
extern void
dftd4_delete_structure(dftd4_structure* ) ;
 
extern void
dftd4_update_structure(dftd4_error ,
                       dftd4_structure ,
                       const double* ,
                       const double* ) ;
 
extern dftd4_model
dftd4_new_d4_model(dftd4_error ,
                   dftd4_structure ) ;
 
extern dftd4_model
dftd4_custom_d4_model(dftd4_error ,
                      dftd4_structure ,
                      double ,
                      double ,
                      double ) ;
 
extern void
dftd4_delete_model(dftd4_model* ) ;
 
extern dftd4_param
dftd4_new_rational_damping(dftd4_error ,
                           double ,
                           double ,
                           double ,
                           double ,
                           double ,
                           double ) ;
 
extern dftd4_param
dftd4_load_rational_damping(dftd4_error ,
                            char* ,
 
# 136 "/tmp/emerio2/dftd4-3.3.0/include/dftd4.h" 3 4
                           _Bool
# 136 "/tmp/emerio2/dftd4-3.3.0/include/dftd4.h"
                                         ) ;
 
extern void
dftd4_delete_param(dftd4_param* ) ;
 
extern void
dftd4_get_properties(dftd4_error ,
                     dftd4_structure ,
                     dftd4_model ,
                     double* ,
                     double* ,
                     double* ,
                     double* ) ;
 
extern void
dftd4_get_dispersion(dftd4_error ,
                     dftd4_structure ,
                     dftd4_model ,
                     dftd4_param ,
                     double* ,
                     double* ,
                     double* ) ;
 
extern void
dftd4_get_pairwise_dispersion(dftd4_error ,
                              dftd4_structure ,
                              dftd4_model ,
                              dftd4_param ,
                              double* ,
                              double* ) ;
 
--- stderr ---
/tmp/emerio2/dftd4-3.3.0/include/dftd4.h:17:9: warning: #pragma once in main file
#pragma once
         ^~~~
 
Configuring _libdftd4.c with command
Running command: /share/apps/python-3.7.7-gcc-6.5.0/bin/python3 /tmp/emerio2/dftd4-3.3.0/python/dftd4/../build.py /tmp/emerio2/dftd4-3.3.0/_build/python/dftd4/_libdftd4.h _libdftd4
--- stdout ---
generating ./_libdftd4.c
 
--- stderr ---
regenerated: './_libdftd4.c'
 
Build targets in project: 16
 
dftd4 3.3.0
 
  Subprojects
    mctc-lib   : YES
    mstore     : YES 1 warnings
    multicharge: YES 1 warnings
 
Found ninja-1.10.2.git.kitware.jobserver-1 at /share/apps/python-3.7.7-gcc-6.5.0/bin/ninja
Running compile:
Working directory:  /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmpkv5ns1gu
Command line:  gfortran /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmpkv5ns1gu/testfile.f90 -o /tmp/emerio2/dftd4-3.3.0/_build/meson-private/tmpkv5ns1gu/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 --print-search-dirs
 
Code:
 
Compiler stdout:
install: /share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/
programs: =/share/apps/gcc-6.5.0/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/libexec/gcc/x86_64-pc-linux-gnu/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../x86_64-pc-linux-gnu/bin/
libraries: =/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../x86_64-pc-linux-gnu/lib/x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../x86_64-pc-linux-gnu/lib/../lib64/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../x86_64-pc-linux-gnu/6.5.0/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../lib64/:/lib/x86_64-pc-linux-gnu/6.5.0/:/lib/../lib64/:/usr/lib/x86_64-pc-linux-gnu/6.5.0/:/usr/lib/../lib64/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../x86_64-pc-linux-gnu/lib/:/share/apps/gcc-6.5.0/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../:/lib/:/usr/lib/
 
Compiler stderr:

PyPI distribution

Is your feature request related to a problem? Please describe.
Would be cool to pip install the Python API of dftd4. The package for PyPI would probably be named just dftd4 and only provide the Python API but not the Fortran and C API.

This would be helpful for platforms that are not available on conda-forge for various reasons (OSX with CFFI is still shaky).

Describe the solution you'd like
Dependency management of external libraries is awful with pip which is reason for using conda in the first place. To make the distribution reliable we have to:

  • build without meson (source distributions have to compile cleanly)
  • link dftd4 statically into the extension module
  • find a way to ensure the Fortran runtime and the LAPACK / BLAS libraries are around

Describe alternatives you've considered
conda is the goto package manager for this kind of software distributions, having no PyPI package is not really a downside IMO.

Additional context
Distribution should be automated via GH actions to allow at least Linux and OSX compiled versions, also every Python version requires its own upload (quite a lot).

Compile error with Intel 2019

Same error as grimme-lab/xtb#107, when compiling with icc (ICC) 19.1.0.166 20191121:

[39/65] Compiling Fortran object 'dftd4@sta/source_dftd4.f90.o'.
FAILED: dftd4@sta/source_dftd4.f90.o
ifort -Idftd4@sta -I. -I.. -I../include -D_FILE_OFFSET_BITS=64 -warn general -warn truncated_source -g -axAVX -traceback -stand f08 -check bounds -qopenmp -fPIC -module dftd4@sta -o 'dftd4@sta/source_dftd4.f90.o' -c ../source/dftd4.f90
../source/dftd4.f90(1239): error #6752: Since the OpenMP* DEFAULT(NONE) clause applies, the PRIVATE, SHARED, REDUCTION, FIRSTPRIVATE, or LASTPRIVATE attribute must be explicitly specified for every variable. [TX]
do concurrent(tx = -rep(1):rep(1), &
--------------------^
../source/dftd4.f90(1240): error #6752: Since the OpenMP* DEFAULT(NONE) clause applies, the PRIVATE, SHARED, REDUCTION, FIRSTPRIVATE, or LASTPRIVATE attribute must be explicitly specified for every variable. [TY]
& ty = -rep(2):rep(2), &
--------------------^
../source/dftd4.f90(1241): error #6752: Since the OpenMP* DEFAULT(NONE) clause applies, the PRIVATE, SHARED, REDUCTION, FIRSTPRIVATE, or LASTPRIVATE attribute must be explicitly specified for every variable. [TZ]
& tz = -rep(3):rep(3))
--------------------^
../source/dftd4.f90(1270): error #6752: Since the OpenMP* DEFAULT(NONE) clause applies, the PRIVATE, SHARED, REDUCTION, FIRSTPRIVATE, or LASTPRIVATE attribute must be explicitly specified for every variable. [TX]
do concurrent(tx = -rep(1):rep(1), &
-----------------------^
../source/dftd4.f90(1271): error #6752: Since the OpenMP* DEFAULT(NONE) clause applies, the PRIVATE, SHARED, REDUCTION, FIRSTPRIVATE, or LASTPRIVATE attribute must be explicitly specified for every variable. [TY]
& ty = -rep(2):rep(2), &
-----------------------^
../source/dftd4.f90(1272): error #6752: Since the OpenMP* DEFAULT(NONE) clause applies, the PRIVATE, SHARED, REDUCTION, FIRSTPRIVATE, or LASTPRIVATE attribute must be explicitly specified for every variable. [TZ]
& tz = -rep(3):rep(3))
-----------------------^
compilation aborted for ../source/dftd4.f90 (code 1)

Allow more transparent modification of damping parameters

Is your feature request related to a problem? Please describe.
API objects handling damping parameters are currently opaque, i.e. once created it is unknown which damping parameters they actually contain.

The API allows two ways to construct damping parameters right now, once via a method name or via a complete set of damping parameters (s6, s8, s9, a1, a2, alp). The Python API is lumping the two ways together and implements an ad hoc selection here, preferring the method name over custom, maybe incomplete, parameters:

def __init__(self, *, method=None, **kwargs):
"""Create new damping parameter from method name or explicit data"""
if method is not None:
_method = _ffi.new("char[]", method.encode())
self._param = load_rational_damping(
_method,
kwargs.get("s9", 1.0) > 0.0,
)
else:
try:
self._param = new_rational_damping(
kwargs.get("s6", 1.0),
kwargs["s8"],
kwargs.get("s9", 1.0),
kwargs["a1"],
kwargs["a2"],
kwargs.get("alp", 16.0),
)
except KeyError as e:
raise RuntimeError("Constructor requires argument for " + str(e))

Describe the solution you'd like
Not sure, allow to query the object?

Describe alternatives you've considered
Make the object completely transparent (bind(C) derived type).

Additional context
The API object for the damping parameters must never be partially constructed, i.e. only containing some damping parameters and not all. Also, there is little sense in requesting a method and overwriting its s8 parameter blindly, in this case the user is better aware of all damping parameters and has to take full responsibility for constructing the API object.

AUR repo prevents recursive clone

Describe the bug
A clear and concise description of what the bug is.
General fyi that recursive clones not succeeding. I only noticed because conda-build does recursive clone by default. Not a blocker.

To Reproduce
Steps to reproduce the behaviour:

> git clone --recursive https://github.com/dftd4/dftd4.git
Cloning into 'dftd4'...
remote: Enumerating objects: 10663, done.
remote: Counting objects: 100% (4059/4059), done.
remote: Compressing objects: 100% (482/482), done.
remote: Total 10663 (delta 3815), reused 3777 (delta 3575), pack-reused 6604
Receiving objects: 100% (10663/10663), 3.96 MiB | 0 bytes/s, done.
Resolving deltas: 100% (9728/9728), done.
Submodule 'assets/aur/dftd4' (https://aur.archlinux.org/dftd4.git) registered for path 'assets/aur/dftd4'
Submodule 'assets/aur/dftd4-git' (https://aur.archlinux.org/dftd4-git.git) registered for path 'assets/aur/dftd4-git'
Cloning into 'assets/aur/dftd4'...
fatal: unable to access 'https://aur.archlinux.org/dftd4.git/': The certificate issuer's certificate has expired.  Check your system date and time.
Clone of 'https://aur.archlinux.org/dftd4.git' into submodule path 'assets/aur/dftd4' failed

Building with OpenBLAS/BLIS

Currently dftd4 cannot be build against OpenBLAS/BLIS since it forces either:

  1. MKL, or
  2. Reference BLAS/LAPACK libraries

Of course one can symlink the libraries, but that is bad practice.

Some kind of way to tell meson that the libraries are present (either via an environment variable, or an option) would be really helpful!

Document availability of CMake build system

CMake is available as build system for dftd4 and should be documented.

The standard workflow for building with CMake should be sufficient (configure, build, test, install):

cmake -B _build -G Ninja -DCMAKE_INSTALL_PREFIX=$HOME/.local
cmake --build _build
ctest --test-dir build --parallel --output-on-failure
cmake --install _build

Distribute DFT-D4 on conda-forge

Is your feature request related to a problem? Please describe.
dftd4 is currently only distribute via GH releases. Especially the Python-API is inconvenient to access this way which might hinder integration in other quantum chemistry packages.

Describe the solution you'd like
Deploy dftd4 to conda-forge.

Additional context
Necessary for MolSSI/QCEngine#174

Compatibility module with v2.5 API

Evaluate a compatibility module to allow using the 3.0 functionality with the API of version 2.5, this is primarily interesting for the C API and the ctypes Python API. Reproducing the Fortran API will be very tedious and probably not possible.

Better geometry input parser for dftd4

Might have caused #30

dftd4 uses the original parser from xtb, which has a strong preference for Turbomole coordinate files and also partly parses the file before deciding which format it is. Also VASP input is only read for the case sensitive extension .vasp or .POSCAR.

compilation warnings with ifort

More of an optimization than a bug, I guess if possible some reordering to have all the wp first would avoid this

class_param.f90(36): warning #6379: The structure contains one or more misaligned fields.   [DFTD_PARAMETER]
class_set.f90(32): warning #6380: The structure length is not a multiple of its largest element; could create misalignments for arrays of this type.   [DFTD_OPTIONS]

Cc: error: unrecognized command line option ‘-qopenmp’ while compiling dftd4-python with meson

Dear developers,

I am trying to compile dftd4-python by meson using the command:
meson setup _build -Dpython_version=3 -Dfortran_link_args=-qopenmp

the output is:

Using 'PKG_CONFIG_PATH' from environment with value: '/home/gp/tools/dftd4-3.3.0/lib/pkgconfig'
Using 'PKG_CONFIG_PATH' from environment with value: '/home/gp/tools/dftd4-3.3.0/lib/pkgconfig'
The Meson build system
Version: 0.56.0
Source dir: /home/gp/Music/dftd4-3.3.0/python
Build dir: /home/gp/Music/dftd4-3.3.0/python/_build
Build type: native build
Project name: dftd4-python
Project version: undefined
C compiler for the host machine: cc (gcc 9.3.0 "cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
C linker for the host machine: cc ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Using 'PKG_CONFIG_PATH' from environment with value: '/home/gp/tools/dftd4-3.3.0/lib/pkgconfig'
Run-time dependency dftd4 found: YES 3.3.0
Program python3 (cffi) found: YES (/home/gp/anaconda3/bin/python3) modules: cffi
Dependency python found: YES (pkgconfig)
Configuring _libdftd4.h with command
Configuring _libdftd4.c with command
Build targets in project: 2

Found ninja-1.10.0.git.kitware.jobserver-1 at /home/gp/anaconda3/bin/ninja

Then I typed:
meson compile -C _build

The output is:

Found runner: ['/home/gp/anaconda3/bin/ninja']
ninja: Entering directory `build'
[1/3] Compiling C object dftd4/lib_libdftd4.a.p/meson-generated
.._libdftd4.c.o
FAILED: dftd4/lib_libdftd4.a.p/meson-generated
.._libdftd4.c.o
cc -Idftd4/lib_libdftd4.a.p -Idftd4 -I../dftd4 -I/home/gp/tools/dftd4-3.3.0/include -I/home/gp/tools/dftd4-3.3.0/include/dftd4/intel-19.1.3.304 -I/home/gp/anaconda3/include/python3.7m -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -fPIC -qopenmp -MD -MQ dftd4/lib_libdftd4.a.p/meson-generated
.._libdftd4.c.o -MF dftd4/lib_libdftd4.a.p/meson-generated.._libdftd4.c.o.d -o dftd4/lib_libdftd4.a.p/meson-generated..__libdftd4.c.o -c dftd4/_libdftd4.c
cc: error: unrecognized command line option ‘-qopenmp’; did you mean ‘-fopenmp’?
ninja: build stopped: subcommand failed.

How can I resolve the ‘-qopenmp’ option problem?

pairwise atomic analysis

Is your feature request related to a problem? Please describe.
The Sherrill group has made use of the pairwise atomic analysis that can be got from dftd3 -anal. Can we access this in dftd4?

 analysis of pair-wise terms (in kcal/mol)
pair  atoms         C6              C8            E6       E8       Edisp
   1   2    6  6    0.256732D+02    0.742514D+03  -0.1703  -0.0854  -0.25566
   1   3    6  1    0.889494D+01    0.166318D+03  -0.0896  -0.0333  -0.12288
   1   4    6  1    0.889494D+01    0.166318D+03  -0.0896  -0.0333  -0.12288
...

Describe the solution you'd like
For our purposes, having the (nat, nat) array of the rightmost column in Hartrees be stored in QCSchema at atomic_result.extras["qcvars"]["PAIRWISE DISPERSION CORRECTION ANALYSIS"] would be ideal. (Analogous dftd3 processing https://github.com/MolSSI/QCEngine/blob/master/qcengine/programs/dftd3.py#L196-L209). But we'd be happy with any means or format of access.

@jeffschriber

Documentation of Python API

The documentation of the Python API is currently not hosted anywhere. It could either be deployed along with the GH actions workflow or hosted separately at readthedocs.

Thanks to @hoelzerC for bringing this issue up.

Compilation error.

I am trying to install dftd4 in our cluster. I am getting the following error -
[bikashp@kalinga chk2]$ FC=ifort meson setup build
The Meson build system
Version: 0.55.1
Source dir: /storage/home/bikashp/Code/chk2
Build dir: /storage/home/bikashp/Code/chk2/build
Build type: native build
Using 'PKG_CONFIG_PATH' from environment with value: '/apps/intel_2018/compilers_and_libraries_2018.3.222/linux/mkl/bin/pkgconfig'
Using 'PKG_CONFIG_PATH' from environment with value: '/apps/intel_2018/compilers_and_libraries_2018.3.222/linux/mkl/bin/pkgconfig'
Project name: dftd4
Project version: 2.5.0
Using 'FC' from environment with value: 'ifort'
Using 'FC' from environment with value: 'ifort'
Fortran compiler for the host machine: ifort (intel 18.0.3 "ifort (IFORT) 18.0.3 20180410")
Fortran linker for the host machine: ifort ld.bfd 2.23.52.0.1-55
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program git found: YES
Program date found: YES
Program whoami found: YES
Program hostname found: YES
Configuring dftd4_version.fh using configuration
C++ compiler for the host machine: c++ (gcc 4.8.5 "c++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)")
C++ linker for the host machine: c++ ld.bfd 2.23.52.0.1-55
meson.build:45: WARNING: Consider using the built-in option for language standard version instead of using "-std=c++11".
C compiler for the host machine: cc (gcc 4.8.5 "cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)")
C linker for the host machine: cc ld.bfd 2.23.52.0.1-55
meson.build:55: WARNING: Consider using the built-in option for language standard version instead of using "-std=c11".
Library pthread found: YES
Library m found: YES
Library dl found: YES
Library mkl_intel_lp64 found: YES
Library mkl_intel_thread found: YES
Library mkl_core found: YES
Library iomp5 found: YES
Library mkl_rt found: YES
Run-time dependency threads found: YES
Program a2x found: NO
Program mypy found: NO
Program pytest found: YES
Program pylint found: YES
C++ compiler for the host machine: c++ (gcc 4.8.5 "c++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)")
C++ linker for the host machine: c++ ld.bfd 2.23.52.0.1-55
C compiler for the host machine: cc (gcc 4.8.5 "cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)")
C linker for the host machine: cc ld.bfd 2.23.52.0.1-55
Build targets in project: 6

Found ninja-1.10.1 at /apps/python/3.6/envs/dftd4/bin/ninja
(dftd4) [bikashp@kalinga chk2]$ ninja -C build
ninja: Entering directory `build'
[9/65] Compiling Fortran object libdftd4.a.p/source_class_param.f90.o
../source/class_param.f90(36): warning #6379: The structure contains one or more misaligned fields. [DFTD_PARAMETER]
type :: dftd_parameter
-----------^
[23/65] Compiling Fortran object libdftd4.a.p/source_class_set.f90.o
../source/class_set.f90(32): warning #6380: The structure length is not a multiple of its largest element; could create misalignments for arrays of this type. [DFTD_OPTIONS]
type :: dftd_options
-----------^
[64/65] Linking target dftd4
FAILED: dftd4
ifort -o dftd4 dftd4.p/source_program_dftd.f90.o -Wl,--as-needed -Wl,--no-undefined -static -qopenmp -Wl,--start-group libdftd4.a -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl -Wl,--end-group -pthread
ifort: command line warning #10418: option -reentrancy=threaded requires pthread library which cannot be statically linked. Reverting to -reentrancy=none
ld: cannot find -lpthread
ld: cannot find -lm
ld: cannot find -ldl
[65/65] Linking target d4test
FAILED: d4test
ifort -o d4test d4test.p/tests_tests_dftd.f90.o d4test.p/tests_assertion.f90.o d4test.p/tests_class_molecule.f90.o d4test.p/tests_geometry_reader.f90.o d4test.p/tests_eeq_model.f90.o d4test.p/tests_dftd4.f90.o d4test.p/tests_pbc_tools.f90.o -Wl,--as-needed -Wl,--no-undefined -static -qopenmp -Wl,--start-group libdftd4.a -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl -Wl,--end-group -pthread
ifort: command line warning #10418: option -reentrancy=threaded requires pthread library which cannot be statically linked. Reverting to -reentrancy=none
ld: cannot find -lpthread
ld: cannot find -lm
ld: cannot find -ldl
ninja: build stopped: subcommand failed.
How to overcome this error?

Getting NaN for Force and Energy values in OSZICAR

Compiled sucessfully vasp.6.2.1 with D4(version 3.3). Tested many systems and had no issues to most of it. But there is some problem in some of the systems where I am getting NaN for Force and Energy values.

So tried installing vasp.6.2.1 with D4(version 2.5) with changing the source code similar to #52 #53 issues. Still getting the same error. Energy values are not getting printed at the last ionic step of the vasp+D4 calculation.

Attached Input and outputfiles of one of the systems which have problem.

Screen Shot 2021-09-27 at 9 38 48 PM

ErNi.tar.gz

Provide update/patch for Vasp DFT-D4 API

Is your feature request related to a problem? Please describe.
The update from 2.5 to 3.0 has broken the API integration from dftd4 with Vasp. While dftd4 2.5 can still be used with Vasp there have been various issue in the 2.5 with newer Versions of the Intel compilers (latest confirmed working version is Intel 18).

Describe the solution you'd like
To use dftd4 in the 3.x series with Vasp an update or patch for the subdftd4.F has to be provided. The API for using subdftd4.F in vdwforcefield.F don't have not change, but the glue code in subdftd4.F to access the Fortran API of dftd4.

Additional context
The currently available subdftd4.F has to be retrieved from Vasp first.

Allow setting of Ewald splitting parameter

The Ewald splitting parameter is currently automatically determined and dependent on the cell volume. This automatic determination is convenient but the user should be able to override it, in case it is not optimal.

Wanted Solution
The Ewald splitting parameter should be read in from the command line or be provided in the options type of the API, in case it is not given, a reasonable default should be provided by the program.

Print Edisp to machine precision

Would be nice to have a command-line option that prints Edisp to machine precision.

Based on a cursory scan of the source, I wasn't able to tweak it to format Edisp output to display at machine precision -- 15-16 places of decimal in scientific format. How does one go about doing that?
Maybe having a command-line option to do so would be something to consider?

Please provide examples for VASP built with the dftd4 library

I have succeeded in building vasp 6.2.1 with the dftd4 library. It would be nice to have a few test dftd4 calculations to be sure everything is being done correctly in my build. Could the dftd4 developers provide a few examples of dftd4_vasp calculations?

Thanks,

John Low
Argonne National Laboratory.

Constructor to automatically use DFTD4 as dispersion correction with ASE calculators

Is your feature request related to a problem? Please describe.

Creating a dispersion correction with the DFTD4 calculator currently works by combining any ASE calculator and DFTD4 using the SumCalculator from ase.calculators.mixing like in:

>>> from ase.build import molecule
>>> from ase.calculators.mixing import SumCalculator
>>> from ase.calculators.nwchem import NWChem
>>> from dftd4.ase import DFTD4
>>> atoms = molecule('H2O')
>>> atoms.calc = SumCalculator([DFTD4(method="PBE"), NWChem(xc="PBE")])

Importing both DFTD4 and the SumCalculator can be become repetitive quickly.

Describe the solution you'd like

The dftd4.ase module could provide a constructor to combine any calculator automatically with DFTD4 using the SumCalculator under the hood.

Additional context
See ase#901

Parameterization for PBEsol

Is a parameterization available for PBEsol? I am unsure if it is included and I just do not see the name as something I recognize. If it is not available, is it something that is expected to be available in the future?

CMake build failure

Describe the bug

CMake fails to build dftd4, while meson can.

To Reproduce
Steps to reproduce the behaviour:

  1. mkdir build; cd build; cmake ..
  2. make
Scanning dependencies of target multicharge-lib
[  0%] Building Fortran object _deps/multicharge-build/CMakeFiles/multicharge-lib.dir/src/multicharge/cutoff.f90.o
./_deps/multicharge-src/src/multicharge/cutoff.f90:17:8:

   17 |    use mctc_env, only : wp
      |        1
Fatal Error: Cannot open module file 'mctc_env.mod' for reading at (1): No such file or directory
compilation terminated.
make[2]: *** [_deps/multicharge-build/CMakeFiles/multicharge-lib.dir/build.make:121: _deps/multicharge-build/CMakeFiles/multicharge-lib.dir/src/multicharge/cutoff.f90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:982: _deps/multicharge-build/CMakeFiles/multicharge-lib.dir/all] Error 2
make: *** [Makefile:160: all] Error 2

Include flags are -I_deps/multicharge-build/include and -Jinclude, but the module is created under subprojects/mctc-lib/include.

multicharge itself is successfully built with CMake.

Environment:

  • OS: Debian 11.0
  • cmake: 3.18.4; 3.14.0 and 3.21.2 also fail
  • dftd4: 6e5709f

Expected behaviour

Build is successful.

Allow construction of self-consistent dispersion

Is your feature request related to a problem? Please describe.
DFT-D4 can be used self-consistently together with tight binding methods. For this purpose the dispersion evaluation has to be tightly integrated in the potential evaluation of the SCF iterations.

Using self-consistent DFT-D4 in the standalone dftd4 binary or with the library is more complicated (cyclic dependencies) and probably out-of-scope for the main library.

Describe the solution you'd like
This projects provides the basic building blocks to create a ready-to-use self-consistent dispersion.

  • creating of potential intermediates (caching of dispersion matrix, gaussian weights for references)
  • potential evaluation (dE/dq, downstream is required to convert it to a Hamiltonian)
  • self-consistent energy/gradient evaluation (split of ATM and self-consisten two-body evaluation)

Describe alternatives you've considered
Projects with self-consistent DFT-D4 maintain their own implementation (see DFTB+ and xtb).

Is parallelization possible?

Hi again,

I am using the DFTD4 in conjunction with the AIMNet neural network model (https://github.com/aiqm/aimnet) which is trained on 20MM+ wB97x/def2-TZVPP off-equilibrium calculations.

I have found that this dispersion correction is a nice correction for non-covalent interactions. However, compared to the performance of the neural network on GPUs I am finding that the single thread dispersion correction runs in approximately the same time as the neural network for systems with ~15 heavy atoms. Even worse, when I run on systems of ~200 heavy atoms, I am finding that the dispersion correction takes 10x longer to run than the neural network!

Is there any way to speed up the dispersion correction? I have 5 cpus per gpu so I could use multithreading if that is available. I do not see anywhere to turn on parallelization via the python interface.

Thanks,
Adam

Error when Compiling with Intel 2016

CentOS 7.3, intel 2016 compiler
Errors occur when I compile dftd4-3.2.0

# meson test -C _build --print-errorlogs
ninja: Entering directory `/opt/phys-soft/dftd4-3.2.0/_build'
[1/16] Compiling Fortran object libdftd4.so.3.2.0.p/src_dftd4_param.f90.o
FAILED: libdftd4.so.3.2.0.p/src_dftd4_param.f90.o libdftd4.so.3.2.0.p/dftd4_param.mod 
ifort -Ilibdftd4.so.3.2.0.p -I. -I.. -Isubprojects/mctc-lib/libmctc-lib.a.p -Isubprojects/multicharge/libmulticharge.a.p -D_FILE_OFFSET_BITS=64 -warn general -warn truncated_source -g -traceback -O2 -g -traceback -fPIC -qopenmp -module libdftd4.so.3.2.0.p -gen-dep=libdftd4.so.3.2.0.p/src_dftd4_param.f90.o -gen-depformat=make -o libdftd4.so.3.2.0.p/src_dftd4_param.f90.o -c ../src/dftd4/param.f90
../src/dftd4/param.f90(96): error #6197: An assignment of different structure types is invalid.
      param = dftd_param( & ! (SAW191202)
--------------^
../src/dftd4/param.f90(96): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param( & ! (SAW191202)
------^
../src/dftd4/param.f90(99): error #6197: An assignment of different structure types is invalid.
      param = dftd_param( & ! (SAW191202)
--------------^
../src/dftd4/param.f90(99): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param( & ! (SAW191202)
------^
../src/dftd4/param.f90(102): error #6197: An assignment of different structure types is invalid.
      param = dftd_param( & ! (SAW191202)
--------------^
../src/dftd4/param.f90(102): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param( & ! (SAW191202)
------^
../src/dftd4/param.f90(105): error #6197: An assignment of different structure types is invalid.
      param = dftd_param( & ! (SAW191202)
--------------^
../src/dftd4/param.f90(105): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param( & ! (SAW191202)
------^
../src/dftd4/param.f90(108): error #6197: An assignment of different structure types is invalid.
      param = dftd_param( & ! (SAW191202)
--------------^
../src/dftd4/param.f90(108): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param( & ! (SAW191202)
------^
../src/dftd4/param.f90(133): error #6197: An assignment of different structure types is invalid.
      param = dftd_param ( & ! (SAW190107)
--------------^
../src/dftd4/param.f90(133): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param ( & ! (SAW190107)
------^
../src/dftd4/param.f90(137): error #6197: An assignment of different structure types is invalid.
      param = dftd_param ( & ! (SAW190103)
--------------^
../src/dftd4/param.f90(137): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param ( & ! (SAW190103)
------^
../src/dftd4/param.f90(141): error #6197: An assignment of different structure types is invalid.
      param = dftd_param ( & ! (SAW190103)
--------------^
../src/dftd4/param.f90(141): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param ( & ! (SAW190103)
------^
../src/dftd4/param.f90(145): error #6197: An assignment of different structure types is invalid.
      param = dftd_param ( & ! (SAW190107)
--------------^
../src/dftd4/param.f90(145): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param ( & ! (SAW190107)
------^
../src/dftd4/param.f90(149): error #6197: An assignment of different structure types is invalid.
      param = dftd_param ( & ! (SAW190107)
--------------^
../src/dftd4/param.f90(149): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param ( & ! (SAW190107)
------^
../src/dftd4/param.f90(153): error #6197: An assignment of different structure types is invalid.
      param = dftd_param ( & ! (SAW190103)
--------------^
../src/dftd4/param.f90(153): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param ( & ! (SAW190103)
------^
../src/dftd4/param.f90(157): error #6197: An assignment of different structure types is invalid.
      param = dftd_param ( & ! (SAW190103)
--------------^
../src/dftd4/param.f90(157): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param ( & ! (SAW190103)
------^
../src/dftd4/param.f90(161): error #6197: An assignment of different structure types is invalid.
      param = dftd_param ( & ! (SAW190103)
--------------^
../src/dftd4/param.f90(161): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param ( & ! (SAW190103)
------^
../src/dftd4/param.f90(165): error #6197: An assignment of different structure types is invalid.
      param = dftd_param ( & ! (SAW190107)
--------------^
../src/dftd4/param.f90(165): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param ( & ! (SAW190107)
------^
../src/dftd4/param.f90(169): error #6197: An assignment of different structure types is invalid.
      param = dftd_param ( & ! (SAW190103)
--------------^
../src/dftd4/param.f90(169): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic.   [PARAM]
      param = dftd_param ( & ! (SAW190103)
------^
../src/dftd4/param.f90(811): catastrophic error: Too many errors, exiting
compilation aborted for ../src/dftd4/param.f90 (code 1)
ninja: build stopped: subcommand failed.
Could not rebuild /opt/phys-soft/dftd4-3.2.0/_build

Request: Update documentation for PBC

It looks like the dftd4 code should run with periodic boundary conditions, but the --pbc flag does not seem to work, and it is not yet documented as far as I can tell.

I'm running version 2.4.0. How do I activate periodic boundary conditions in dftd4?

I kindly request that you update the documentation to explain how periodic boundary conditions can be applied with dftd4, and what limitations it currently has.

Thanks!

Intel run-time check failure in call to eeq_chrgeq

We periodically run our code with Intel run-time checking enabled, this has thrown up an error when calling out to dftd4:

forrtl: severe (408): fort: (8): Attempt to fetch from allocatable variable GES when it is not allocated

which apparently happens in d4_calculation.f90 line 175:

   stat = eeq_chrgeq(chrgeq,mol,cn,dcndr,dcndL,q,dqdr,dqdL,es,ges,stmp, &

I think the issue is that whilst the call has lgrad=.false. the run-time checker still expects to find an actual address for the gradient argument. One can avoid this by changing the declaration of gradient to:

real(wp), allocatable, intent(inout) :: gradient(:,:)       !< molecular gradient of IES

or alternatively just allocating the array beforehand to (0,0) dimension. I thought it worth at least reporting since the run-time checker can be quite useful as it operates significantly faster compared to using Valgrind.

A perhaps less useful piece of information is I see errors of the kind:

Boundary Run-Time Check Failure for variable 'var$1762'

trapping in the debugger shows the last lines of pbc_dncoord_erf() and pbc_dncoord_d4(). I was unable to get better resolution other than it seems to relate to the do concurrent construct. Perhaps that's a bug in the checker as I even get the warning when it's cut down to

   do i = 1, mol%n
      do j = 1, i-1 ! loop over all atoms for PBC case
         do concurrent(tx = -rep_cn(1):rep_cn(1),&
               &       ty = -rep_cn(2):rep_cn(2),&
               &       tz = -rep_cn(3):rep_cn(3))
            t = [tx,ty,tz]
       enddo
     enddo
   enddo

which I really cannot see as having any out of bounds array references.

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.