Preprocessor problem when compiling branch 4.2
I see that in all arch .fcm files the fortran compiler (I am using IntelOne compiler suite) is invoked with the -cpp
key, does this mean that running a preprocessor separately is not tested/working?
I am using this 2431247b commit with the additions for compilation on our infrastructure.
I am having problems even if I add the -cpp
key to the compiler command when processing the following:
initial fortran code (in the included .h90 file)
SUBROUTINE lbc_nfd_/**/PRECISION( ptab, cd_nat, psgn, khls, kfld )
TYPE(PTR_4d_/**/PRECISION), DIMENSION(:), INTENT(inout) :: ptab ! pointer of arrays on which apply the b.c.
...
code in ppsrc
SUBROUTINE lbc_nfd_/**/sp( ptab, cd_nat, psgn, khls, kfld )
TYPE(PTR_4d_/**/sp), DIMENSION(:), INTENT(inout) :: ptab ! pointer of arrays on which apply the b.c.
...
The token /**/
is replaced by a space and the compiler complains.
s.f90 -cpp -mpi -o lbcnfd.o -I/fs/homeu2/eccc/cmd/ords/cmde/olh001/Fortran/nemo-official/nemo/build.intel_u2.ppp5/MY_C1D_PAPA/BLD/inc -r8 -O2 -fp-model source -no-wrap-margin -I/fs/homeu2/eccc/cmd/ords/cmde/olh001/Fortran/nemo-official/nemo/coupling/atm-ocn/build/rhel-8-icelake-64/inteloneapi-2021.4.0/release/include -c /fs/homeu2/eccc/cmd/ords/cmde/olh001/Fortran/nemo-official/nemo/build.intel_u2.ppp5/MY_C1D_PAPA/BLD/ppsrc/nemo/lbcnfd.f90
USING: /fs/ssm/eccc/mrd/rpn/code-tools/1.6.4/code-tools_1.6.4_all/include/rhel-8-icelake-64/inteloneapi-2021.4.0/Compiler_rules Compiler Rules applied for Intel 2021.4.0 20210910
/fs/homeu2/eccc/cmd/ords/cmde/olh001/Fortran/nemo-official/nemo/build.intel_u2.ppp5/MY_C1D_PAPA/BLD/ppsrc/nemo/lbcnfd.f90(104): error #5082: Syntax error, found ',' when expecting one of: =
SUBROUTINE lbc_nfd_ sp( ptab, cd_nat, psgn, khls, kfld )
------------------------------------^
/fs/homeu2/eccc/cmd/ords/cmde/olh001/Fortran/nemo-official/nemo/build.intel_u2.ppp5/MY_C1D_PAPA/BLD/ppsrc/nemo/lbcnfd.f90(105): error #5082: Syntax error, found IDENTIFIER 'SP' when expecting one of: ) ( TYPE(PTR_4d_ sp), DIMENSION(:), INTENT(inout) :: ptab ! pointer of arrays on which apply the b.c.
-------------------^
/fs/homeu2/eccc/cmd/ords/cmde/olh001/Fortran/nemo-official/nemo/build.intel_u2.ppp5/MY_C1D_PAPA/BLD/ppsrc/nemo/lbcnfd.f90(492): error #5082: Syntax error, found IDENTIFIER 'SP' when expecting one of: <END-OF-STATEMENT> ; <END-OF-FILE>
END SUBROUTINE lbc_nfd_ sp