Page 1 of 1

Serial installation error vasp-5.4.4

Posted: Wed Oct 18, 2023 10:41 pm
by vahid_askarpour
I have compiled VASP in parallel and it works fine. I need to compile the serial version as well. However, I get the following error while making the ncl variant:

Code: Select all

ifort -free -names lowercase -assume byterecl -w -O2 -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include/fftw -c mlwf.f90
mlwf.F(811): error #6460: This is not a field name that is defined in the encompassing structure.   [NCPU]
      IF (WRITE_SPN .AND. WDES%COMM%NCPU.NE.1) THEN
------------------------------------^
compilation aborted for mlwf.f90 (code 1)
make[2]: *** [makefile:169: mlwf.o] Error 1
make[2]: Leaving directory '/home/vaskarpo/bin/VASP5_serial/src/vasp.5.4.4/build/ncl'
cp: cannot stat 'vasp': No such file or directory
make[1]: *** [makefile:142: all] Error 1
make[1]: Leaving directory '/home/vaskarpo/bin/VASP5_serial/src/vasp.5.4.4/build/ncl'
make: *** [makefile:10: ncl] Error 2

The makefile.include is

Code: Select all

# Precompiler options
CPP_OPTIONS= -DHOST=\"LinuxIFC\"\
             -DCACHE_SIZE=4000 \
             -Davoidalloc \
             -Duse_bse_te \
             -Dtbdyn \
	     -DVASP2WANNIER90v2 


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

FC         = ifort
FCL        = ifort -mkl

FREE       = -free -names lowercase

FFLAGS     = -assume byterecl -w
OFLAG      = -O2
OFLAG_IN   = $(OFLAG)
DEBUG      = -O0

MKL_PATH   = $(MKLROOT)/lib/intel64
BLAS       =
LAPACK     = $(MKL_PATH)/libmkl_intel_lp64.a
BLACS      = 
SCALAPACK  = $(BLACS)

OBJECTS    = fft3dfurth.o fft3dlib.o 

INCS       =-I$(MKLROOT)/include/fftw

LLIBS      = $(SCALAPACK) $(LAPACK) $(BLAS) ~/bin/wannier90-2.1.0/libwannier.a


OBJECTS_O1 += fft3dfurth.o fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o

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

OBJECTS_LIB= linpack_double.o 

# For the parser library
CXX_PARS   = icpc

LIBS       += parser
LLIBS      += -Lparser -lparser -lstdc++

# Normally no need to change this
SRCDIR     = ../../src
BINDIR     = ../../bin
Any suggestions would be greatly appreciated.

Thanks,
Vahid

Re: Serial installation error vasp-5.4.4

Posted: Thu Oct 19, 2023 12:36 pm
by martin.schlipf
I don't know where you got your source code from but this line is not present in the version of 5.4.4. It should be easy enough to fix because the number of CPUs should be 1 in the serial case.

Re: Serial installation error vasp-5.4.4

Posted: Thu Oct 19, 2023 3:29 pm
by vahid_askarpour
The source code is VASP's but I added a patch called mlwf.patch from https://github.com/Chengcheng-Xiao/VASP ... x/tree/dev in order to fix the VASP2WANNIER90v2 interface issues.

I will try to fix the error since it seems to be not serious.

Thanks,
Vahid

Re: Serial installation error vasp-5.4.4

Posted: Fri Oct 20, 2023 6:10 am
by martin.schlipf
While in general we cannot provide support for fixes that are applied on top of VASP, in this specific case it seems easy enough to just change it to

Code: Select all

#ifdef MPI
      IF (WRITE_SPN .AND. WDES%COMM%NCPU.NE.1) THEN
         IF (IO%IU0>=0) WRITE(*,*) 'MLWF_WANNIER90: WRITE_SPN only works in serial, skipping.'
         WRITE_SPN=.FALSE.
      ENDIF
#endif
By the way, why do you need the serial version of VASP? In principle, you can run the MPI version also on a single core so I would be interested to know about the specific use case.