Hi there:
I am attempting to compile the combine post-processing program for CMAQ 5.4, and have ran into an error. I am using gcc 13.3.0 on Ubuntu 24.04, which is running as a parallel cluster on Amazon Web Services. These are the modulefiles I am using:
- openmpi/4.1.7
- netcdf-4.8.1/gcc-9.5
- ioapi-3.2/gcc-9.5-netcdf
- libfabric-aws/2.4.0amzn1.0
I am able to generate a makefile, but the make command fails with this error:
I have very little experiencing writing or compiling Fortran, so I can’t say for sure if there is a problem in the source files, but I did look up the particular error that it generated and found a UCAR forum post by someone talking about this exact error in regards to WRF ( How to Fix: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1) | WRF & MPAS-A Support Forum ).
Apparently there are some Fortran commands that have been deprecated starting at gcc 9.0, and the post goes into the fixes one could do. I don’t know what datatypes VGTOP3D, VGLVS3D, or specValue are, but it stands to reason that if they are indeed different as the error message seems to suggest, those operations that were kosher in gcc <9.0 can no longer compile. I’m wondering if there is any merit to the fixes suggested, and if so, which environment variables in config_cmaq.csh need to be edited in order to make the compiler play nice. For further context, these are the bash commands that are suggested.
export fallow_argument=-fallow-argument-mismatch
export boz_argument=-fallow-invalid-boz
export FFLAGS="$fallow_argument $boz_argument -m64"
export FCFLAGS="$fallow_argument $boz_argument -m64"
