CMAQ (benchmark run)

Hi,
I was having problem in installing netcdf-fortran after installing netcdf-c in Linux machine using gcc compiler. The netcdf-c compiled well but netcdf-fortran did not. Tried with different versions of both too several times! just to make it brief, can anyone help with the following questions?

Is it possible to just use netcdf that contains both fortran and c (e.g. netcdf-4.6.2), and no separate fortran netcdf, to make CMAQ benchmark case to run? I tried with that but got undefined references errors (e.g. _nc_var_put etc) while running preprocessors.

Thank you

You mean netCDF-3.6.2 instead of 4.6.2 ?

Yes. Any version from netCDF-3.0 onwards should work (there is a binary-API incompatibility between netCDF-2.x anbd netCDF-3.x that prevents earlier netCDF versions).

However, be aware that you need to edit Makefiles e(etc.) to use just “-lnetcdf” instead of "-lnetcdff -lnetcdf".

Be also aware that starting at some netCDF-4.x version, they silently eliminated the"CALL NC*()" interfaces upon which the I/O API versions 3.1 and earlier depend, so that if you’re using netCDF-4.x you need to be using I/O API version 3.2 (or later, whenever that happens); it was carefully re-coded to replace over 700 “CALL NC*()” with the new-netCDF-version "IERR=NF_*()" calls.

So: You should always be able to use the netCDF 3.x libraries; if you’re using netcdf-C/netCDF-fortran 4.x, you need I/O API-3.2.

Oops: “over 700” should have been 943.

Thank you so much for the quick and very useful hints! I am a beginner on CMAQ although I could build and use WRF (which has a ‘better’ documentation to install libraries), I have one more question:

I want to run CMAQv5.2 using multi-processors (and the focus is to get Benchmark case run), for that do I need to have parallel netcdf (pnetcdf) or just netcdf (e.g. the netcdf 3.6.2 ) would suffice?
Again, will the mpich3.2.1 work for that (I saw mvapich and openmpi in the documentation; I assume mvapich is the ‘same’ as mpich for this purpose )?

Thank you

By the way, the library-manual can be found at either https://www.cmascenter.org/ioapi/documentation/all_versions/html/AA.html or https://cjcoats.github.io/ioapi/AA.html; the installation guide is under the Availability/Download/Installation contents-item.

CMAQ requires MPI, which can have any of a number of choices of implementation-- mvapich and openmpi as you note, but also mpich or Intel MPI (impi), or …

Be aware that for all of these, the “compilers” mpif90 and mpicc are actually scripts that call some specific underlying compiler (which is set up when the MPI implementation is installed) and which know about implementation-and-compiler specific include-files (mpi.h, for example) and libraries (libmpi.a) which actually do vary from installation to installation. It is, for example, an easy-to-make but hard-to-diagnose mistake to accidentally use an OpenMPU mpi.h with and mvapich mpif90… or to have both Intel icc/ifort and GNU gcc/gfortran OpenMPI installations on one server, and accidentally use the libraries from one with the compilers from the other.

Thank you. I will try with your suggestions and will come back if faced any issue.

While CMAQ requires MPI, when you build ioapi, I think it is best to use a Makeinclude file that does not have mpi at the end of the name.
These are files that require the pnetcdf library, and use the following option -DIOAPI_PNCF=1 to specify that pnetcdf is required.

For example, if building the ioapi library with the ifort compiler use:
Makeinclude.Linux2_x86_64ifort
Do not use:
Makeinclude.Linux2_x86_64ifortmpi

Thank you for the hints. However, I am getting undefined reference errors in building ICON. The details of ‘bldit_icon.log’ are here. I wonder if you can figure out what might be wrong with.

