Keyword arguments invalid because explicit interface is lacking

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
pascal_boulet1
Newbie
Newbie
Posts: 34
Joined: Thu Nov 14, 2019 7:38 pm

Keyword arguments invalid because explicit interface is lacking

#1 Post by pascal_boulet1 » Thu Apr 03, 2025 7:24 pm

Dear all,

I have problems to compile vasp 6.5.0 and 6.5.1 with either GNU or intel compilers because of
the hdf5 routine vhdf5_base.F

Is it a problem of my makefile.include (see below)?

Here is the error message:
vhdf5_base.F(378): error #6632: Keyword arguments are invalid without an explicit interface. [USE_FILE_LOCKING]
call h5pset_file_locking_f(plist_id, use_file_locking=.false., &
-------------------------------------------^
vhdf5_base.F(379): error #6632: Keyword arguments are invalid without an explicit interface. [IGNORE_DISABLED_LOCKS]
ignore_disabled_locks=.true., hdferr=ierr); call vh5_error(ierr,"vhdf5_base.F",379)
----------^
vhdf5_base.F(379): error #6632: Keyword arguments are invalid without an explicit interface. [HDFERR]
ignore_disabled_locks=.true., hdferr=ierr); call vh5_error(ierr,"vhdf5_base.F",379)

The makefile.include is:

# Default precompiler options
CPP_OPTIONS = -DHOST=\"LinuxIFC\" \
-DMPI -DMPI_BLOCK=8000 -Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Dvasp6 \
-Dtbdyn \
-Dfock_dblbuf \
-D_OPENMP

CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)

FC = mpiifort -qopenmp
FCL = mpiifort

FREE = -free -names lowercase

FFLAGS = -assume byterecl -w

OFLAG = -O2
OFLAG_IN = $(OFLAG)
DEBUG = -O0

# For what used to be vasp.5.lib
CPP_LIB = $(CPP)
FC_LIB = $(FC)
CC_LIB = icc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)

OBJECTS_LIB = linpack_double.o

# For the parser library
CXX_PARS = icpc
LLIBS = -lstdc++

##
## Customize as of this point! Of course you may change the preceding
## part of this file as well if you like, but it should rarely be
## necessary ...
##

# When compiling on the target machine itself, change this to the
# relevant target when cross-compiling for another architecture
VASP_TARGET_CPU = -march=core-avx2
FFLAGS += $(VASP_TARGET_CPU)

# Intel MKL (FFTW, BLAS, LAPACK, and scaLAPACK)
# (Note: for Intel Parallel Studio's MKL use -mkl instead of -qmkl)
FCL += -mkl
MKLROOT = /trinity/shared/apps/custom/x86_64/intel-2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl
LLIBS += -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
INCS =-I$(MKLROOT)/include/fftw

# HDF5-support (optional but strongly recommended, and mandatory for some features)
CPP_OPTIONS += -DVASP_HDF5
HDF5_ROOT = /trinity/shared/apps/tr17.10/x86_64/hdf5-icc18-impi-1.10.1
LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran
INCS += -I$(HDF5_ROOT)/include

# For the VASP-2-Wannier90 interface (optional)
CPP_OPTIONS += -DVASP2WANNIER90
WANNIER90_ROOT = /scratch/pboulet/packages/wannier90-3.1.0
LLIBS += -L$(WANNIER90_ROOT)/lib/intelmpi -lwannier

I am loading the following modules:
intel-mpi/64/2018.3.222
intel-compiler/64/2018.3.222
intel-mkl/64/2018.3.222
hdf5/icc18/impi/1.10.1

Any hint to solve this problem would be welcome.

Thank you

Pascal


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

Re: Keyword arguments invalid because explicit interface is lacking

#2 Post by marie-therese.huebsch » Fri Apr 04, 2025 7:00 am

Hello,

I have never seen the error, but let's try to figure it out. It may be that our interface uses part of hdf5 that is not present in your installation. (Namely h5pset_file_locking_f) Could it be that the version is rather old? I see 2018 for the other modules. Can you try a more recent version?

Cheers,
Marie-Therese


pascal_boulet1
Newbie
Newbie
Posts: 34
Joined: Thu Nov 14, 2019 7:38 pm

Re: Keyword arguments invalid because explicit interface is lacking

#3 Post by pascal_boulet1 » Fri Apr 04, 2025 8:11 am

Hello,

Thank you for your reply.

Well, as I am using a mesocentre, I am limited to the compilers installed there. For intel compilers the latest module is intel-suite/2020.4.0, so version 19.1.2.254.
But then, I cannot use Intel-MPI, I have to use openMPI. That's ok for me, but there are several flavors:
openmpi/icc20/psm2/4.0.5
openmpi/icc20-4.1.6

Another restriction: mkl was not compiled with this 19.1.2.254 version of intel but the older one (18)...

Hence, I think I should rather use gfortran + openblas + scalapack + openmpi/gcc132-5.0.2 or openmpi/gcc72/psm2/3.1.3. Among these two, which one should I use? What is psm2?

Thank you
Pascal


martin.schlipf
Global Moderator
Global Moderator
Posts: 597
Joined: Fri Nov 08, 2019 7:18 am

Re: Keyword arguments invalid because explicit interface is lacking

