Derived Type object required on left of % (scala.f90: 3722)

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


Moderators: Global Moderator, Moderator

Locked
Message
Author
somanath_moharana
Newbie
Newbie
Posts: 1
Joined: Thu Oct 29, 2020 4:16 am

Derived Type object required on left of % (scala.f90: 3722)

#1 Post by somanath_moharana » Mon Nov 02, 2020 10:36 am

Hi guys,
I am getting some error while building vasp with ELPA and Scalapack packages with aocc compiler and aocl packages of AMD on the ROME servers.

Error Msg.
mpif90 -ffree-form -ffree-line-length-none -w -fno-fortran-main -DHOST=\"LinuxGNU\" -DMPI -DMPI_BLOCK=8000 -Duse_collective -DscaLAPACK -DCACHE_SIZE=4000 -Davoidalloc -Duse_bse_te -Dtbdyn -DELPA -Duse_shmem -DnoQuadPrecision -Mbackslash -O0 -I/home/somanath/apps/vasp/test/install/amd_fftw_2.2_AOCC-2.1.0_dp/include -I/home/somanath/apps/vasp/include -I/home/somanath/apps/vasp/test/install/amd_fftw_2.2_AOCC-2.1.0_dp/include -I/home/somanath/apps/vasp/test/install/elpa_2018.11.001_AOCC-2.2.0/include/elpa_openmp-2018.11.001/modules/ -c scala.f90
F90-S-0141-Derived Type object required on left of % (scala.f90: 3722)
F90-F-0000-Internal compiler error. ptrsubr_call, expected TY_PTR dtype 4190 (scala.f90: 3722)
F90/x86-64 Linux Flang - 1.5 2017-05-01: compilation aborted
make[2]: *** [makefile:169: scala.o] Error 1
make[2]: Leaving directory '/home/somanath/apps/vasp/vasp612/aocc/vasp.6.1.2_patched/build/std'
cp: cannot stat 'vasp': No such file or directory
make[1]: *** [makefile:142: all] Error 1
make[1]: Leaving directory '/home/somanath/apps/vasp/vasp612/aocc/vasp.6.1.2_patched/build/std'
make: *** [makefile:6: std] Error 2

I think its a code bug.

#ifdef ELPA
IF (LELPA) THEN
IF (CSEL=='U') THEN
CALL DISTRI_SLICE_HERM(COVL(1,1),NBANDS,NBANDSK,COVL2(1),DESCSTD,NPOS,NPOS+NSTRIP-1)
ELSE
====> CALL vtutor%error("internal error in VASP: ORTH1_DISTRI is only tested for CSEL=U try &
&DISTRI_SLICE_HERM_L")
ENDIF
ENDIF
#endif

The variable vtutor is defined in vtutor module and this module is not imported in this subroutine.
SUBROUTINE ORTH1_DISTRI(CSEL,CPTWFP,CFW,CPROJ,CPROW, &
NBANDS,NPOS,NSTRIP,NPL,NPRO,NPLDIM,NPROD,COVL2,MY_COMM,NBANDSK)
USE prec
USE scala
IMPLICIT NONE
TYPE(communic) :: MY_COMM
INTEGER :: NPRO, NPL, NSTRIP, NPLDIM, NPOS, NPROD, NBANDS, NBANDSK
COMPLEX(q) :: CPTWFP(NPLDIM,NBANDS), CFW(NPLDIM,NSTRIP)
GDEF CPROJ(NPROD,NBANDS)
GDEF CPROW(NPROD,NSTRIP)
GDEF COVL(NBANDS,NSTRIP), COVL2(*)
CHARACTER*(*) CSEL

so, the variabe vtutor can not be referenced in the function.
Solution will be : the following line need to be added in the function
USE tutor, ONLY: vtutor
Note: This piece of code is not working with other compilers aslo.
Note: This the error will be reproduced only when you use scalapack with ELPA. That is when defining scaLAPACK through -DscaLAPACK and -DELPA.
can you please cross check it also and suggest if this a valid error with a valid fix ?

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

Re: Derived Type object required on left of % (scala.f90: 3722)

#2 Post by martin.schlipf » Mon Nov 02, 2020 4:27 pm

The change you suggest looks good to me.

Note that we have not tried to work with recent versions of ELPA since they changed the API, so please double check if everything works as intended after you compiled the code.

Martin Schlipf
VASP developer


Locked