Compiler is set to gcc
set ICON_SRC = /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src
setenv REPOROOT /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src
set Mechs = /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/CCTM/src/MECHS
set VRSN = v52
set INPT = profile
set EXEC = ICON_v52_profile.exe
set CFG = ICON_v52_profile.cfg
set CompileBLDMAKE
set CopySrc
set ModCommon = common
set ModType = profile
set ModMech = prof_data/cb05_ae6_aq
set Mechanism = cb05e51_ae6_aq/
set Tracer = trac0
set FC = /bin/gfortran
set FP = /bin/gfortran
setenv BLDER /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/UTIL/bldmake/bldmake_gcc.exe
set xLib_Base = /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc
set xLib_1 = ioapi/modules
set xLib_2 = ioapi/include_files
set xLib_4 = ioapi/lib
set FSTD = -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising
set DBG = -Wall -O0 -g -fcheck=all -ffpe-trap=invalid,zero,overflow -fbacktrace
set F_FLAGS = -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32
set F90_FLAGS = -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32
set CPP_FLAGS =
set LINK_FLAGS =
set LIB1 = -lioapi
set LIB2 = -lnetcdf -lnetcdff
if ( ! -e /home/somedir/cmaq_user/cmaq_test/CMAQv5.2 || ! -e /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc ) then
echo Model repository base path: /home/somedir/cmaq_user/cmaq_test/CMAQv5.2
Model repository base path: /home/somedir/cmaq_user/cmaq_test/CMAQv5.2
echo library path: /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc
library path: /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc
if ( 0 ) then
set BLD_OS = uname -s
uname -s
if ( Linux != Linux ) then
set Bld = /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/scripts/BLD_ICON_v52_profile_gcc
if ( ! -e /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/scripts/BLD_ICON_v52_profile_gcc ) then
mkdir /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/scripts/BLD_ICON_v52_profile_gcc
else
cd /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/scripts/BLD_ICON_v52_profile_gcc
if ( 1 ) then
/bin/cp -fp /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/CCTM/src/MECHS/cb05e51_ae6_aq//AE_cb05e51_ae6_aq.nml /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/CCTM/src/MECHS/cb05e51_ae6_aq//GC_cb05e51_ae6_aq.nml /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/CCTM/src/MECHS/cb05e51_ae6_aq//NR_cb05e51_ae6_aq.nml /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/scripts/BLD_ICON_v52_profile_gcc
/bin/cp -fp /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/CCTM/src/MECHS/trac0/Species_Table_TR_0.nml /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/scripts/BLD_ICON_v52_profile_gcc
else
set Cfile = ICON_v52_profile.cfg.bld
set quote = "
echo
echo model ICON_v52_profile.exe;
echo
echo repo /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src;
echo
echo mechanism cb05e51_ae6_aq/;
echo
echo lib_base /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc;
echo
echo lib_1 ioapi/modules;
echo
echo lib_2 ioapi/include_files;
echo
echo lib_4 ioapi/lib;
echo
set text = “”;
echo cpp_flags “”;
echo
echo f_compiler /bin/gfortran;
echo
echo fstd “-O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising”;
echo
echo dbg “-Wall -O0 -g -fcheck=all -ffpe-trap=invalid,zero,overflow -fbacktrace”;
echo
echo f_flags “-ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32”;
echo
echo f90_flags “-ffree-form -ffree-line-length-none -funroll-loops -finit-character=32”;
echo
echo link_flags “”;
echo
echo ioapi “-lioapi”;
echo
echo netcdf "-lnetcdf -lnetcdff ";
echo

set text=// mechanism:
echo // mechanism: cb05e51_ae6_aq/
echo // project repository: /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src
echo
set text = common
echo // required common
echo Module common;
echo
set text = profile, m3conc, tracer
echo // options are profile, m3conc, tracer
echo Module profile;
echo
set text = cb05, saprc99, saprc07t
echo // options are cb05, saprc99, saprc07t
echo Module prof_data/cb05_ae6_aq;
echo
if ( 0 ) then
unalias mv rm
if ( 1 || ! -f /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/UTIL/bldmake/bldmake_gcc.exe ) then
cd /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/UTIL/bldmake/scripts
./bldit_bldmake.csh
endif
set Blder = /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/UTIL/bldmake/bldmake_gcc.exe -serial -verbose
cd /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/scripts/BLD_ICON_v52_profile_gcc
if ( 0 ) then
if ( 1 ) then
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/UTIL/bldmake/bldmake_gcc.exe -serial -verbose ICON_v52_profile.cfg.bld
REPOROOT set to:/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src

Model set to ICON_v52_profile.exe
Repository set to /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src
Mechanism set to cb05e51_ae6_aq/
LIB_BASE set to /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc
LIB_1 set to ioapi/modules
LIB_2 set to ioapi/include_files
LIB_4 set to ioapi/lib
CPP_FLAGS set to
F_COMPILER set to /bin/gfortran
FSTD set to -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising
DBG set to -Wall -O0 -g -fcheck=all -ffpe-trap=invalid,zero,overflow -fbacktrace
f_flags set to -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32
f90_flags set to -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32
LINK_FLAGS set to
IOAPI set to -lioapi
NETCDF set to -lnetcdf -lnetcdff

