Installation issue in VASP 6.5.1 interfacing with hdf5 and Wannier90

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


Moderators: Global Moderator, Moderator

Locked
Message
Author
mukhtiyar_singh
Newbie
Newbie
Posts: 17
Joined: Mon Apr 10, 2023 5:56 pm

Installation issue in VASP 6.5.1 interfacing with hdf5 and Wannier90

#1 Post by mukhtiyar_singh » Sat Aug 02, 2025 3:42 am

Hii
I am trying to install VASP 6.5.1 with hdf5 and Wannier90 interfacing. I am using oneapi 2022.1.0 compilers, hdf5-1.13.2, and Wannier90 3.1.0 versions. These preinstalled hdf5 and Wannier90 versions are working separately with older version of VASP 6.2.1 and 6.4.0, respectively.
I am facing following error
........................................
mpiifort -free -names lowercase -assume byterecl -w -xHOST -O0 -I/home/ramesh/intel/oneapi/mkl/2022.1.0/include/fftw -I/home/ramesh/hdf5-1.13.2/hdf5/include -c main.f90
mpiifort -qmkl=sequential -o vasp c2f_interface.o simd.o base.o string.o tutor.o version.o build_info.o command_line.o vhdf5_base.o incar_reader.o reader_base.o openmp_struct.o openacc_struct.o offload_struct.o mpi.o mpi_shmem.o main_mpi.o mathtools.o profiling.o bse_struct.o mgrid_struct.o pot_struct.o hamil_struct.o radial_struct.o pseudo_struct.o wave_struct.o nl_struct.o mkpoints_struct.o bandgap_struct.o poscar_struct.o esf_struct.o afqmc_struct.o minimax_struct.o setex_struct.o locproj_struct.o fock_glb.o chi_glb.o smart_allocate.o xml.o constant.o plugins.o ml_ff_c2f_interface.o ml_ff_prec.o ml_ff_string.o ml_ff_tutor.o ml_ff_constant.o ml_ff_mpi_help.o ml_ff_neighbor.o ml_ff_taglist.o ml_ff_struct.o ml_ff_mpi_shmem.o vdwforcefield_glb.o jacobi.o scala_struct.o ini.o scala.o nvcuda.o crayhip.o intelmkl.o openmp.o openacc.o offload.o scalapack_wrappers.o blas_wrappers.o lapack_wrappers.o asa.o lattice.o poscar.o fft_comm.o fftw.o fft_wrappers.o fft_base.o mgrid.o libmbd.o ml_asa2.o ml_ff_mpi.o ml_ff_helper.o ml_ff_logfile.o ml_ff_math.o ml_ff_iohandle.o ml_ff_memory.o ml_ff_abinitio.o ml_ff_ff2.o ml_ff_ff3.o ml_ff_ff.o ml_ff_mlff.o vaspml.o ldalib.o wpbe.o ggalib.o mbj.o mggalib.o vdw_nl.o xc_driver.o setex.o pseudo.o radial.o gridq.o coulomb_cutoff.o ebs.o symlib.o gauss_quad.o m_unirnk.o mkpoints.o random.o wave.o wave_mpi.o wave_high.o bext.o spinsym.o symmetry.o lattlib.o nonl.o nonlr.o nonl_high.o dfast.o choleski2.o mix.o hamil.o constrmag.o cl_shift.o relativistic.o LDApU.o paw_base.o tau_mu.o fexcg.o egrad.o pawsym.o pawfock.o pawlhf.o diis.o rhfatm.o hyperfine.o fock_ace.o mkpoints_full.o charge.o us.o extpot.o paw.o Lebedev-Laikov.o stockholder.o pot_electrostat.o dipol.o solvation.o scpc.o fermi_energy.o tet.o dos.o elf.o hamil_rot.o chain.o dyna.o fileio.o vhdf5.o bandgap_tools.o pot.o sphpro.o core_rel.o aedens.o wavpre.o wavpre_noio.o broyden.o dynbr.o reader.o writer.o xml_writer.o brent.o stufak.o opergrid.o stepver.o fast_aug.o fock_multipole.o fock.o fock_dbl.o fock_frc.o supercell.o mkpoints_change.o subrot_cluster.o sym_grad.o mymath.o npt_dynamics.o subdftd3.o subdftd4.o internals.o dynconstr.o dimer_heyden.o dvvtrajectory.o vdwforcefield.o nmr.o pead.o k-proj.o subrot.o subrot_scf.o paircorrection.o rpa_force.o ml_reader.o ml_interface_writer.o ml_interface.o coulomb_cutoff_gradients.o force.o pwlhf.o gw_model.o optreal.o steep.o rmm-diis.o davidson.o david_full.o david_inner.o root_find.o lcao_bare.o locproj.o electron_common.o electron.o rot.o electron_all.o shm.o pardens.o optics.o constr_cell_relax.o stm.o finite_diff.o elpol.o hamil_lr.o rmm-diis_lr.o subrot_lr.o lr_helper.o hamil_lrf.o elinear_response.o ilinear_response.o linear_optics.o setlocalpp.o wannier.o electron_OEP.o electron_lhf.o twoelectron4o.o minimax_ini.o minimax_dependence.o minimax_functions1D.o minimax_functions2D.o minimax_varpro.o minimax.o umco.o mlwf.o ratpol.o pade_fit.o screened_2e.o wave_cacher.o crpa.o chi_base.o wpot.o local_field.o ump2.o ump2kpar.o fcidump.o ump2no.o bse_te.o bse_lanczos.o bse.o bse_driver.o time_propagation.o esf.o acfdt.o afqmc.o rpax.o chi.o dmft.o GG_base.o acfdt_GG.o greens_orbital.o lt_mp2.o rnd_orb_mp2.o greens_real_space.o chi_GG.o chi_super.o sydmat.o rmm-diis_mlr.o linear_response_NMR.o wannier_interpol.o wave_interpolate.o wave_rotator.o wave_window.o wap.o elphon_potential_struct.o elphon_base.o elphon_triplets.o elphon_potential.o elphon_accumulators.o elphon_kgrid.o transport.o elphon_common.o elphon_mels.o elphon_selfen_ph.o elphon_driver.o linear_response.o auger.o dmatrix.o phonon.o elphon_derivative.o wannier_mats.o elphon.o core_con_mat.o embed.o rpa_high.o main.o -Llib -ldmy -Lparser -lparser -lstdc++ -L/home/ramesh/intel/oneapi/mkl/2022.1.0/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -L/home/ramesh/hdf5-1.13.2/hdf5/lib -lhdf5_fortran -L/home/ramesh/wannier90/libwannier.a
mlwf.o: In function `mlwf_mp_mlwf_wannier90_setup_':
mlwf.f90:(.text+0x82c5): undefined reference to `wannier_setup_'
mlwf.o: In function `mlwf_mp_mlwf_wannier90_run_':
mlwf.f90:(.text+0x24456): undefined reference to `wannier_run_'
mlwf.f90:(.text+0x26e6d): undefined reference to `wannier_run_'
makefile:153: recipe for target 'vasp' failed
make[2]: *** [vasp] Error 1
make[2]: Leaving directory '/home/ramesh/VASP 6.5.1/vasp.6.5.1/build/std'
cp: cannot stat 'vasp': No such file or directory
makefile:150: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/home/ramesh/VASP 6.5.1/vasp.6.5.1/build/std'
makefile:13: recipe for target 'std' failed
make: *** [std] Error 2
..........................................................................................
The makefile.include of VASP is as following
............................................................................
# Default precompiler options
CPP_OPTIONS = -DHOST=\"LinuxIFC\" \
-DMPI -DMPI_BLOCK=8000 -Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Dvasp6 \
-Dtbdyn \
-Dfock_dblbuf\
-DVASP_HDF5\
-DVASP2WANNIER90

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

FC = mpiifort
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++

#LLIBS +=-L /home/ramesh/wannier90-3.1.0/libwannier.a
##
## 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 ?= -xHOST
FFLAGS += $(VASP_TARGET_CPU)

# Intel MKL (FFTW, BLAS, LAPACK, and scaLAPACK)
# (Note: for Intel Parallel Studio's MKL use -mkl instead of -qmkl)
FCL += -qmkl=sequential
MKLROOT ?= /path/to/your/mkl/installation
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 ?= /home/ramesh/hdf5-1.13.2/hdf5
LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran
INCS += -I$(HDF5_ROOT)/include

# For the VASP-2-Wannier90 interface (optional)
#CPP_OPTIONS += -DVASP2WANNIER90
WANNIER90_ROOT ?= /home/ramesh/wannier90
LLIBS += -L$(WANNIER90_ROOT)/libwannier.a ##/home/ramesh/wannier90lib -lwannier
......................................................................................................................................................
The make.inc of Wannier90 is
.....................................................

#=====================================================
# For Linux with intel version 11/12 on 64bit machines
#=====================================================
F90 = ifort
COMMS=mpi
MPIF90=mpiifort
FCOPTS=-O2
LDOPTS=-O2

#========================================================
# Intel mkl libraries. Set LIBPATH if not in default path
#========================================================

LIBDIR = /home/ramesh/intel/oneapi/mkl/2022.1.0/lib/intel64
LIBS = -L$(LIBDIR) -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lpthread

#=======================
# ATLAS Blas and LAPACK
#=======================
#LIBDIR = /usr/local/lib
#LIBS = -L$(LIBDIR) -llapack -lf77blas -lcblas -latlas
...........................................................................................................................

The Wannier90 directory have necessary files required for linking, i.e., libwannier.a
Please guide regarding this error
Regards


ahampel
Global Moderator
Global Moderator
Posts: 197
Joined: Tue Feb 16, 2016 11:41 am

Re: Installation issue in VASP 6.5.1 interfacing with hdf5 and Wannier90

#2 Post by ahampel » Sat Aug 02, 2025 11:35 am

Hi Mukhtiyar,

thank you for reaching out to us via the official VASP forum. I will try to help you out compiling with W90 support. I assume that the build without -DVASP2WANNIER90 is working?

The error of the undefined reference to wannier_setup and wannier_run points to a problem in the linked library libwannier.a . Both subroutines are part of the library, and only the interface is defined in VASP. You say that:

Code: Select all

ls -alh /home/ramesh/wannier90/libwannier.a

gives a correct result? And this library has been build with the same compiler?

Can you show what the command:

Code: Select all

nm -g --defined-only /home/ramesh/wannier90/libwannier.a

outputs. Specificially if it reports in the end for wannier_lib.o::

Code: Select all

...
0000000000001bc0 T _wannier_run_
00000000000000a4 T _wannier_setup_

This would confirm that the two methods are in the wannier90 library.

Best regards,
Alex


mukhtiyar_singh
Newbie
Newbie
Posts: 17
Joined: Mon Apr 10, 2023 5:56 pm

Re: Installation issue in VASP 6.5.1 interfacing with hdf5 and Wannier90

#3 Post by mukhtiyar_singh » Sat Aug 02, 2025 3:12 pm

Hi ahampel

So, I have tried to install it without Wannier90 interfacing, and I have successfully installed vasp6.5.1 with hdf5 interfacing. Also, I tested with an relax example, which also created .h5 file in the calculation.
Moreover, as you mentioned, the results from your commands are here
(base) ramesh@ramesh-HP-Laptop-15q-ds0xxx:~$ ls -alh /home/ramesh/wannier90/libwannier.a
-rw-rw-r-- 1 ramesh ramesh 2.9M Jul 20 19:00 /home/ramesh/wannier90/libwannier.a
(base) ramesh@ramesh-HP-Laptop-15q-ds0xxx:~$ nm -g --defined-only /home/ramesh/wannier90/libwannier.a

wannier_lib.o:
0000000000000004 C mpifcmb5_
0000000000000004 C mpifcmb9_
000000000000001c C mpipriv1_
0000000000000018 C mpipriv2_
0000000000000002 C mpiprivc_
0000000000001f70 T wannier_run_
0000000000000000 T wannier_setup_

.............................................................................................
As you can see both lines are present, i.e.,
0000000000001f70 T wannier_run_
0000000000000000 T wannier_setup_
.........................................................................................
The detailed outcomes of these commands are attached

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

ahampel
Global Moderator
Global Moderator
Posts: 197
Joined: Tue Feb 16, 2016 11:41 am

Re: Installation issue in VASP 6.5.1 interfacing with hdf5 and Wannier90

#4 Post by ahampel » Mon Aug 04, 2025 6:42 am

Hi Mukhtiyar,

Ah I now see what could cause the issue. You wrote in your make.include:

Code: Select all

LLIBS += -L$(WANNIER90_ROOT)/libwannier.a 

but it should be:

Code: Select all

LLIBS += $(WANNIER90_ROOT)/libwannier.a 

or:

Code: Select all

LLIBS          += -L$(WANNIER90_ROOT)/lib -lwannier 

the version you used will produce for me exactly the error you described. Please try that correction. Remember to recompile when you add the DVASPWANNIER90 flag.

Best,
Alex


mukhtiyar_singh
Newbie
Newbie
Posts: 17
Joined: Mon Apr 10, 2023 5:56 pm

Re: Installation issue in VASP 6.5.1 interfacing with hdf5 and Wannier90

#5 Post by mukhtiyar_singh » Tue Aug 05, 2025 5:38 pm

Its done. Thank you so much for your support.


ahampel
Global Moderator
Global Moderator
Posts: 197
Joined: Tue Feb 16, 2016 11:41 am

Re: Installation issue in VASP 6.5.1 interfacing with hdf5 and Wannier90

#6 Post by ahampel » Tue Aug 05, 2025 6:57 pm

Perfect - I will close the issue now. Glad it works now! Do not hesitate to open another topic if you encounter another problem.

Best,
Alex


Locked