So, I downloaded v3.2. Then, I followed the instruction in README.txt.
Then I did the following step (Step 6):
6. Customize “Makefile” for your system:
The default directory for both executables and object
libraries is in directory “…/$BIN” relative to the source
code directories for the I/O API and tools. Edit the
“Makefile” to put “BASEDIR”, “SRCDIR”, and “OBJDIR” wherever
you want it (if you want somewhere other than the default
“./$BIN” location). Look at the “Makefile” header-comment
for further customization options.
Then I typed “make”, however, I received the following errors:
Makefile:200: warning: overriding recipe for target /CMAQ_libs//Linux3 Makefile:197: warning: ignoring old recipe for target /CMAQ_libs//Linu3’
mkdir -p /CMAQ_libs/Linux3/Linux3
mkdir -p /CMAQ_libs/Linux3/ioapi/fixed_src
(cd /CMAQ_libs/Linux3/ioapi ; make fixed_src)
make[1]: Entering directory /CMAQ_libs/Linux3/ioapi' make[1]: Nothing to be done for fixed_src’.
make[1]: Leaving directory CMAQ_libs/Linux3/ioapi' (cd /CMAQ_libs/Linux3/ioapi ; make all) make[1]: Entering directory CMAQ_libs/Linux3/ioapi’
make[1]: *** No rule to make target all'. Stop. make[1]: Leaving directory /CMAQ_libs/Linux3/ioapi’
make: *** [all] Error 2
Then, I have tried to delete it and install the lower version of I/O API (e.g. 3.1), however, I received the same error.
The authoritative version of the build and installation instructions for I/O API Versions 3.0, 3.1, and 3.2 comes from the I/O API web pages, and can be found at either of the following (which duplicate each other:
For each desired configuration of machine, compiler-set, and other options, setenv BIN , where matches the extension on one of the ioapi/Makeinclude.* (creating a new one, if necessary). Then do a top-level make dirs to build the object-directories
I removed all of my previous ioapi (versions 3.1, 3.2, and 3.0) and installed ioapi3.2 from the scratch.
I am trying to compile the library intel2020 and mpi.
Then, in he top folder, I make a copy of Makefile.template to Makefile and modify line 210 based on your above instruction.
The I use this library for the system:
module load intel/2020
module load intel/mpi-2020u2
module load netcdf/4.7.4-intel2020
module load hdf5/1.12.0-intel2020
export NETCDF_LIBDIR=/shared/centos7/netcdf/4.7.4-intel2020/lib
export NETCDF_INCDIR=/shared/centos7/netcdf/4.7.4-intel2020/include
Then I use these export commands:
export BIN=Linux2_x86_64ifortmpi
export INSTALL=/…/WRFCMAQ/CMAQ_libs/
export BASEDIR=/…/WRFCMAQ/CMAQ_libs/ioapi-3.2
export CPLMODE=nocpl
make
Then, I type “make” and find the following error:
mkdir -p /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/Linux2_x86_64ifortmpi
(cd /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi ; make fixed_src)
make[1]: Entering directory /.../WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi' make[1]: Nothing to be done for fixed_src’.
make[1]: Leaving directory /.../WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi' (cd /.../WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi ; sed -e 's|IOAPI_BASE|/.../WRFCMAQ/CMAQ_libs/ioapi-3.2|' -e 's|LIBINSTALL||' -e 's|BININSTALL||' -e 's|IOAPI_DEFS||' -e 's|NCFLIBS|-lnetcdff -lnetcdf|' -e 's|MAKEINCLUDE|include /.../WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi/Makeinclude|' -e 's|PVMINCLUDE|include |' < Makefile.nocpl.sed > Makefile ) (cd /.../WRFCMAQ/CMAQ_libs/ioapi-3.2/m3tools ; sed -e 's|IOAPI_BASE|/.../WRFCMAQ/CMAQ_libs/ioapi-3.2|' -e 's|LIBINSTALL||' -e 's|BININSTALL||' -e 's|IOAPI_DEFS||' -e 's|NCFLIBS|-lnetcdff -lnetcdf|' -e 's|MAKEINCLUDE|include /.../WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi/Makeinclude|' -e 's|PVMINCLUDE|include |' < Makefile.nocpl.sed > Makefile ) (cd /.../WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi ; make BIN=Linux2_x86_64ifortmpi all) make[1]: Entering directory /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi’
cd /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/Linux2_x86_64ifortmpi; mpif90 -auto -warn notruncated_source -Bstatic -static-intel -c -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DAVOID_FLUSH=1 -DBIT32=1 -O3 -unroll -stack_temps -safe_cray_ptr -convert big_endian -assume byterecl -traceback -xHost -openmp -qopenmp -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DAVOID_FLUSH=1 -DBIT32=1 -I/…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi/m3utilio.f
gfortran: error: notruncated_source: No such file or directory
gfortran: error: big_endian: No such file or directory
gfortran: error: byterecl: No such file or directory
gfortran: error: unrecognized command line option ‘-auto’
gfortran: error: unrecognized command line option ‘-warn’
gfortran: error: unrecognized command line option ‘-static-intel’
gfortran: error: unrecognized command line option ‘-stack_temps’
gfortran: error: unrecognized command line option ‘-safe_cray_ptr’
gfortran: error: unrecognized command line option ‘-convert’
gfortran: error: unrecognized command line option ‘-assume’
gfortran: error: unrecognized command line option ‘-traceback’
gfortran: error: unrecognized command line option ‘-qopenmp’
make[1]: *** [m3utilio.o] Error 1
make[1]: Leaving directory `/…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi’
make: *** [all] Error 2
Besides, I try to make the following modification and compile Makefile in m3tools:
LIBS = -L${OBJDIR} -lioapi -L/shared/centos7/netcdf/4.7.4-intel2020/lib -lnetcdff -L/shared/centos7/netcdf/4.7.4-intel2020/lib -lnetcdf (OMPLIBS) (ARCHLIB) $(ARCHLIBS)
However, after the above modification, once I typed “make”, I received the following error:
make: *** No rule to make target m3utilio.mod', needed by airs2m3.o’. Stop.
I removed all of my previous ioapi (versions 3.1, 3.2, and 3.0) and installed ioapi3.2 from the scratch.
I am trying to compile the library intel2020 and mpi.
Then, in he top folder, I make a copy of Makefile.template to Makefile and modify line 210 based on your above instruction.
The I use this library for the system:
module load intel/2020
module load intel/mpi-2020u2
module load netcdf/4.7.4-intel2020
module load hdf5/1.12.0-intel2020
export NETCDF_LIBDIR=/shared/centos7/netcdf/4.7.4-intel2020/lib
export NETCDF_INCDIR=/shared/centos7/netcdf/4.7.4-intel2020/include
Then I use these export commands:
export BIN=Linux2_x86_64ifortmpi
export INSTALL=/…/WRFCMAQ/CMAQ_libs/
export BASEDIR=/…/WRFCMAQ/CMAQ_libs/ioapi-3.2
export CPLMODE=nocpl
make
Then, I type “make” and find the following error:
mkdir -p /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/Linux2_x86_64ifortmpi
(cd /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi ; make fixed_src)
make[1]: Entering directory /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi’ make[1]: Nothing to be done for fixed_src’.
make[1]: Leaving directory /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi’ (cd /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi ; sed -e ‘s|IOAPI_BASE|/…/WRFCMAQ/CMAQ_libs/ioapi-3.2|’ -e ‘s|LIBINSTALL||’ -e ‘s|BININSTALL||’ -e ‘s|IOAPI_DEFS||’ -e ‘s|NCFLIBS|-lnetcdff -lnetcdf|’ -e ‘s|MAKEINCLUDE|include /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi/Makeinclude|’ -e ‘s|PVMINCLUDE|include |’ < Makefile.nocpl.sed > Makefile ) (cd /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/m3tools ; sed -e ‘s|IOAPI_BASE|/…/WRFCMAQ/CMAQ_libs/ioapi-3.2|’ -e ‘s|LIBINSTALL||’ -e ‘s|BININSTALL||’ -e ‘s|IOAPI_DEFS||’ -e ‘s|NCFLIBS|-lnetcdff -lnetcdf|’ -e ‘s|MAKEINCLUDE|include /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi/Makeinclude|’ -e ‘s|PVMINCLUDE|include |’ < Makefile.nocpl.sed > Makefile ) (cd /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi ; make BIN=Linux2_x86_64ifortmpi all) make[1]: Entering directory /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi’
cd /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/Linux2_x86_64ifortmpi; mpif90 -auto -warn notruncated_source -Bstatic -static-intel -c -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DAVOID_FLUSH=1 -DBIT32=1 -O3 -unroll -stack_temps -safe_cray_ptr -convert big_endian -assume byterecl -traceback -xHost -openmp -qopenmp -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DAVOID_FLUSH=1 -DBIT32=1 -I/…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi /…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi/m3utilio.f
gfortran: error: notruncated_source: No such file or directory
gfortran: error: big_endian: No such file or directory
gfortran: error: byterecl: No such file or directory
gfortran: error: unrecognized command line option ‘-auto’
gfortran: error: unrecognized command line option ‘-warn’
gfortran: error: unrecognized command line option ‘-static-intel’
gfortran: error: unrecognized command line option ‘-stack_temps’
gfortran: error: unrecognized command line option ‘-safe_cray_ptr’
gfortran: error: unrecognized command line option ‘-convert’
gfortran: error: unrecognized command line option ‘-assume’
gfortran: error: unrecognized command line option ‘-traceback’
gfortran: error: unrecognized command line option ‘-qopenmp’
make[1]: *** [m3utilio.o] Error 1
make[1]: Leaving directory `/…/WRFCMAQ/CMAQ_libs/ioapi-3.2/ioapi’
make: *** [all] Error 2
Besides, I try to make the following modification and compile Makefile in m3tools:
LIBS = -L${OBJDIR} -lioapi -L/shared/centos7/netcdf/4.7.4-intel2020/lib -lnetcdff -L/shared/centos7/netcdf/4.7.4-intel2020/lib -lnetcdf
(OMPLIBS) (ARCHLIB) $(ARCHLIBS)
However, after the above modification, once I typed “make”, I received the following error:
make: *** No rule to make target m3utilio.mod’, needed by airs2m3.o’. Stop.
Acquire and build the netCDF library, libnetcdf.a (and libnetcdff.a for netCDF-4.1 or later), for each configuration…
Vendor supplied netCDF libraries frequently cause problems, in part because they are compiled with compilers that are not link-compatible with the Fortran compilers used by the I/O API and the various models
Build your own netCDF C and Fortran libraries!
See item 5 in the build instructions: BIN=Linux2_x86_64ifortmpi is for building the distributed-I/O version, and also requires that you build the relevant PnetCDF library
If you are doing an Intel icc/ifort based build, what in the world are you doing using gfortran? Use the same compiler-system for all the models. Note that command line options for gfortran are very different to command line options for ifort.
libimf.so is part of the Intel math runtime-libraries. This would indicate that you did not have a fully set-up set of Intel compilers when you did this.
See your systems administrator (or whoever installed ifort and icc): somewhere in that installation is a set of scripts that set up various environment variables like LD_LIBRARY_PATH for the compilers. He needs to tell them how to source these scripts before you start to use the compilers. (The usual practice is to have this done as part of login-processing of /etc/profile.d/ or else as part of your .bashrc; or for systems using the MODULE software-management environment as part of the module load command.)
I have tried compiling netcdf (and hdf5) with intel 2020 compilers + MPI and Intel2020 + mvapich2 , based on the instructions here:
However, it seems that using Intel 2020 compilers might be the issue. I’ll continue with some combinations of the intel 2021 compilers, and will try openmpi instead of mvapich2. Unfortunately, we don’t have intel compilers of earlier versions than 2019 as they have in their example. Additionally, they mention that newer intel compiler versions (>18.0) have some incompatibilities. https://www.cmascenter.org/ioapi/documentation/all_versions/html/AVAIL.html
In this case, is it ok with switching to GNU compilers?
Also, the configuration and compilation notes suggested I did not build with the MPI option, can you please tell me if I can use a version without MPI?
For your information, since I want to install CMAQ later, I am not sure about MPI. However, from what I understand from the documentation of ioapi, it can be compiled without the option of MPI (which is related to using a parallel version of netCDF and other libraries), but CMAQ needs parallelism to run with more processors.
I/O API can be build with the gnu compilers without MPI
The same gnu compilers should be used to build CMAQ with MPI, using the non-mpi version of I/O API as a library.