Building file list for module common
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/CGRID_SPCS.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/findex.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/gc_spc_map.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/get_envlist.f added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/HGRD_DEFN.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/icon.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/IC_PARMS.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/lat_lon.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/lr_interp.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/lst_spc_map.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/ngc_spc_map.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/opn_ic_file.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/setup_logdev.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/subhdomain.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/UTILIO_DEFN.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/common/VGRD_DEFN.F added to make list

Building file list for module profile
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/profile/prof_driver.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/profile/prof_icout.F added to make list
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/profile/prof_vinterp.F added to make list

Building file list for module prof_data/cb05_ae6_aq
file /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/src/prof_data/cb05_ae6_aq/ic_profile_CB05.dat added to make list

Determining global module files
file CGRID_SPCS.F determined to be global
file HGRD_DEFN.F determined to be global
file IC_PARMS.F determined to be global
file UTILIO_DEFN.F determined to be global
file VGRD_DEFN.F determined to be global

Generating Makefile

Compilers defined
CPP Flags defined
Libraries defined
Includes defined
Objects defined
Make rules defined

file,nfields-1 CGRID_SPCS.F 2
modName,modFile 2 UTILIO_DEFN UTILIO_DEFN.F

file,nfields-1 gc_spc_map.F 3
modName,modFile 2 UTILIO_DEFN UTILIO_DEFN.F
modName,modFile 3 CGRID_SPCS CGRID_SPCS.F

file,nfields-1 HGRD_DEFN.F 2
modName,modFile 2 UTILIO_DEFN UTILIO_DEFN.F

file,nfields-1 icon.F 6
modName,modFile 2 HGRD_DEFN HGRD_DEFN.F
modName,modFile 3 VGRD_DEFN VGRD_DEFN.F
modName,modFile 4 UTILIO_DEFN UTILIO_DEFN.F
modName,modFile 5 CGRID_SPCS CGRID_SPCS.F
modName,modFile 6 IC_PARMS IC_PARMS.F

file,nfields-1 lat_lon.F 2
modName,modFile 2 UTILIO_DEFN UTILIO_DEFN.F

file,nfields-1 lr_interp.F 2
modName,modFile 2 UTILIO_DEFN UTILIO_DEFN.F

file,nfields-1 lst_spc_map.F 4
modName,modFile 2 UTILIO_DEFN UTILIO_DEFN.F
modName,modFile 3 CGRID_SPCS CGRID_SPCS.F
modName,modFile 4 IC_PARMS IC_PARMS.F

file,nfields-1 ngc_spc_map.F 4
modName,modFile 2 UTILIO_DEFN UTILIO_DEFN.F
modName,modFile 3 CGRID_SPCS CGRID_SPCS.F
modName,modFile 4 IC_PARMS IC_PARMS.F

file,nfields-1 opn_ic_file.F 6
modName,modFile 2 HGRD_DEFN HGRD_DEFN.F
modName,modFile 3 VGRD_DEFN VGRD_DEFN.F
modName,modFile 4 UTILIO_DEFN UTILIO_DEFN.F
modName,modFile 5 CGRID_SPCS CGRID_SPCS.F
modName,modFile 6 IC_PARMS IC_PARMS.F

file,nfields-1 setup_logdev.F 2
modName,modFile 2 UTILIO_DEFN UTILIO_DEFN.F

file,nfields-1 subhdomain.F 2
modName,modFile 2 UTILIO_DEFN UTILIO_DEFN.F

file,nfields-1 UTILIO_DEFN.F 3
modName 2 M3UTILIO -------------
modName 3 PARUTILIO -------------

file,nfields-1 VGRD_DEFN.F 2
modName,modFile 2 UTILIO_DEFN UTILIO_DEFN.F

file,nfields-1 prof_driver.F 4
modName,modFile 2 UTILIO_DEFN UTILIO_DEFN.F
modName,modFile 3 CGRID_SPCS CGRID_SPCS.F
modName,modFile 4 IC_PARMS IC_PARMS.F

file,nfields-1 prof_icout.F 5
modName,modFile 2 HGRD_DEFN HGRD_DEFN.F
modName,modFile 3 VGRD_DEFN VGRD_DEFN.F
modName,modFile 4 UTILIO_DEFN UTILIO_DEFN.F
modName,modFile 5 IC_PARMS IC_PARMS.F