#4 Post by martin.schlipf » Fri Apr 04, 2025 3:40 pm

It looks like the issue is the hdf5 library. Can you try compiling the code without hdf5 support and try to determine which version of hdf5 you are using? If the hdf5 version is very old it is possible that it does not support all features needed by VASP.

Martin Schlipf
VASP developer


pascal_boulet1
Newbie
Newbie
Posts: 34
Joined: Thu Nov 14, 2019 7:38 pm

Re: Keyword arguments invalid because explicit interface is lacking

#5 Post by pascal_boulet1 » Fri Apr 04, 2025 9:47 pm

Hello,

the HDF5 library is indeed posing problems.

I have recompiled all the libraries with gcc/gfortran 13.2.0 and openMPI 5.0.2.
Here is the environment:
Set up environment to use OpenBLAS 0.3.29 compiled in parallel with gcc 13.2.0 compiler.
Set up environment to use Scalapack 2.2.2 compiled with gcc 13.2.0 and openMPI 5.0.2 compiler.
Set up environment to use FFTW3 v.3.3.10 compiled in parallel with GNU compilers 13.2.0 and openmpi 5.0.2
Set up environment to use Libxc 6.2.2 compiled in parallel with GNU C/gfortran compilers.
Set up environment to use HDF5 1.14.6 compiled with gcc 13.2.0 and openMPI 5.0.2 compilers.
Set up environment to use Wannier90 3.1.0 compiled with gcc 13.2.0 and openMPI 5.0.2 compilers.
Set up environment to use VASP 6.5.0

A vaspout.h5 is created but there are many errors in the slurm logfile and the job finally crashes. I have attached the slurm logfile.

Pascal

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

pascal_boulet1
Newbie
Newbie
Posts: 34
Joined: Thu Nov 14, 2019 7:38 pm

Re: Keyword arguments invalid because explicit interface is lacking

#6 Post by pascal_boulet1 » Sun Apr 06, 2025 11:51 am

Hello,

I have managed to make VASP run properly with all the libraries I need using the toolchain:
intel-compiler/64/2020.2.254, openmpi-4.0.5, MKL library (blacs+scalapack+fftw)

I have compiled VASP with wannier90-3.1.0, hdf5-1.14.6 and libxc-6.2.2 and I have got coherent results with those from another supercomputer.

By the way, is there a reason why libxc directives are no longer present in makefile.include provided with the VASP sources?

Best regards
Pascal


martin.schlipf
Global Moderator
Global Moderator
Posts: 597
Joined: Fri Nov 08, 2019 7:18 am

Re: Keyword arguments invalid because explicit interface is lacking

#7 Post by martin.schlipf » Mon Apr 07, 2025 6:23 am

To your previous message: This part of your logfile

Code: Select all

 running    1 mpi-ranks, on    1 nodes
 running    1 mpi-ranks, on    1 nodes
 distrk:  each k-point on    1 cores,    1 groups
 distrk:  each k-point on    1 cores,    1 groups
 distr:  one band on    1 cores,    1 groups
 running    1 mpi-ranks, on    1 nodes
 distr:  one band on    1 cores,    1 groups
 distrk:  each k-point on    1 cores,    1 groups
 distr:  one band on    1 cores,    1 groups

indicates that there is something wrong with your MPI setup. Instead of running VASP on multiple cores you run VASP multiple times on a single core. The error that you see is then that each rank tries to open the hdf5 file whereas only one is allowed to at any given time. If your MPI is set up properly, only the root node would open the hdf5 file.

This error likely originates from using a different MPI to execute and to compile the code. Please make sure that the mpirun and the mpif90/mpiifort are in the same folder.

For your most recent message: I did not find any libxc statement in the arch/makefile.include.* files for any of the older VASP versions. Could you elaborate which directives you refer to specifically? We have a documentation in the wiki of how to add libxc to the makefile.include which is how it is done for almost all optional dependencies.

Martin Schlipf
VASP developer


pascal_boulet1
Newbie
Newbie
Posts: 34
Joined: Thu Nov 14, 2019 7:38 pm

Re: Keyword arguments invalid because explicit interface is lacking

#8 Post by pascal_boulet1 » Mon Apr 07, 2025 6:58 am

Hello,

Regarding the MPI problem, I solved it by using mpirun instead of srun. There is something weird with srun, but I do not know what exactly. Is it because I compiled with openmpi instead of IntelMPI? I do not know.

For LIBXC, in makefile.include I provide the directives given on the website:
CPP_OPTIONS += -DUSELIBXC
LIBXC_ROOT ?= /path/to/your/libxc/installation
LLIBS += -L$(LIBXC_ROOT)/lib -lxcf03 -lxc
INCS += -I$(LIBXC_ROOT)/include

I though the directives were present in previous releases so, I was just surprised that they are not present in the last VASP 6.5.x distribution makefile.include. Anyway...

Best regards


martin.schlipf
Global Moderator
Global Moderator
Posts: 597
Joined: Fri Nov 08, 2019 7:18 am

Re: Keyword arguments invalid because explicit interface is lacking

#9 Post by martin.schlipf » Mon Apr 07, 2025 8:46 am

Thanks for letting me know.

Is your setup working for you now or are there any unresolved issues?

Martin Schlipf
VASP developer


Post Reply