Interfaces (#4) - [AGRIF] PGI can not compile ORCA2_LIM with key_agrif (#40) - Message List

[AGRIF] PGI can not compile ORCA2_LIM with key_agrif
 solved

Hello to all. Can not compile configuration ORCA2_LIM with key_agrif. Without key_agrif have no problem and exe file is exist. This problem with ORCA2_LIM3 too.

./makenemo -r ORCA2_LIM -m AARI_PGI -n ORCA2_LIM_che_1_agrif  add_key "key_iomput key_mpp_mpi key_xios2 key_netcdf4 key_agrif"

Now i have this error.

pgf90 18.1-1 64-bit target on x86-64 Linux -tp haswell
PGI Compilers and Tools
Copyright (c) 2018, NVIDIA CORPORATION.  All rights reserved.
touch /home/work/cheshenko/NEMOGCM/CONFIG/ORCA2_LIM_che_1_agrif/BLD/flags/FFLAGS__agrif__modcurgridfunctions.flags
touch /home/work/cheshenko/NEMOGCM/CONFIG/ORCA2_LIM_che_1_agrif/BLD/flags/FFLAGS__agrif__modinit.flags
touch /home/work/cheshenko/NEMOGCM/CONFIG/ORCA2_LIM_che_1_agrif/BLD/flags/FFLAGS__agrif__modlinktomodel.flags
fcm_internal compile:F agrif /home/work/cheshenko/NEMOGCM/CONFIG/ORCA2_LIM_che_1_agrif/BLD/ppsrc/agrif/modlinktomodel.f90 agrif_link.o
mpif90 -o agrif_link.o -I/home/work/cheshenko/NEMOGCM/CONFIG/ORCA2_LIM_che_1_agrif/BLD/inc -O2  -w -V -i4 -r8 -I/home/work/opt/fornemolibs/xios-2.0/inc -I/home/work/opt/fornemolibs/oasis-3/build/lib/mct -I/home/work/opt/fornemolibs/oasis-3/build/lib/psmile.MPI1 -I/home/work/opt/fornemolibs/netcdfc/include -c /home/work/cheshenko/NEMOGCM/CONFIG/ORCA2_LIM_che_1_agrif/BLD/ppsrc/agrif/modlinktomodel.f90
PGF90/x86-64 Linux 18.1-1
Copyright (c) 2017, NVIDIA CORPORATION.  All rights reserved.
PGF90-S-0034-Syntax error at or near identifier def_proc (/home/work/cheshenko/NEMOGCM/CONFIG/ORCA2_LIM_che_1_agrif/BLD/ppsrc/agrif/modlinktomodel.f90: 70)
  0 inform,   0 warnings,   1 severes, 0 fatal for agrif_link
pgf90 18.1-1 64-bit target on x86-64 Linux -tp haswell
PGI Compilers and Tools
Copyright (c) 2018, NVIDIA CORPORATION.  All rights reserved.
fcm_internal compile failed (512)
gmake: *** [agrif_link.o] Error 1
gmake -f /home/work/cheshenko/NEMOGCM/CONFIG/ORCA2_LIM_che_1_agrif/BLD/Makefile -j 1 all failed (2) at /home/work/cheshenko/NEMOGCM/EXTERNAL/fcm/bin/../lib/Fcm/Build.pm line 597.

My config file

%NCDF_HOME            $NETCDFCDIR
%HDF5_HOME            $HDF5DIR
%XIOS_HOME            $XIOSDIR
%OASIS_HOME           $OASISDIR
%OPENMPI_LIB          -L$MPIDIR/lib
%NCDF_INC            -I%NCDF_HOME/include
%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf -lsz -L%HDF5_HOME/lib -lhdf5_hl -lhdf5 -L${CURLDIR}/lib -lcur
%XIOS_INC            -I%XIOS_HOME/inc
%XIOS_LIB            -L%XIOS_HOME/lib -lxios
%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
%FC                  mpif90
%FCFLAGS             -O3  -Msignextend -V -i4 -r8
%FFLAGS              -O3  -w -V -i4 -r8
%LD                  mpif90
%FPPFLAGS             -P -traditional
%LDFLAGS             -lstdc++ -ldl -lm -lrt -lpthread.
%AR                  ar
%ARFLAGS             -rs
%MK                  gmake
%CPP                 cpp
%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
%CC                  cc
%CFLAGS              -O0

PGF90-S-0034-Syntax error at or near identifier def_proc (/home/work/cheshenko/NEMOGCM/CONFIG/ORCA2_LIM_che_1_agrif/BLD/ppsrc/agrif/modlinktomodel.f90: 70)

0 inform, 0 warnings, 1 severes, 0 fatal for agrif_link

modlinktomodel.f90: 70

!
    end interface
....
    procedure(alloc_proc)   :: Agrif_Allocationcalls
    procedure(typedef_proc) :: Agrif_probdim_modtype_def
!
end module Agrif_Link

Need your help to solve this problem.

  • Message #69

    Hello,

    I've replicated the bug on my laptop.
    Without much expertise with PGI, I will try to figure out what is going wrong here.

    • Message #70

      Well it seems PGI doesn't like the procedure name 'typedef', probably because 'type' is a special keyword in Fortran.

      The following changes allow the compilation to go a little further but it fails again on a kind mismatch.

      • NEMOGCM/EXTERNAL/AGRIF/AGRIF_FILES/modutil.F90

         
        699699!--------------------------------------------------------------------------------------------------- 
        700700subroutine Agrif_Init_Grids ( procname1, procname2 ) 
        701701!--------------------------------------------------------------------------------------------------- 
        702     procedure(typedef_proc), optional   :: procname1 !< (Default: Agrif_probdim_modtype_def) 
         702    procedure(typdef_proc), optional   :: procname1 !< (Default: Agrif_probdim_modtype_def) 
        703703    procedure(alloc_proc),   optional   :: procname2 !< (Default: Agrif_Allocationcalls) 
        704704! 
        705705    integer :: i, ierr_allocate, nunit 
      • NEMOGCM/EXTERNAL/AGRIF/AGRIF_FILES/modlinktomodel.F90

         
        4949            type(Agrif_Grid), pointer :: Agrif_Gr   !< Pointer on the current grid 
        5050        end subroutine alloc_proc 
        5151! 
        52         subroutine typedef_proc ( ) 
         52        subroutine typdef_proc ( ) 
        5353            implicit none 
        54         end subroutine typedef_proc 
         54        end subroutine typdef_proc 
        5555! 
        5656    end interface 
        5757     
        5858    procedure(alloc_proc)   :: Agrif_Allocationcalls 
        59     procedure(typedef_proc) :: Agrif_probdim_modtype_def 
         59    procedure(typdef_proc) :: Agrif_probdim_modtype_def 
        6060! 
        6161end module Agrif_Link 
        6262! 

      Work in progress…

      • Message #72

        hello,I also thought that the problem was in word "TYPE" that compilator identificate like part of special words from fortran language. But how to be with that.

Attachments

No attachments created.