I have found that Makefile asks for the file mod_bats_leaftemp.F90, but only the
file mod_bats_leaftemp.f90 exists. Thus, I changed the name of it. I compiled
with the tweak (that is needed because the makefile requires that
netcdf-fortran libraries are inside netcdf contrary to the convention given by
UNIDATA that splitted netcdf from netcdf-fortran to be independently
distributed) and it tries to compile mod_bats_leaftemp.F90. However, now it
faces a problem since it seems that certain functions have not been declared.
And also there are references to a mod_constants file that appears to be
missing.
gfortran -I/home/mpim/m300556/RegCMtests/RegCMlibs_build/RegCM-4.3.5.8/external
-I/home/mpim/m300556/RegCMtests/RegCMlibs/netcdf/netcdf-4.4.1.1/include
-I/home/mpim/m300556/RegCMtests/RegCMlibs/netcdf/netcdf-4.4.1.1/include
-I/home/mpim/m300556/RegCMtests/RegCMlibs_build/RegCM-4.3.5.8/Share -O3
-mtune=native -fconvert=big-endian -fno-range-check
-I/home/mpim/m300556/RegCMtests/RegCMlibs_build/RegCM-4.3.5.8/Main/mpplib -c
mod_bats_leaftemp.F90
mod_bats_leaftemp.F90:410.53:
rmini(n,j,i) = rsmin(lveg(n,j,i))/rmax0
1
Error: Unexpected STATEMENT FUNCTION statement at (1)
mod_bats_leaftemp.F90:422.40:
radf(n,j,i) = rilmax/radfi
1
Error: Unexpected STATEMENT FUNCTION statement at (1)
mod_bats_leaftemp.F90:419.55:
radfi = radfi + (rad(il)+radd(il)+rmini(n,j,i)) / &
1
Error: Function 'rmini' at (1) has no IMPLICIT type
mod_bats_leaftemp.F90:437.28:
seas = d_one/(rmini(n,j,i)+fseas(tlef(n,j,i),lveg(n,j,i)))
1
Error: Function 'rmini' at (1) has no IMPLICIT type
mod_bats_leaftemp.F90:438.52:
lftrs(n,j,i) = rsmin(lveg(n,j,i))*radf(n,j,i)*seas*vpdf
1
Error: Function 'radf' at (1) has no IMPLICIT type
make[3]: *** [mod_bats_leaftemp.o] Error 1
Makefile:641: recipe for target 'mod_bats_leaftemp.o' failed
As a note, before changing the name to mod_bats_leaftemp.F90. I have compiled
it in another platform and I received the same result as reported in the
initial support issue. I would conclude that the actual packaged version of
RegCM-4.3.5.8 is defective.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 386Mob.: +49 (0)170 8139 769Email: diego.jimenez@mpimet.mpg.de------------------------------------ Sic Transit Gloria Mundi.