SETDIJ_AVEC_ syntax glitches

Problems running VASP: crashes, internal errors, "wrong" results.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
mgsternberg
Newbie
Newbie
Posts: 2
Joined: Tue Nov 30, 2010 11:21 pm

SETDIJ_AVEC_ syntax glitches

#1 Post by mgsternberg » Wed Dec 01, 2010 12:21 am

I noticed a couple of glitches regarding SETDIJ_AVEC_() in the new vasp-5.2.11 release, flagged by the Intel-11 compilers.

First, a mismatching name in END SUBROUTINE:

Code: Select all

mpif90 -FR -lowercase -O1 -c us.f90
us.f90(190): error #6758: This name is invalid; if a name is present, it must match the corresponding interface body name.   SETDIJ_AVEC_
    END SUBROUTINE SETDIJ_AVEC_
-------------------^
compilation aborted for us.f90 (code 1)
Second, a question about argument type: AVTOT_(1,1) or AVTOT_, and calling SETDIJ_AVEC_() vs. SETDIJ_AVEC_ONE_CENTER() -- the latter having an additional argument:

Code: Select all

mpif90 -FR -lowercase -assume byterecl -i4 -O2 -ip -ftz   -c nmr.f90
nmr.f90(3056): warning #7866: The statement following this DEC loop optimization directive must be an iterative do-stmt, a vector assignment, an OMP pdo-directive, or an OMP parallel-do-directive.
!DIR$ IVDEP
------^
nmr.f90(3746): error #6784: The number of actual arguments cannot be greater than the number of dummy arguments.   [SETDIJ_AVEC_]
      CALL SETDIJ_AVEC_(W%WDES, GRIDC,GRIDUS,C_TO_US,LATT_CUR,P,T_INFO, W%WDES%LOVERL, &
-----------^
nmr.f90(4458): error #7836: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element.   [AVTOT_]
         CALL SETDIJ_AVEC_(WDES, GRIDC_,GRIDUS,C_TO_US,LATT_CUR,P,T_INFO, LOVERL, &
--------------^
compilation aborted for nmr.f90 (code 1)
The following fixes worked for me:

Code: Select all

diff -ru vasp.5.2/nmr.F vasp.5.2.11/nmr.F
--- vasp.5.2/nmr.F	2010-11-29 08:38:04.000000000 -0600
+++ vasp.5.2.11/nmr.F	2010-11-30 18:24:48.000000000 -0600
@@ -3754,7 +3754,7 @@
       ALLOCATE(A_ONE_CENTER(3,9,T_INFO%NIONS))
 
       DISPL=0
-      CALL SETDIJ_AVEC_(W%WDES, GRIDC,GRIDUS,C_TO_US,LATT_CUR,P,T_INFO, W%WDES%LOVERL, &
+      CALL SETDIJ_AVEC_ONE_CENTER(W%WDES, GRIDC,GRIDUS,C_TO_US,LATT_CUR,P,T_INFO, W%WDES%LOVERL, &
            LMDIM,CDIJ,AVTOT,  NONLR_S, NONL_S, IRDMAX, DISPL, A_ONE_CENTER)
 
       CALL ONE_CENTRE_MOMENT( &
@@ -4484,7 +4484,7 @@
       
 !GILTEST      IF ( .NOT. LBFCONST) THEN
          CALL SETDIJ_AVEC_(WDES, GRIDC_,GRIDUS,C_TO_US,LATT_CUR,P,T_INFO, LOVERL, &
-           LMDIM,CDIJ,AVTOT_(1,1),  NONLR_S, NONL_S, IRDMAX, DISPL)
+           LMDIM,CDIJ,AVTOT_,  NONLR_S, NONL_S, IRDMAX, DISPL)
 !GILTEST      ELSE
 !GILTEST         CALL SETDIJ_AVEC_DUMM(WDES, GRIDC_,GRIDUS,C_TO_US,LATT_CUR,P,T_INFO, LOVERL, &
 !GILTEST           LMDIM,CDIJ,AVTOT_(1,1),  NONLR_S, NONL_S, IRDMAX, DISPL)
@@ -4496,7 +4496,7 @@
       
 !GILTEST         IF ( .NOT. LBFCONST) THEN
             CALL SETDIJ_AVEC_(WDES, GRIDC_,GRIDUS,C_TO_US,LATT_CUR,P,T_INFO, LOVERL, &
-            LMDIM,CDIJ,AVTOT_(1,1),  NONLR_S, NONL_S, IRDMAX, DISPL)
+            LMDIM,CDIJ,AVTOT_,  NONLR_S, NONL_S, IRDMAX, DISPL)
 !GILTEST         ELSE
 !GILTEST            CALL SETDIJ_AVEC_DUMM(WDES, GRIDC_,GRIDUS,C_TO_US,LATT_CUR,P,T_INFO, LOVERL, &
 !GILTEST            LMDIM,CDIJ,AVTOT_,  NONLR_S, NONL_S, IRDMAX, DISPL)
diff -ru vasp.5.2/us.F vasp.5.2.11/us.F
--- vasp.5.2/us.F	2010-11-29 08:38:01.000000000 -0600
+++ vasp.5.2.11/us.F	2010-11-30 18:18:15.000000000 -0600
@@ -146,7 +146,7 @@
       LOGICAL  LOVERL
       REAL(q)  DISPL(3,T_INFO%NIONS)
       REAL(q)  A_ONE_CENTER(:,:,:)
-    END SUBROUTINE SETDIJ_AVEC_
+    END SUBROUTINE SETDIJ_AVEC_ONE_CENTER
   END INTERFACE
 #endif
 
Last edited by mgsternberg on Wed Dec 01, 2010 12:21 am, edited 1 time in total.

admin
Administrator
Administrator
Posts: 2921
Joined: Tue Aug 03, 2004 8:18 am
License Nr.: 458

SETDIJ_AVEC_ syntax glitches

#2 Post by admin » Thu Dec 30, 2010 1:13 pm

please update to the version of Dec 23rd, this bug should be fixed in this version
Last edited by admin on Thu Dec 30, 2010 1:13 pm, edited 1 time in total.

gVallverdu
Newbie
Newbie
Posts: 13
Joined: Mon Jan 17, 2011 9:43 am
Location: Pau, France
Contact:

SETDIJ_AVEC_ syntax glitches

#3 Post by gVallverdu » Tue Jun 21, 2011 8:03 pm

Hi

I have got the same error with version 5.2.11 which I think is the last one. I cannot read on your post how to fix the problem can you explain your solution ?

Thanks a lot

Code: Select all

nmr.f90(3056): warning #7866: The statement following this DEC loop optimization directive must be an iterative do-stmt, a vector assignment, an OMP pdo-directive, or an OMP parallel-do-directive.
!DIR$ IVDEP
------^
nmr.f90(4458): error #7836: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element.   [AVTOT_]
         CALL SETDIJ_AVEC_(WDES, GRIDC_,GRIDUS,C_TO_US,LATT_CUR,P,T_INFO, LOVERL, &
--------------^
compilation aborted for nmr.f90 (code 1)
Last edited by gVallverdu on Tue Jun 21, 2011 8:03 pm, edited 1 time in total.

gVallverdu
Newbie
Newbie
Posts: 13
Joined: Mon Jan 17, 2011 9:43 am
Location: Pau, France
Contact:

SETDIJ_AVEC_ syntax glitches

#4 Post by gVallverdu » Thu Jun 23, 2011 2:28 pm

Hi

Although I use ifort compiler I have to use the flag PGF90 in the preprocessor in order to fix this error !

The issue come from the file us.F. There is a block with several subroutine interface which are used only if PGF90 flag is set. Maybe these interfaces should be use also with IFC flag ?

Germain
Last edited by gVallverdu on Thu Jun 23, 2011 2:28 pm, edited 1 time in total.

Post Reply