As long as you use the same compiler flags that were used to build netcdf c and fortran libraries to build IOAPI, then you should be ok. IOAPI uses the BIN environment variable. You need to edit the ioapi-3.2/ioapi/Makeinclude.$BIN to use the same compiler and flags as was used to build netcdf c and netcdf fortran.
See the ioapi-3.2/README.txt file for more instructions. If you are running CMAQ with mpi, you will also need to install pnetcdf.
installed the below using package manager.
netcdf and openmpi
installed ioapi 3.2
At the moment trying to set the flags in config_cmaq.csh.
i have attached the screenshot of the same.
Could kindly update where and what changes has to be made so that the the file would work properly.
Basically, since you have chosen not to build the recommended netCDF configuration, you need to go to the netCDF installation and run the netCDF commands
nc-config --libs
nf-config --libs
to find what out what extra (e.g., -L) compile directives you need. Your compile-line basically does not know how to find the extra libraries you’ve brought in.
Or else you are perhaps trying to use a vendor supplied netCDF? The I/O API installation instruction says,
Strong Recommendation 2
You are best off if you can build the whole modeling system (libnetcdf.a, libpvm3.a, libioapi.a, etc., and your model(s) CMAQ, SMOKE, etc. with a common compiler set and common set of compile-flags. In particular, Linux-distribution-vendor supplied libnetcdf.a rarely works with CMAS-supported compiler sets.
I want to install IOAPI-3.1. I don’t have any errors in make configure and make, but in make install it gives an error.
Makefile:194: warning: overriding recipe for target ‘/home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort’
Makefile:191: warning: ignoring old recipe for target ‘/home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort’
Makefile:197: warning: overriding recipe for target ‘/home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort’
Makefile:194: warning: ignoring old recipe for target ‘/home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort’
echo “Installing I/O API and M3TOOLS in /home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort and /home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort”
Installing I/O API and M3TOOLS in /home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort and /home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort
(cd /home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/ioapi ; make install)
make[1]: Entering directory ‘/home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/ioapi’
echo “Installing in /home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort” ; cd /home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort; cp libioapi.a /home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort
Installing in /home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort
cp: ‘libioapi.a’ and ‘/home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/Linux2_x86_64ifort/libioapi.a’ are the same file
Makefile:183: recipe for target ‘install’ failed
make[1]: *** [install] Error 1
make[1]: Leaving directory ‘/home/ensiyeh/LIBRARIES/ioapi/ioapi-3.1/ioapi’
Makefile:164: recipe for target ‘install’ failed
make: *** [install] Error 2
Could you guide me,please?