[RegCNET] RegCM-4.3.5.8 fails to compile and requires tweak in configure step

Fís. Diego Jiménez de la Cuesta diego.jimenez at mpimet.mpg.de
Fri Mar 10 22:33:16 CET 2017


First, when configuring RegCM, once the prerequisites are built, tested and
installed, it seems that RegCM tries to find the netcdf.mod from netcdf-fortran
inside the include directory of netcdf and not in netcdf-fortran include
directory. This happens althought I am giving configure the adequate CPPFLAGS
paths to the include directories. Then I have made a soft link to the mod
file.

Second, once the configure problem is solved (in an ugly manner) as told
before, when compiling batslib in the make stage it simply stops and says:

*** No hay ninguna regla para construir el objetivo 'mod_bats_leaftemp.F90',
necesario para 'mod_bats_leaftemp.o'.  Alto.

or translated:

*** No rule to make target 'mod_bats_leaftemp.F90', needed by
'mod_bats_leaftemp.o'. Stop.

Here, I have no clue what is going on.

---------------------------------Build
details----------------------------------

First I made a build with mvapich2 library, but later I tried a mpich build,
since I thought that it could be a source of error. This is not the case, since
both end at the same error in batslib and also when mpif90 is used for some of
the modules before batslib both --mvapich2 and mpich-- succeed in the build of
them.

I am building zlib, mpich, hdf5, netcdf and netcdf-fortran from source with gcc
and gfortran, using the following commands

zlibnam=zlib-1.2.11
zlibbdir=${libsb}/${zlibnam}
zlibidir=${libs}/zlib/${zlibnam}

cd ${zlibbdir}
./configure --prefix=${zlibidir} --static
make
make test
make check
make install



mpicnam=mpich-3.2
mpicbdir=${libsb}/${mpicnam}
mpicidir=${libs}/mpich/${mpicnam}

cd ${mpicbdir}
./configure --prefix=${mpicidir}
make
make test
make check
make install



hdf5nam=hdf5-1.10.0
hdf5bdir=${libsb}/${hdf5nam}-patch1
hdf5idir=${libs}/hdf5/${hdf5nam}

cd ${hdf5bdir}
./configure --prefix=${hdf5idir}
--with-zlib=${zlibidir}/include,${zlibidir}/lib --disable-shared --disable-cxx
--disable-fortran
make
make test
make check
make install



ncdfnam=netcdf-4.4.1.1
ncdfbdir=${libsb}/${ncdfnam}
ncdfidir=${libs}/netcdf/${ncdfnam}

cd ${ncdfbdir}
CPPFLAGS="-I${hdf5idir}/include -I${zlibidir}/include"
LDFLAGS="-L${hdf5idir}/lib -L${zlibidir}/lib" LIBS="-lhdf5_hl
-lhdf5 -lz" ./configure --prefix=${ncdfidir} --disable-shared
--disable-dap --enable-netcdf4
make
make test
make check
make install



nfornam=netcdf-fortran-4.4.4
nforbdir=${libsb}/${nfornam}
nforidir=${libs}/netcdf-fortran/${nfornam}

cd ${nforbdir}
export PATH=${ncdfidir}/bin:${PATH}
CPPFLAGS="-I${ncdfidir}/include -I${hdf5idir}/include
-I${zlibidir}/include" LDFLAGS="-L${ncdfidir}/lib -L${hdf5idir}/lib
-L${zlibidir}/lib" LIBS="-lnetcdf -lhdf5_hl -lhdf5 -lz"
./configure --prefix=${nforidir} --disable-shared
make
make test
make check
make install

ln -s ${nforidir}/include/* ${ncdfidir}/include/



regcmnam=RegCM-4.3.5.8
regcmbdir=${libsb}/${regcmnam}
regcmidir=${libs}/RegCM/${regcmnam}

tar -zxvf ${regcmnam}.tar.gz
cd ${regcmbdir}
export
PATH=${zlibidir}/bin:${mpicidir}/bin:${hdf5idir}/bin:${nforidir}/bin:$PATH
./configure CPPFLAGS="-I${nforidir}/include -I${ncdfidir}/include
-I${hdf5idir}/include -I${zlibidir}/include -I${mpicidir}/include"
LDFLAGS="-L${nforidir}/lib -L${ncdfidir}/lib -L${hdf5idir}/lib
-L${zlibidir}/lib -L${mpicidir}/lib" LIBS="-lnetcdff -lnetcdf
-lhdf5_hl -lhdf5 -lz" --prefix=${regcmidir}
make
#make test
#make check
#make install



------------------------------------
Diego Jiménez de la Cuesta Otero
Doktorand IMPRS-ESM
Max-Planck-Institut für Meteorologie
Atmosphäre im Erdsystem/Klimadynamik
Bundesstraße 53, Raum B429
D-20146 Hamburg

Tel.: +49 (0) 40 41173 386
Mob.: +49 (0)170 8139 769
Email: diego.jimenez at mpimet.mpg.de
------------------------------------

Sic Transit Gloria Mundi.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20170310/723e1964/attachment.html>


More information about the RegCNET mailing list