Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28332 Discussions

ERROR #7061 when compiling the subroutine using Intel compiler 18.0

I got this issue when compiling the coupled code using Intel compiler 18.0:

mod_esmf_atm.F90(70): error #7061: The characteristics of dummy argument 1 of the associated actual procedure differ from the characteristics of dummy argument 1 of the dummy procedure.   [ATM_INIT1]

It seems that the interface of the subroutine is not consistent that in ESMF:

 68       call NUOPC_CompSetEntryPoint(gcomp, ESMF_METHOD_INITIALIZE,       &

 69                                    phaseLabelList=(/"IPDv00p1"/),       &

 70                                    userRoutine=ATM_Init1, rc=rc)

 71       if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU,    &

 72           line=__LINE__, file=FILENAME)) return


 96       subroutine ATM_Init1(gcomp, importState, exportState, clock, rc)


 98       TYPE(ESMF_GridComp), TARGETINTENT(inout)  :: gcomp

 99       TYPE(ESMF_State),    TARGETINTENT(inout) :: importState

100       TYPE(ESMF_State),    TARGETINTENT(inout) :: exportState

101       TYPE(ESMF_Clock),    TARGETINTENT(inout) :: clock

I can compile this code on using an older Intel compiler (13.0 and 16.0). And some other people also reported a similar issue: (some other people also reported this issue). Do anyone know how can we compile it?
I rewrite the code like this:

 96       subroutine ATM_Init1(gcomp, importState, exportState, clock, rc)


 98       TYPE(ESMF_GridComp)  :: gcomp

 99       TYPE(ESMF_State)     :: importState, exportState

100       TYPE(ESMF_Clock)     :: clock

104       INTEGER,                     INTENTOUT) :: rc


106       ! Local variables

107       TYPE(ESMF_GridComp), TARGET :: t_gcomp

108       TYPE(ESMF_State),    TARGET :: t_importState, t_exportState

109       TYPE(ESMF_Clock),    TARGET :: t_clock

110       TYPE(ESMF_GridComp), POINTER :: p_gcomp

111       TYPE(ESMF_State),    POINTER :: p_importState, p_exportState

112       TYPE(ESMF_Clock),    POINTER :: p_clock


129       t_gcomp = gcomp

130       t_importState = importState

131       t_exportState = exportState

132       t_clock = clock


134       p_gcomp => t_gcomp

135       p_importState => t_importState

136       p_exportState => t_exportState

137       p_clock => t_clock

I can compile the new code, but can anyone tell me if the new code will work correctly? 
0 Kudos
1 Reply
Valued Contributor I

It very much looks like that your code might not be standard-conforming. Your modified subroutine doesn't have (with one exception) intents being defined for the dummy arguments of the subroutine which makes it harder for the processor to detect any error. That could be the reason that this code compiles. Without showing the actual code and all the interfaces for the routines, nothing further can be added. 

0 Kudos