Bcon compilation

#1

Hello,

I am trying to compile CMAQv5.2.1 benchmark, while building bcon, I get the following error, any clue to fix this highly appreciated.
MMS

terp.o -L/home/cmaq/T1/CMAQ_REPO/lib/x86_64/pgi/ioapi/lib -lioapi -L/home/cmaq/T1/CMAQ_REPO/lib/x86_64/pgi/netcdf/lib -lnetcdf -lnetcdff -o BCON_v52_profile.exe
/usr/bin/ld: cannot find -lnetcdff
Makefile:83: recipe for target ‘BCON_v52_profile.exe’ failed
make: *** [BCON_v52_profile.exe] Error 2
ERROR while running make command

FORTRAN STOP

0 Likes

#2

Please take a look at Issue CMAQv5.2.1-i2 on the Known Issues page for v5.2.1 and let us know if the fix that is provided is able to resolve the error.

0 Likes

#3

The issue I think you’re having does not seem to be properly reflected on the CMAQ “known issues” page;
instead, see the I/O API Installation Notes (https://cjcoats.github.io/ioapi/AVAIL.html#ncf4 or https://www.cmascenter.org/ioapi/documentation/all_versions/html/AVAIL.html#ncf4):

…NetCDF Version 4.1 and later also split the Fortran interfaces into a separate library libnetcdff.a As a result, much compatiblity with the infrastructure (Makefiles, etc.) is broken: you must modify all Makefiles, replacing -lnetcdf with lnetcdff -lnetcdf

Carlie J. Coats, Jr., Ph.D. I/O API Author/Maintainer

0 Likes

#4

@cjcoats Please, below is the response I got while trying to configure CMAQ:

ERROR: /home/catalyst/Desktop/Build_WRF/CMAQ-5.2.1/lib/x86_64/gcc/netcdf/lib/libnetcdf.a does not exist in your CMAQ_LIB directorysource config_cmaq.csh gcc! Check your installation before proceeding with CMAQ build.

Also, while compiling ICON and BCON:
rm: No match.
mpif90: Command not found.
mpif90: Command not found.
mpif90: Command not found.
mpif90: Command not found.
mpif90: No match.

ERROR BLDMAKE Compile failed

Kindly help, please.

0 Likes

#5

You are missing required software that is required to build the code.
Please check with your system administrators.

If you are running on a linux server that has a module load command you may need to use

module avail

To determine what modules to load on your server to allow you to find the mpif90 command.

If you do not have system administrators, and need to install the software on your linux system on your own, you can try following these instructions.

0 Likes

#6

Thanks for your response. But the problems still persist after installing netcdf-c-4.6.3 and netcdf-fortran-4.4.4 following your instructions.
The I/O API Version 3.2 couldn’t be installed on my system too. My system’s linux version is ‘‘x86_64-linux-gnu’’ and is not listed among the versions compatible with the I/0 API.

source config_cmaq.csh gcc 7.3.0
Compiler is set to gcc
ERROR: /home/catalyst/Desktop/Build_WRF/CMAQ-5.2.1/lib/x86_64/gcc7.3.0/netcdf/lib/libnetcdf.a does not exist in your CMAQ_LIB directorysource config_cmaq.csh gcc 7.3.0! Check your installation before proceeding with CMAQ build.

I’ll appreciate your further help. Thanks.

0 Likes

#7

Did you follow the I/O API installation instructions, from the I/O API manual?

See https://cjcoats.github.io/ioapi/AVAIL.html#build

What you probably want is BIN=Linux2_x86_64gfort

Carlie J. Coats, Jr., Ph.D. I/O API Author/Maintainer
Senior Software Engineer cjcoats@email.unc.edu
UNC Institute for the Environment www.ie.unc.edu
100 Europa Dr., Suite 490 / Campus Box 1105 Tel 919.843.5951
Chapel Hill, NC 27599-1105 Fax 919.966.9920

0 Likes

#8

Below is what I got:

Makefile:95: home/catalyst/Desktop/Build_WRF/LIBRARIES/ioapi-3.2/ioapi/Makeinclude.Linux2_x86_64gfort: No such file or directory
make: *** No rule to make target ‘home/catalyst/Desktop/Build_WRF/LIBRARIES/ioapi-3.2/ioapi/Makeinclude.Linux2_x86_64gfort’. Stop.

0 Likes