Installation problem with VASP 6.3.1 on ubuntu 20.04

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
dlopezduran
Newbie
Newbie
Posts: 13
Joined: Wed Jan 11, 2023 11:23 am

Installation problem with VASP 6.3.1 on ubuntu 20.04

#1 Post by dlopezduran » Mon Jan 16, 2023 9:43 am

Hello VASP users,
I'm trying to install VASP 6.3.1 on ubuntu 20.04. I'm following the instructions of the wiki webpage of VASP of how to install VASP 6.3.1 on ubuntu 20.04: I have installed all the libraries and changed properly the makefile.include. This is my makefile.include:

---

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

CPP = gcc -E -C -w $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS)

FC = mpif90 -fopenmp
FCL = mpif90 -fopenmp

FREE = -ffree-form -ffree-line-length-none

FFLAGS = -w -ffpe-summary=none

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

OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o
OBJECTS_O1 += 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 = gcc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)

OBJECTS_LIB = linpack_double.o

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

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

# For gcc-10 and higher (comment out for older versions)
#FFLAGS += -fallow-argument-mismatch

# BLAS and LAPACK (mandatory)
#OPENBLAS_ROOT ?= /path/to/your/openblas/installation
BLASPACK = -lopenblas

# scaLAPACK (mandatory)
#SCALAPACK_ROOT ?= /path/to/your/scalapack/installation
SCALAPACK = -lscalapack-openmpi

LLIBS += $(SCALAPACK) $(BLASPACK)

# FFTW (mandatory)
#FFTW_ROOT ?= /path/to/your/fftw/installation
LLIBS += -lfftw3 -lfftw3_omp
INCS += -I/usr/include

# HDF5-support (optional but strongly recommended)
CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT ?= /path/to/your/hdf5/installation
LLIBS += -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi/ -lhdf5_fortran
INCS += -I/usr/include/hdf5/openmpi/

---

When I do "make DEPS=1 -j" I obtain an error of compilation related with rank and type mismatches: rank-1 and scalar,
real and logical, integer and logical, for instance. This is something that I do not control, because these parameters are
inside the VASP files. Here are some examples:

---

mathtools.F:292:32:

292 | CALL ZGEQP3(DIM_1, DIM_2, DUMMY_G, DIM_1, THIS%PIVOT, THIS%TAU, ASK_DIM, -1, THIS%RWORK, INFO)
| 1
......
330 | CALL ZGEQP3(THIS%DIM_1, THIS%DIM_2, A, THIS%DIM_1, THIS%PIVOT, THIS%TAU, &
| 2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)

ml_ff_mpi_help.F:268:26:

268 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_REAL8,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/LOGICAL(4)).
ml_ff_mpi_help.F:246:26:

246 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_INTEGER,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/LOGICAL(4)).
ml_ff_mpi_help.F:202:26:

202 | CALL MPI_BCAST(VEC(1,1),N,MPI_REAL8,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/LOGICAL(4)).
ml_ff_mpi_help.F:180:26:

180 | CALL MPI_BCAST(VEC(1,1),N,MPI_INTEGER,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/LOGICAL(4)).
ml_ff_mpi_help.F:136:26:

136 | CALL MPI_BCAST(VEC(1),N,MPI_REAL8,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/LOGICAL(4)).
ml_ff_mpi_help.F:114:26:

114 | CALL MPI_BCAST(VEC(1),N,MPI_INTEGER,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/LOGICAL(4)).
ml_ff_mpi_help.F:70:26:

70 | CALL MPI_BCAST(SCAL,1,MPI_REAL8,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/LOGICAL(4)).
ml_ff_mpi_help.F:49:26:

49 | CALL MPI_BCAST(SCAL,1,MPI_INTEGER,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/LOGICAL(4)).
make[2]: *** [makefile:166: ml_ff_mpi_help.o] Error 1
mathtools.F:289:32:

