Help precompilation /**/

Hi all,

I am currently getting installed on a new supercomputer and I encounter issues regarding precompilation.

Some subroutine names have a particular syntax finishing by _/**/PRECISION (ex: SUBROUTINE lbc_nfd_/**/PRECISION).
The comment /**/ is used to make sure the compiler does recognize that PRECISION is a key work that must be replaced by sp for instance.

However, the precompiler output in /BLD/ppsrc/nemo/ yields _/**/sp (ex: SUBROUTINE lbc_nfd_/**/sp).
During the compilation, mpiifort proceeds to further transform this to _ sp (ex: SUBROUTINE lbc_nfd_ sp), with a very problematic space…

I have compared with the precompiler output on Irene and the commentaries have already been removed (ex: SUBROUTINE lbc_nfd_sp).

Does anyone has already encountered this issue before ?

For information my arch file :

%CPP                 cpp
%FC                  mpiifort -c -cpp
%FCFLAGS             -g -i4 -r8 -O3 -fp-model precise -march=native -mtune=native -qoverride-limits -fno-alias -qopt-report=4 -align array64byte -traceback
%FFLAGS              %FCFLAGS
%LD                  mpiifort
%LDFLAGS             -lstdc++
%FPPFLAGS            -P -C -traditional -std=c99
%AR                  ar
%ARFLAGS             rs
%MK                  gmake
%USER_INC            -I/home_nfs/birrmanng/spack/opt/spack/linux-rhel8-x86_64/intel-   -I/home_nfs/birrmanng/spack/opt/spack/linux-rhel8-x86_64/intel-
%USER_LIB            -lnetcdf-fortran   -lnetcdf   -lhdf5

%CC                  mpiicc
%CFLAGS              -O3 -march=native -mtune=native

Nevermind, I found the bug.

The -C flag tells the precompiler not to remove comments removing it in %FPPFLAGS solves the problem.
The line here under works just fine :

%FPPFLAGS            -P -traditional -std=c99

Note that many arch files still have the -C flag, I would imagine that they produce the same error…


Thank you for sharing this, that’s really helped me out.