Compilation error when compiling with MPI on Ubuntu 22.04 (Open MPI 4.1.2), v7.7500
I am getting the following compiling error when selecting mpi
parallel/mpi_runner.c: In function ‘main’:
parallel/mpi_runner.c:1490:36: warning: ‘DAT’ directive writing 3 bytes into a region of size between 1 and 255 [-Wformat-overflow=]
1490 | sprintf(joinedlongfile,"%sDAT%06d.long",statdir,rnnum);
| ^~~
parallel/mpi_runner.c:1490:10: note: ‘sprintf’ output between 15 and 274 bytes into a destination of size 255
1490 | sprintf(joinedlongfile,"%sDAT%06d.long",statdir,rnnum);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
parallel/mpi_runner.c: In function ‘write_block_fort’:
parallel/mpi_runner.c:2886:27: warning: ‘%s’ directive writing up to 254 bytes into a region of size 250 [-Wformat-overflow=]
2886 | sprintf(statfile,"%sDAT%06.0f-%06d",statdir,Run_header[1],rank);//ERhdr[1] contains the run number
| ^~ ~~~~~~~
parallel/mpi_runner.c:2886:9: note: ‘sprintf’ output between 17 and 580 bytes into a destination of size 250
2886 | sprintf(statfile,"%sDAT%06.0f-%06d",statdir,Run_header[1],rank);//ERhdr[1] contains the run number
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cpp -DHAVE_CONFIG_H -I../include -traditional-cpp corsika.F > corsikacompilefile.f
gfortran -O0 -I../urqmd -g -std=legacy -c -o libcorsika_a-corsikacompilefile.o `test -f 'corsikacompilefile.f' || echo './'`corsikacompilefile.f
corsikacompilefile.f:8308:9:
8308 | END PROGRAM AAMAIN
| 1
Error: Expecting END SUBROUTINE statement at (1)
corsikacompilefile.f:8341:19:
8341 | IMPLICIT NONE
| 1
Error: IMPLICIT NONE (type) statement at (1) following an IMPLICIT statement
corsikacompilefile.f:8341:72:
8341 | IMPLICIT NONE
| 1
Error: Unexpected IMPLICIT NONE statement at (1)
corsikacompilefile.f:8401:26:
8401 | COMMON /CRCONSTA/PI,PI2,OB3,TB3,ENEPER,SQRT3
| 1
Error: Symbol ‘pi’ at (1) is already in a COMMON block
corsikacompilefile.f:8402:25:
8402 | DOUBLE PRECISION PI,PI2,OB3,TB3,ENEPER,SQRT3
| 1
Error: Symbol ‘pi’ at (1) already has basic type of REAL
corsikacompilefile.f:8730:30:
8730 | COMMON /CRRUNPAR/FIXHEI,THICK0,HILOECM,HILOELB,SIG1I,TARG1I,
| 1
Error: Symbol ‘fixhei’ at (1) is already in a COMMON block
corsikacompilefile.f:8776:30:
8776 | COMMON /CRRUNPAC/DATDIR,DSN,DSNTAB,DSNLONG,HOST,USER
| 1
Error: Symbol ‘datdir’ at (1) is already in a COMMON block
corsikacompilefile.f:8786:29:
8786 | DOUBLE PRECISION FIXHEI,THICK0,HILOECM,HILOELB,SIG1I,TARG1I,
| 1
Error: Symbol ‘fixhei’ at (1) already has basic type of REAL
corsikacompilefile.f:8789:29:
8789 | DOUBLE PRECISION SIGMAQ(4)
| 1
Error: Symbol ‘sigmaq’ at (1) already has basic type of REAL
corsikacompilefile.f:8794:28:
8794 | INTEGER NRRUN,NSHOW,MPATAP,MONIIN,MONIOU,MDEBUG,NUCNUC,
| 1
Error: Symbol ‘nrrun’ at (1) already has basic type of INTEGER
corsikacompilefile.f:8798:29:
8798 | INTEGER MPACUT,MPAINP,MPAJOB
| 1
Error: Symbol ‘mpacut’ at (1) already has basic type of INTEGER
corsikacompilefile.f:8804:30:
8804 | INTEGER IUDEBUG,IUDEBG0
| 1
Error: Symbol ‘iudebug’ at (1) already has basic type of INTEGER
corsikacompilefile.f:8806:28:
8806 | INTEGER LSTCK
| 1
Error: Symbol ‘lstck’ at (1) already has basic type of INTEGER
corsikacompilefile.f:8810:29:
8810 | CHARACTER*132 FILOUT
| 1
Error: Symbol ‘filout’ at (1) already has basic type of CHARACTER
corsikacompilefile.f:8812:26:
8812 | CHARACTER*255 DSN,DSNTAB,DSNLONG
| 1
Error: Symbol ‘dsn’ at (1) already has basic type of CHARACTER
corsikacompilefile.f:8813:29:
8813 | CHARACTER*132 DATDIR
| 1
Error: Symbol ‘datdir’ at (1) already has basic type of CHARACTER
corsikacompilefile.f:8814:27:
8814 | CHARACTER*60 HOST,USER
| 1
Error: Symbol ‘host’ at (1) already has basic type of CHARACTER
corsikacompilefile.f:8816:29:
8816 | CHARACTER*255 DSNCUT,DSNINP,DSNJOB
| 1
Error: Symbol ‘dsncut’ at (1) already has basic type of CHARACTER
corsikacompilefile.f:8819:29:
8819 | CHARACTER*9 LSTDSN
| 1
Error: Symbol ‘lstdsn’ at (1) already has basic type of CHARACTER
corsikacompilefile.f:8821:29:
8821 | LOGICAL DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
| 1
Error: Symbol ‘debdel’ at (1) already has basic type of LOGICAL
corsikacompilefile.f:8825:31:
8825 | LOGICAL FOUTFILE
| 1
Error: Symbol ‘foutfile’ at (1) already has basic type of LOGICAL
corsikacompilefile.f:8826:29:
8826 | INTEGER IFINAM
| 1
Error: Symbol ‘ifinam’ at (1) already has basic type of INTEGER
corsikacompilefile.f:8829:29:
8829 | DOUBLE PRECISION ECTCUT,ECTMAX
| 1
Error: Symbol ‘ectcut’ at (1) already has basic type of REAL
corsikacompilefile.f:8830:28:
8830 | INTEGER MPIID
| 1
Error: Symbol ‘mpiid’ at (1) already has basic type of INTEGER
corsikacompilefile.f:8831:30:
8831 | LOGICAL FECTOUT,FECTEGS,FECTACT,FPRIM
| 1
Error: Symbol ‘fectout’ at (1) already has basic type of LOGICAL
corsikacompilefile.f:8832:31:
8832 | INTEGER I1CUTPAR,I2CUTPAR
| 1
Error: Symbol ‘i1cutpar’ at (1) already has basic type of INTEGER
corsikacompilefile.f:8833:30:
8833 | CHARACTER*255 CFILINP,CFILOUT
| 1
Error: Symbol ‘cfilinp’ at (1) already has basic type of CHARACTER
corsikacompilefile.f:8839:29:
8839 | LOGICAL FURQMD,FURQSG
| 1
Error: Symbol ‘furqmd’ at (1) already has basic type of LOGICAL
corsikacompilefile.f:9138:72:
9138 | * SINT,SINT0,SPHI,SPHI0,XXX,YYY,ZZZ
| 1
Error: Unexpected data declaration statement at (1)
corsikacompilefile.f:9139:72:
9139 | SAVE
| 1
Error: Unexpected attribute declaration statement at (1)
make[1]: *** [Makefile:793: libcorsika_a-corsikacompilefile.o] Error 1
make[1]: Leaving directory '/home/aera/corsika7/src'
make: *** [Makefile:469: install-recursive] Error 1