Hi,
can anybody help with what’s wrong with my process (below) toward making CMAQ v5.2 Benchmark case run? currently I am geting ‘undefined reference error’ in ICON.
-compiler flags
export DIR=/home/somedir/cmaq_user/model_libs/library_cmaq
export CC=/bin/gcc
export CPPFLAGS=’-DNDEBUG -DgFortran’
export CFLAGS=’-O -m64 -mcmodel=medium’
export FC=gfortran
export FCFLAGS=’-O -w -m64’
export F77=/bin/gfortran
export F90=/bin/gfortran
export FFLAGS=’-O -w -m64’
export CXX=/bin/g++
export CXXFLAGS=’-O -m64 -mcmodel=medium’
export NCDIR=${DIR}/netcdf
tar zxvf netcdf-c-4.6.3.tar.gz
cd netcdf-c-4.6.3
./configure --prefix=$NCDIR --disable-dap
–disable-netcdf-4 --disable-shared
make check
make install
cd …
tar zxvf netcdf-fortran-4.2.tar.gz
cd netcdf-fortran-4.2
CPPFLAGS="CPPFLAGS -I{NCDIR}/include"
LDFLAGS="-L${NCDIR}/lib"
LD_LIBRARY_PATH={NCDIR}/lib \
LIBS="-lnetcdf" \
./configure --disable-shared --prefix={NCDIR}
make check
make install
Download and install the ioapi3.2
unset F90
export BASEDIR=$DIR/ioapi3.2
mkdir -pv $BASEDIR
git clone https://github.com/cjcoats/ioapi-3.2 $BASEDIR
export BIN=Linux2_x86_64gfort_medium
export CPLMODE=nocpl
mkdir $BASEDIR/$BIN
cp $BASEDIR/ioapi/Makefile.nocpl BASEDIR/ioapi/Makefile
sed -i "s|BASEDIR =.*| BASEDIR = $BASEDIR|" $BASEDIR/ioapi/Makefile
cp $BASEDIR/m3tools/Makefile.nocpl BASEDIR/m3tools/Makefile
sed -i "s|BASEDIR =.*| BASEDIR = $BASEDIR|" $BASEDIR/m3tools/Makefile
- copy or link the netcdf and netcdff.a libs to BIN
cp {NCDIR}/lib/*.a $BASEDIR/$BIN
cd $BASEDIR/ioapi
make
#make fixed_src #forCMAQ and SMOKE
cd $BASEDIR/m3tools
make
cd -
Download and install mpi library
wget -c http://www.mpich.org/static/downloads/3.2.1/mpich-3.2.1.tar.gz
tar xzvf mpich-3.2.1.tar.gz
cd mpich-3.2.1
./configure --prefix=$DIR/mpich
make
make install
cd -