CMAQ v5.3 Compiling Errors

Hello,

I am trying to work through the CMAQ tutorial benchmark for the new v5.3 . I am seeing four warnings

Warning LINKER not defined, using [F_COMPILER]

Warning CPP not defined, using [F_COMPILER]

Warning F_FLAGS not defined, using [f_FLAGS]

Compiling *.F files will fail with preprocessing required.

Warning F90_FLAGS not defined, using [f90_FLAGS]

Compiling *.F90 files will fail with preprocessing required.

and an error at the end of log file.

Makefile:443: recipe for target ‘CCTM_v53.exe’ failed
make: *** [CCTM_v53.exe] Error 1
ERROR while running make command

mv Makefile Makefile.gcc
mv: ‘Makefile’ and ‘Makefile.gcc’ are the same file
if ( -e Makefile.gcc && -e Makefile ) rm Makefile
rm Makefile
ln -s Makefile.gcc Makefile
if ( 0 != 0 ) then
if ( -e /home/colethatcher/Documents/5.3_CMAQ/CCTM/scripts/BLD_CCTM_v53_gcc/CCTM_v53.cfg ) then
echo >>> previous CCTM_v53.cfg exists, re-naming to CCTM_v53.cfg.old <<<

previous CCTM_v53.cfg exists, re-naming to CCTM_v53.cfg.old <<<
mv /home/colethatcher/Documents/5.3_CMAQ/CCTM/scripts/BLD_CCTM_v53_gcc/CCTM_v53.cfg /home/colethatcher/Documents/5.3_CMAQ/CCTM/scripts/BLD_CCTM_v53_gcc/CCTM_v53.cfg.old
endif
mv CCTM_v53.cfg.bld /home/colethatcher/Documents/5.3_CMAQ/CCTM/scripts/BLD_CCTM_v53_gcc/CCTM_v53.cfg
exit

I have looked through the forum for answers and I have tried use the netcdf > --disable-netcdf4 --disable-dap fix but it hasnt worked. Any clue or hint to what would be wrong would be great.

Thanks
Zach config_cmaq.csh (11.3 KB) bldit_cctm_log.txt (148.0 KB)

Update: Figured out the make file error but still having trouble with the 4 warnings at the top

Hi Zach,

The WARNING messages are ok - I also see them when I have a successful compile.
The undefined reference messages that you are getting are further down in the bldit_cctm.log file are what is causing your link step of the compile to fail.

/home/colethatcher/Documents/5.3_CMAQ/lib/x86_64/gcc/ioapi/lib/libioapi.a(wratt3.o): In function master.0.wratt3_': wratt3.F90:(.text+0x24d): undefined reference toGOMP_critical_name_start’
wratt3.F90:(.text+0xa9d): undefined reference to GOMP_critical_name_end' wratt3.F90:(.text+0xf88): undefined reference tonfmpi_redef_’
wratt3.F90:(.text+0x1895): undefined reference to `nfmpi_put_att_text_’

You can try adding the following to your config_cmaq.csh
setenv myLINK_FLAG “-qopenmp”

If that doesn’t work, then you may need to rebuild your ioapi library.

If you had rebuilt the netcdf library to use the fix

--disable-netcdf4 --disable-dap 

Then you also needed to rebuild the ioapi library, as it depends on the netcdf library.

There also may be an issue with the linux brew linker not picking up the correct LD_LIBRARY_PATH settings.

Liz

1 Like

For the “GOMP_” errors: since you seem to be using gfortran, that needs to be ‘-fopenmp’ rather than ‘-qopenmp’ (which is Intel specific).

For the others: the `nfmpi_…’ suggests that you’re trying to build a distributed-I/O CMAQ. It needs not only libnetcdff.a and libnetcdf.a but also libpnetcdf.a. (i.e., -lpnetcdf -lnetcdff -lnetcdf in the libraries-clause, and you need to have built libpnetcdf.a, of course)

1 Like

That fixed the problem thanks!