Syntax error: Recovery attempted by inserting identifier .Z0


I try to compile WRF with pgi/9.0.3 and openmpi/pgi/64/1.3.0. (I try 1.2.6 too) But I have this error:

mpicc -DFSEEKO64_OK -w -O3 -DDM_PARALLEL -DMAX_HISTORY=25 -c buf_for_proc.c
PGC-S-0036-Syntax error: Recovery attempted by inserting identifier .Z0000 before ‘(’ (/cvos/shared/apps/openmpi/pgi/64/1.2.6/include/mpi.h: 823)
PGC-S-0082-Function returning array not allowed (/cvos/shared/apps/openmpi/pgi/64/1.2.6/include/mpi.h: 823)
PGC-S-0043-Redefinition of symbol, MPI_Comm (/cvos/shared/apps/openmpi/pgi/64/1.2.6/include/mpi.h: 837)
PGC/x86-64 Linux 9.0-3: compilation completed with severe errors
make[3]: [buf_for_proc.o] Error 2 (ignored)

What’s the problem?


Hi julien1188,

Sorry for the late response, I have missed this earlier.

This type of error occurs when there is a missing or unknown identifier. I’ve seen it occur when a macro wasn’t defined correctly or the source is using a GNU extension.

Can you please post line 823 of “/cvos/shared/apps/openmpi/pgi/64/1.2.6/include/mpi.h”? I have OpenMPI 1.3 and it’s line 823 wouldn’t cause this issue.

Another thing that would help is first preprocess the file to see what macro replacement occurred. To do this, add the “-P” flag to generate a preprecessed (.i) file and then compile the resulting .i file.

Something like:

mpicc -DFSEEKO64_OK -w -O3 -DDM_PARALLEL -DMAX_HISTORY=25 -c buf_for_proc.c  -P
mpicc -DFSEEKO64_OK -w -O3 -DDM_PARALLEL -DMAX_HISTORY=25 -c buf_for_proc.i

And then post the line in “buf_for_proc.i” that causes the syntax error.

  • Mat