file,nfields-1 prof_vinterp.F 5
modName,modFile 2 HGRD_DEFN HGRD_DEFN.F
modName,modFile 3 VGRD_DEFN VGRD_DEFN.F
modName,modFile 4 UTILIO_DEFN UTILIO_DEFN.F
modName,modFile 5 IC_PARMS IC_PARMS.F

USE/MODULE dependencies defined

Makefile generated
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files UTILIO_DEFN.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files HGRD_DEFN.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files IC_PARMS.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files CGRID_SPCS.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files VGRD_DEFN.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files findex.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files gc_spc_map.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files get_envlist.f
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files icon.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files lat_lon.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files lr_interp.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files lst_spc_map.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files ngc_spc_map.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files opn_ic_file.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files setup_logdev.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files subhdomain.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files prof_driver.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files prof_icout.F
/bin/gfortran -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files prof_vinterp.F
/bin/gfortran UTILIO_DEFN.o HGRD_DEFN.o IC_PARMS.o CGRID_SPCS.o VGRD_DEFN.o findex.o gc_spc_map.o get_envlist.o icon.o lat_lon.o lr_interp.o lst_spc_map.o ngc_spc_map.o opn_ic_file.o setup_logdev.o subhdomain.o prof_driver.o prof_icout.o prof_vinterp.o -L/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib -lioapi -L/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/netcdf/lib -lnetcdf -lnetcdff -o ICON_v52_profile.exe
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libioapi.a(getefile.o): In function getefile_': getefile.F:(.text+0x23): undefined reference toGOMP_critical_name_start’
getefile.F:(.text+0x45): undefined reference to GOMP_critical_name_end' /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libioapi.a(m3msg2.o): In functionm3msg2_’:
m3msg2.F:(.text+0x1e): undefined reference to GOMP_critical_name_start' m3msg2.F:(.text+0x95): undefined reference toGOMP_critical_name_end’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libioapi.a(m3msg2.o): In function m3mesg_': m3msg2.F:(.text+0xe4): undefined reference toGOMP_critical_name_start’
m3msg2.F:(.text+0x169): undefined reference to GOMP_critical_name_end' /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libioapi.a(m3msg2.o): In functionm3prompt_’:
m3msg2.F:(.text+0x1c4): undefined reference to GOMP_critical_name_start' m3msg2.F:(.text+0x2c6): undefined reference toGOMP_critical_name_end’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libioapi.a(m3msg2.o): In function m3parag_': m3msg2.F:(.text+0x3a3): undefined reference toGOMP_critical_name_start’
m3msg2.F:(.text+0x5ce): undefined reference to GOMP_critical_name_end' /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libioapi.a(m3msg2.o): In functionm3flush_’:
m3msg2.F:(.text+0x61a): undefined reference to GOMP_critical_name_start' m3msg2.F:(.text+0x62f): undefined reference toGOMP_critical_name_end’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libioapi.a(write3.o): In function write3_': write3.F:(.text+0x116): undefined reference toGOMP_critical_name_start’
write3.F:(.text+0x131): undefined reference to GOMP_critical_name_end' /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libioapi.a(desc3.o): In functiondesc3_’:
desc3.F90:(.text+0x17): undefined reference to GOMP_single_start' desc3.F90:(.text+0x26): undefined reference toGOMP_barrier’
desc3.F90:(.text+0x3a9): undefined reference to GOMP_critical_name_start' desc3.F90:(.text+0x943): undefined reference toGOMP_critical_name_end’
desc3.F90:(.text+0x104a): undefined reference to `GOMP_critical_name_end’

.
.
.
.

/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-attio.o): In function nf_put_att_text_': fort-attio.c:(.text+0xe9): undefined reference tonc_put_att_text’
fort-attio.c:(.text+0x116): undefined reference to nc_put_att_text' /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-attio.o): In functionnf_get_att_text_’:
fort-attio.c:(.text+0x1be): undefined reference to nc_get_att_text' fort-attio.c:(.text+0x1e6): undefined reference tonc_get_att_text’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-attio.o): In function nf_put_att_int1_': fort-attio.c:(.text+0x2a0): undefined reference tonc_put_att_schar’
fort-attio.c:(.text+0x2cf): undefined reference to nc_put_att_schar' /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-attio.o): In functionnf_get_att_int1_’:
fort-attio.c:(.text+0x377): undefined reference to nc_get_att_schar' fort-attio.c:(.text+0x39f): undefined reference tonc_get_att_schar’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-attio.o): In function nf_put_att_int2_': fort-attio.c:(.text+0x459): undefined reference tonc_put_att_short’
fort-attio.c:(.text+0x488): undefined reference to nc_put_att_short' /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-attio.o): In functionnf_get_att_int2_’:
fort-attio.c:(.text+0x530): undefined reference to nc_get_att_short' fort-attio.c:(.text+0x558): undefined reference tonc_get_att_short’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-attio.o): In function `nf_put_att_int_’:
.
.
.

