SMOKE3.5 is based on Intel Ifort error reporting

My basic libraries are all compiled based on the Intel compiler. Now I want to compile the Intel version of SMOKE3.5. I followed the methods in the manual, but I still encountered a lot of trouble.My IOAPI library and NetCDF library are compiled elsewhere, so I think there may be a problem with this location. My IOAPI is version 3.2 and NetCDF is version 4.4 I tried to modify the makfile in the smoke/src/xxx file,
LIBS = (LDIRS) (LIBS_SYS) (LIBS_COMPILE) -L/home/yz/model_lib/netcdf/lib -lnetcdff -lnetcdf LIBS_DEBUG = (LDIRS) (LIBS_DEBUG_SYS) (LIBS_COMPILE) -L/home/yz/model_lib/netcdf/lib -lnetcdff -lnetcdf
FFLAGS = -O3 -132 -zero -save -common-args -convert big_endian
-I/home/yz/SMOKE3-5/SMOKE3-2018/subsys/ioapi_includes
-I/home/yz/model_lib/netcdf/include

But the problem still hasn’t been solved
I hope to get your help. Thank you.
output_error.txt (169.1 KB)

The latest version of SMOKE is 5.1. We aren’t supporting versions as old as 3.5 at this time.

The problems start here, with include-paths:

ifort -O3 -132 -zero -save -common-args -convert big_endian -I/home/yz/SMOKE3-5/SMOKE3-2018/subsys/ioapi_includes -I/home/yz/model_lib/netcdf/include -c -o grwinven.o grwinven.f
grwinven.f(51): error #5102: Cannot open include file 'EMCNST3.EXT'
        INCLUDE 'EMCNST3.EXT'   !  emissions constant parameters
----------------^
grwinven.f(52): error #5102: Cannot open include file 'IODECL3.EXT'
        INCLUDE 'IODECL3.EXT'   !  I/O API function declarations
----------------^
grwinven.f(53): error #5102: Cannot open include file 'SETDECL.EXT'
        INCLUDE 'SETDECL.EXT'   !  FileSetAPI variables and functions
----------------^
grwinven.f(45): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MODFILESET]
        USE MODFILESET

[etc…

The netCDF INCLUDEs are unnecessary.
The I/O API INCLUDEs should point to the fixed_src sub-directory of your I/ API installation: -I[something]/ioapi-3.2/ioapi/fixed_src.
You also need include-directives for the SMOKE INCLUDE-files and MODULE-files:
-I/home/yz/SMOKE-3.5/SMOKE3-2018/subsys/smoke/src//inc
and
-I/home/yz/SMOKE-3.5/SMOKE3-2018/subsys/smoke/src/emmod/Linux2_x86_64ifort

By the way, the name is not “IOAPI”; it is “I/O API”, which stands for “Input/Output Applications Programming Interface”.

– Carlie J. Coats, Jr., Ph.D.
I/O API author/manager

1 Like

Thank you very much for your answer. I feel ashamed of the incorrect naming of the I/O API. Thank you again for your efforts.

Thank you for your suggestion

Following your guidance and suggestions, I have modified the relevant makefile files in src to read as follows: LIBS=(LDIRS) (LIB_SYS) $(LIBS-COMPILE)
-L/home/yz/model_lib/netcdf/lib -lnetcdff -lnetcdf -qopenmp
-L/home/yz/model_lib/hdf5/lib -lhdf5_fortran -lhdf5_hl -lhdf5
-L/home/yz/model_lib/zlib -lz

LIBS_DEBUG = (LDIRS) (LIBS_DEBUG_SYS) $(LIBS_COMPILE)
-L/home/yz/model_lib/netcdf/lib -lnetcdff -lnetcdf
-L/home/yz/model_lib/hdf5/lib -lhdf5_hl -lhdf5
-L/home/yz/model_lib/zlib -lz

LIBS_PVM = (LDIRS) -liocpl (LIBS) -lpvm3 -mp (LIBS_COMPILE) LIBS_PVMDB = (LDIRS) -liocpl (LIBS) -lpvm3 -mp (LIBS_COMPILE)
FFLAGS = -O3 -132 -zero -save -common-args -convert big_endian
-I/home/yz/SMOKE-3.5/SMOKE3-2018/subsys/smoke/src/inc
-I/home/yz/SMOKE-3.5/SMOKE3-2018/subsys/smoke/src/emmod/Linux2_x86_64ifort
-I/home/yz/model_lib/ioapi-3.2/ioapi/fixed_src
-I/home/yz/SMOKE-3.5/SMOKE3-2018/subsys/edss_tools/src/modules/Linux2_x86_64ifort
-I/home/yz/SMOKE-3.5/SMOKE3-2018/subsys/filesetapi/Linux2_x86_64ifort
-I/home/yz/model_lib/hdf5/include
-I/home/yz/model_lib/zlib/include
-I/home/yz/model_lib/netcdf/include
Although the compilation was successful, by then I saw logs related to netcdf related issues



output_error.txt (528.3 KB)
Supplement on November 25, 2024: In Dr Under Coats’ guidance and advice, I identified the cause of the error. The makefile in the src/smkmmerge file had a definition for LIBS2, but I did not make any changes. Therefore, I later modified it to be the same as LIBS (LIBS2=(LDIRS) (LIB_SYS) $(LIBS-COMPILE))
-L/home/yz/model_lib/netcdf/lib -lnetcdff -lnetcdf
-L/home/yz/model_lib/hdf5/lib -lhdf5_fortran -lhdf5_hl -lhdf5
-L/home/yz/model_lib/zlib -lz)
Successfully compiled through the following steps:
source /home/yz/SMOKE-3.5/SMOKE3-2018/scripts/platform
cd /home/yz/SMOKE-3.5/SMOKE3-2018/subsys/smoke/assigns
source ASSIGNS.nctox.cmaq.cb05_soa.us12-nc
cd /home/yz/SMOKE-3.5/SMOKE3-2018/subsys/smoke/scripts/make