289 | CALL DGEQP3(DIM_1, DIM_2, DUMMY_G, DIM_1, THIS%PIVOT, THIS%TAU, ASK_DIM, -1, INFO)
| 1
......
327 | CALL DGEQP3(THIS%DIM_1, THIS%DIM_2, A, THIS%DIM_1, THIS%PIVOT, THIS%TAU, &
| 2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
mathtools.F:174:55:

174 | CALL DGESVD(THIS%JOBU, THIS%JOBVT, DIM_1, DIM_2, DUMMY_G, DIM_1, THIS%SINGULAR_VALS, &
| 1
......
217 | CALL DGESVD(THIS%JOBU, THIS%JOBVT, THIS%DIM_1, THIS%DIM_2, A, THIS%DIM_1, THIS%SINGULAR_VALS, &
| 2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
make[2]: *** [makefile:166: mathtools.o] Error 1
make[2]: *** Se espera a que terminen otras tareas....
mathtools.F:292:32:

292 | CALL ZGEQP3(DIM_1, DIM_2, DUMMY_G, DIM_1, THIS%PIVOT, THIS%TAU, ASK_DIM, -1, THIS%RWORK, INFO)
| 1
......
330 | CALL ZGEQP3(THIS%DIM_1, THIS%DIM_2, A, THIS%DIM_1, THIS%PIVOT, THIS%TAU, &
| 2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
mathtools.F:179:55:

179 | CALL ZGESVD(THIS%JOBU, THIS%JOBVT, DIM_1, DIM_2, DUMMY_G, DIM_1, THIS%SINGULAR_VALS, &
| 1
......
221 | CALL ZGESVD(THIS%JOBU, THIS%JOBVT, THIS%DIM_1, THIS%DIM_2, A, THIS%DIM_1, THIS%SINGULAR_VALS, &
| 2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
make[2]: *** [makefile:166: mathtools.o] Error 1
make[2]: *** Se espera a que terminen otras tareas....
ml_ff_mpi_help.F:268:26:

268 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_REAL8,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/LOGICAL(4)).
ml_ff_mpi_help.F:246:26:

246 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_INTEGER,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/LOGICAL(4)).
ml_ff_mpi_help.F:202:26:

202 | CALL MPI_BCAST(VEC(1,1),N,MPI_REAL8,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/LOGICAL(4)).
ml_ff_mpi_help.F:180:26:

180 | CALL MPI_BCAST(VEC(1,1),N,MPI_INTEGER,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/LOGICAL(4)).
ml_ff_mpi_help.F:246:26:

246 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_INTEGER,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/LOGICAL(4)).
ml_ff_mpi_help.F:202:26:

202 | CALL MPI_BCAST(VEC(1,1),N,MPI_REAL8,ROOT,COMM%MPI_COMM,IERR)
| 1
......
290 | CALL MPI_BCAST(VEC(1,1,1),N,MPI_LOGICAL,ROOT,COMM%MPI_COMM,IERR)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/LOGICAL(4)).

---

As you can see, the errors are in the files mathtools.F and ml_ff_mpi_help.F
Any help is kindly appreciated ...
Thank you very much, David.

andreas.singraber
Global Moderator
Global Moderator
Posts: 236
Joined: Mon Apr 26, 2021 7:40 am

Re: Installation problem with VASP 6.3.1 on ubuntu 20.04

#2 Post by andreas.singraber » Mon Jan 16, 2023 9:54 am

Hello David,

it seems you need to use the following additional flag in the makefile.include:

Code: Select all

FFLAGS += -fallow-argument-mismatch
It is already in your file but commented out, please just remove the comment sign (#) in front, then do a make veryclean and try again. Actually, I did not expect this to happen with Ubuntu 20.04 (which comes with default gcc version 9) because this flag should only be necessary with gcc 10.0+. Could you please post the output of

Code: Select all

gfortran --version
so I can eventually update the Wiki page. Thank you!!

Best,
Andreas Singraber

dlopezduran
Newbie
Newbie
Posts: 13
Joined: Wed Jan 11, 2023 11:23 am

Re: Installation problem with VASP 6.3.1 on ubuntu 20.04

#3 Post by dlopezduran » Mon Jan 16, 2023 11:01 am

Dear Andreas,
It works! Compiled!
This is the output:

david@david-VirtualBox:/media/Datos/VASP_6.3.1/vasp.6.3.1$ gfortran --version
GNU Fortran (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thank you very much, David :-)

andreas.singraber
Global Moderator
Global Moderator
Posts: 236
Joined: Mon Apr 26, 2021 7:40 am

Re: Installation problem with VASP 6.3.1 on ubuntu 20.04

#4 Post by andreas.singraber » Mon Jan 16, 2023 11:17 am

Dear David,

great, glad it works! Thanks for the output, now I see you are using Ubuntu 22.04 not 20.04, everything make sense!

Best,
Andreas Singraber

dlopezduran
Newbie
Newbie
Posts: 13
Joined: Wed Jan 11, 2023 11:23 am

Re: Installation problem with VASP 6.3.1 on ubuntu 20.04

#5 Post by dlopezduran » Mon Jan 16, 2023 12:47 pm

Dear Andreas,
It is true: 22.04, I didn't realize!
Thanks a lot :-)

Post Reply