/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_put_var1_int1_': fort-var1io.c:(.text+0xb6): undefined reference tonc_put_var1_schar’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_get_var1_int1_': fort-var1io.c:(.text+0xf8): undefined reference tonc_get_var1_schar’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_put_var1_int2_': fort-var1io.c:(.text+0x13a): undefined reference tonc_put_var1_short’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_get_var1_int2_': fort-var1io.c:(.text+0x17c): undefined reference tonc_get_var1_short’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_put_var1_int_': fort-var1io.c:(.text+0x1be): undefined reference tonc_put_var1_int’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_get_var1_int_': fort-var1io.c:(.text+0x200): undefined reference tonc_get_var1_int’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_put_var1_real_': fort-var1io.c:(.text+0x242): undefined reference tonc_put_var1_float’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_get_var1_real_': fort-var1io.c:(.text+0x284): undefined reference tonc_get_var1_float’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_put_var1_double_': fort-var1io.c:(.text+0x2c6): undefined reference tonc_put_var1_double’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_get_var1_double_': fort-var1io.c:(.text+0x308): undefined reference tonc_get_var1_double’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_put_var1_': fort-var1io.c:(.text+0x34a): undefined reference tonc_put_var1’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-var1io.o): In function nf_get_var1_': fort-var1io.c:(.text+0x38c): undefined reference tonc_get_var1’
/home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-varaio.o): In function nf_put_vara_text_': fort-varaio.c:(.text+0x5a): undefined reference tonc_put_vara_text’
.
.
.
fort-varaio.c:(.text+0x582): undefined reference to nc_put_vara' /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/lib/libnetcdff.a(fort-varaio.o): In functionnf_get_vara_’:
fort-varaio.c:(.text+0x5f0): undefined reference to `nc_get_vara’
collect2: error: ld returned 1 exit status
make: *** [ICON_v52_profile.exe] Error 1
ERROR while running make command

else
endif
mv Makefile Makefile.gcc
ln -s Makefile.gcc Makefile
if ( 0 != 0 ) then
if ( -e /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/scripts/BLD_ICON_v52_profile_gcc/ICON_v52_profile.cfg ) then
mv ICON_v52_profile.cfg.bld /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/PREP/icon/scripts/BLD_ICON_v52_profile_gcc/ICON_v52_profile.cfg
exit

Add -qopenmp to the definition of FSTD

Generally, the flags in FSTD should match the ones in ioapi/Makeinclude.$BIN

1 Like

Thank you. That did not help, tried changing myFSTD to include -qopenmp. Currently rebuilding everything from scratch again, and will come back if any problem again pops up.

By the way, do we need to change the following (which are ‘suggested’ values in the config script)? I intend not using openmpi but mpich3.2.1
setenv myFSTD “-O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising”
setenv myDBG “-Wall -O0 -g -fcheck=all -ffpe-trap=invalid,zero,overflow -fbacktrace”
#setenv myDBG “$myDBG -fimplicit-none”
setenv myFFLAGS “-ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32”
setenv myFRFLAGS “-ffree-form -ffree-line-length-none -funroll-loops -finit-character=32”
setenv myCFLAGS “-O2”
setenv myLINK_FLAG “-openmp”
setenv extra_lib “”
#setenv mpi_lib “-lmpich” #> -lmpich for mvapich or -lmpi for openmpi
setenv mpi_lib “-lmpich” #> -lmpich for mvapich or -lmpi for openmpi

This needs to be changed to

setenv myLINK_FLAG “-qopenmp”

perhaps that setenv myLINK_FLAG “-qopenmp” should be “-fopenmp” for gfortran? I tried with “-qopenmp”, that said unrecognized option for gfortran. Then tried with “-fopenmpi” that gives the undefined errors like ’

nf_attio.F90:(.text+0xb1): undefined reference to `nc_put_att_text’’

I was able to pass icon and bcon runs, but now the problem appears in CCTM build. Can anybody help?

Last part of the output is here:

