CAMx v7.3 compiling with GFortran 13.3.0

Hi everyone,

I am currently learning how to install and compile CAMx 7.30 but I am having some error issues. I have attached the error messages I get when trying to compile CAMx v7.3

I have not found any relevant discussion online or on the GFortran or CAMx forums. Does anyone have any suggestions or comments? Thanks!

Compiling CAMx 7.3 using GFortran 13.3.0 on Ubuntu 24.0.1 (WSL)

make COMPILER=gfortran NCF=NCF4_C


  •                                                           *
    
  • MPI will NOT be built in *
  •                                                           *
    
  • NetCDF will be built in using version 4, with compression *
  •                                                           *
    
  • The IEEE option NOT will be used *
  •                                                           *
    
  •  Executable is: CAMx.v7.30.noMPI.NCF4.gfortran
    
  •                                                           *
    

make modules
make[1]: Entering directory ‘/home/firmanap/CAMx/src.v7.31’
gfortran -c -o Mod_src/camx_includes.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/camx_includes.f
gfortran -c -o Mod_src/grid_dims_mod.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/grid_dims_mod.f
gfortran -c -o Mod_src/node_mod.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/node_mod.f
gfortran -c -o Mod_src/o3colmap.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/o3colmap.f
gfortran -c -o Mod_src/bndary.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/bndary.f
gfortran -c -o Mod_src/camxcom.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/camxcom.f
gfortran -c -o Mod_src/camxfld.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/camxfld.f
gfortran -c -o Mod_src/chmstry.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/chmstry.f
gfortran -c -o Mod_src/filunit.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/filunit.f
gfortran -c -o Mod_src/grid.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/grid.f
gfortran -c -o Mod_src/grid_nodes.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/grid_nodes.f
gfortran -c -o Mod_src/master_mod.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/master_mod.f
gfortran -c -o Mod_src/ncf_iomod.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/ncf_iomod.f
gfortran -c -o Mod_src/pigsty.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/pigsty.f
gfortran -c -o Mod_src/ptemiss.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/ptemiss.f
gfortran -c -o Mod_src/procan.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/procan.f
gfortran -c -o Mod_src/rtracchm.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/rtracchm.f
gfortran -c -o Mod_src/rtcmcchm.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/rtcmcchm.f
gfortran -c -o Mod_src/tracer.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules Mod_src/tracer.f
make[1]: Leaving directory ‘/home/firmanap/CAMx/src.v7.31’
make model
make[1]: Entering directory ‘/home/firmanap/CAMx/src.v7.31’
gfortran -c -o CAMx/CAMx.o -I./Includes -I./Dummy_MPI -I/home/firmanap/CAMx/libs/netcdf-c/include -O2 -mcmodel=medium -J./Modules -fno-align-commons -fconvert=big-endian -frecord-marker=4 -ffixed-line-length-0 -I./Modules CAMx/CAMx.f
CAMx/CAMx.f:195:24:

194 | call nodes_pass(date,1,MPI_INTEGER,itag,numprocs,iproc_id)
| 2
195 | call nodes_pass(time,1,MPI_REAL,itag,numprocs,iproc_id)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
CAMx/CAMx.f:213:24:

194 | call nodes_pass(date,1,MPI_INTEGER,itag,numprocs,iproc_id)
| 2

213 | call nodes_pass(bndtim,1,MPI_REAL,itag,numprocs,iproc_id)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
CAMx/CAMx.f:215:24:

194 | call nodes_pass(date,1,MPI_INTEGER,itag,numprocs,iproc_id)
| 2

215 | call nodes_pass(toptim,1,MPI_REAL,itag,numprocs,iproc_id)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
CAMx/CAMx.f:217:24:

194 | call nodes_pass(date,1,MPI_INTEGER,itag,numprocs,iproc_id)
| 2

217 | call nodes_pass(inptim,1,MPI_REAL,itag,numprocs,iproc_id)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
CAMx/CAMx.f:219:24:

194 | call nodes_pass(date,1,MPI_INTEGER,itag,numprocs,iproc_id)
| 2

219 | call nodes_pass(emstim,1,MPI_REAL,itag,numprocs,iproc_id)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
CAMx/CAMx.f:232:26:

194 | call nodes_pass(date,1,MPI_INTEGER,itag,numprocs,iproc_id)
| 2

232 | call nodes_pass(lupdtdep,ngrid,MPI_INTEGER,
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/INTEGER(4)).
CAMx/CAMx.f:254:26:

194 | call nodes_pass(date,1,MPI_INTEGER,itag,numprocs,iproc_id)
| 2

254 | call nodes_pass(ozntim,1,MPI_REAL,itag,numprocs,iproc_id)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
CAMx/CAMx.f:740:28:

469 | call zeros(rtsolmas(ipsa2d(igrd)),nodes)
| 2

740 | call zeros(nkill,9)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(4)).
CAMx/CAMx.f:741:28:

469 | call zeros(rtsolmas(ipsa2d(igrd)),nodes)
| 2

741 | call zeros(nage,ngrid)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(4)).
make[1]: *** [Makefile:1221: CAMx/CAMx.o] Error 1
make[1]: Leaving directory ‘/home/firmanap/CAMx/src.v7.31’
make: *** [Makefile:549: comp_gfortran] Error 2

gfortran version 10 or later takes a very strict and idiosyncratic interpretation of the latest Fortran-2018 Standard.

You need to borrow your compile flags from the I/O API’s ioapi/Makeinclude.Linux2_x86_64gfort10, in particular the
-fallow-argument-mismatch
in order to disable the type-checking that it claims is causing the error.