./Makeall clean

./Makeall >& output_error.txt

Thank you again, Dr Coats, your guidance

With netCDF4 libraries, you need to build both the Fortran libnetcdff.a and the C libnetcdf.a

Then your library-flags needs -lnetcdff -lnetcdf

1 Like

Yes, I have


already built the NETCDF library

You still need library-flags -lnetcdff -lnetcdf






I may still not understand the specific location you mentioned. Could you please let me know if this setup works? Are you referring to this place.
LIBS = (LDIRS) (LIBS_SYS) $(LIBS_COMPILE)
-L/home/yz/model_lib/netcdf/lib -lnetcdff -lnetcdf -qopenmp
-L/home/yz/model_lib/hdf5/lib -lhdf5_fortran -lhdf5_hl -lhdf5
-L/home/yz/model_lib/zlib -lz -qopenmp

Look at the first command in the second of your included screen-captures at the top…

I was too careless and didn’t even notice this mistake. Thank you for reminding me.

This is my platform setup, which needs to be changed from the beginning. Please refer to the official documentation for the specific installation process。

setenv SMOKE_EXE Linux2_x86_64ifort

if ( $SMOKE_EXE == Linux2_x86_64pg ) then
setenv FC /nas02/apps/pgi-10.3/linux86-64/10.3/bin/pgf90
setenv FFLAG "-O2 -Msave -Mbackslash -Mbyteswapio -Kieee -Mextend -Bstatic "
setenv DBGFLAG “-g -Mbounds -Msave -Mbackslash -Mbyteswapio -Kieee -Mextend -Bstatic”
else if ( SMOKE_EXE == Linux2_x86_64ifort ) then setenv FC ifort setenv FFLAG "-O3 -132 -zero -save -common-args -convert big_endian" setenv DBGFLAG "-g -132 -zero -save -common-args -convert big_endian" else if ( ! ?FC || ! ?FFLAG || ! ?DBGFLAG ) then
echo “”
if ( ! ?FC ) echo "--> Compiler variable FC undefined..." if ( ! ?FFLAG ) echo “–> Compiler flag variable FFLAG undefined…”
if ( ! $?DBGFLAG ) echo “–> Compiler flag variable DBGFLAG undefined…”
echo “”
echo “–> Set the variables above to proceed…”
echo “”
exit( 1 )
endif
endif

exit( 0 )

Please explain why you are using such an old version of SMOKE. We are not normally trying to support versions that are this old.

Thank you for your question. Hello, I am using this older version of SMOKE to learn how to configure different versions of SMOKE on a computer.