file,nfields-1 UTILIO_DEFN.F 3
modName 2 M3UTILIO -------------
modName,modFile 3 PARUTILIO parutilio.f
USE/MODULE dependencies defined

Makefile generated
/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. se_bndy_copy_info_ext.f
/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. se_pe_info_ext.f
/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. se_comm_info_ext.f
/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. se_data_send_module.f
/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. se_domain_info_ext.f
/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. se_internal_util_module.f
/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. se_data_recv_module.f
/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. se_disp_info_ext.f
/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. se_subgrid_info_ext.f
.
.
.
/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. piomaps_mod.f

/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. boundary.f

/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. get_write_map.f

/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. growbuf.f

/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. gtndxhdv.f

/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. interpol.f

/home/somedir/cmaq_user/model_libs/library_cmaq/mpich/bin/mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/modules -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files -I /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/mpi -I. pinterpb.f

pinterpb.f:133: Error: Can’t open included file ‘STATE3.EXT’

make: *** [pinterpb.o] Error 1

ERROR while running make command

endif

else if ( 0 ) then

endif

mv Makefile Makefile.gcc

if ( -e Makefile.gcc && -e Makefile ) rm Makefile

ln -s Makefile.gcc Makefile

if ( 0 != 0 ) then

if ( -e /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/CCTM/scripts/BLD_CCTM_v521_gcc/CCTM_v521.cfg ) then

mv CCTM_v521.cfg.bld /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/CCTM/scripts/BLD_CCTM_v521_gcc/CCTM_v521.cfg

exit

have passed upto building icon and bcon and produced output files for the same! But next problem is explained just above!
Thank you

STATE3.EXT should be in /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files

Is it?

The STATE3.EXT file should be found in the ioapi-3.2/ioapi/fixed_src directory.
This directory should be linked to the /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files directory.
If it is not, please try linking the include_file directory to the ioapi-3.2/ioapi/fixed_src directory. The config_user.csh script attempts to do this for you, but it requires that

  1. you specify the IOAPI_INCL_DIR correctly in the correct section, ie, if you are using the gcc compiler, you must go the gfortran compiler section which has:
case gcc: 
        #> I/O API, netCDF, and MPI library locations
        setenv IOAPI_INCL_DIR  /home/somedir/cmaq_user/cmaq_test/ioapi-3.2/ioapi/fixed_src #> I/O API include header files
        setenv IOAPI_LIB_DIR   /home/somedir/cmaq_user/ioapi-3.2/Linux2_x86_64gfort_openmpi_4.0.1_gcc_9.1.0_old #> I/O API libraries
        setenv NETCDF_LIB_DIR  /home/somedir/cmaq_user/netcdf-c-4.7.0/openmpi_4.0.1_gcc_9.1.0/lib  #> netCDF library path
        setenv NETCDF_INCL_DIR /home/somedir/cmaq_user/netcdf-c-4.7.0/openmpi_4.0.1_gcc_9.1.0/include  #> netCDF include path
        setenv NETCDFF_LIB_DIR  /home/somedir/cmaq_user/netcdf-fortran-4.4.5/openmpi_4.0.1_gcc_9.1.0/lib #> netCDF Fortran library path
        setenv NETCDFF_INCL_DIR /home/somedir/cmaq_user/netcdf-c-4.7.0/openmpi_4.0.1_gcc_9.1.0/include #> netCDF Fortran  include path
        setenv MPI_LIB_DIR     /somecomputer/systempath/mpi/gcc_9.1.0/openmpi_4.0.1 #> MPI directory path

If this setting is correct, then when you source configure_user.csh it will create the links to the library and include file directories for you including the following one:

ln -s /home/somedir/cmaq_user/cmaq_test/CMAQv5.2/lib/x86_64/gcc/ioapi/include_files  /home/somedir/cmaq_user/ioapi-3.2/ioapi/fixed_src

If you have set the environment variables under the wrong case, then it won’t work.
Or, if you have not set the environment variable correctly, then you will need to remove the incorrect link and fix the config_cmaq.csh and source it again.
Once a link has been created, it will not be overwritten, it will need to be removed using the rm command.

Thank you lizadams for the hints.

Can anybody comment on the discrepancy I am getting between the given reference benchmark data and the one I obtained on my machine?

FYI: I am using CMAQv5.2.1, and the names of the files are shown as title in the plot. If not visible, the quantity being plotted is (ref output - my run)/ref output * 100% for NO3

Thanks.

Hi
Which tools did you use for drawing plot?

that’s using python.

1 Like