[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
Tue Mar 14 09:17:57 CET 2017
One partner had the original tar.gz for the version 4.3.5.6. Then I decided to
look at the mod_bats_leaftemp file. For starters, in version 4.3.5.6 it was
mod_bats_leaftemp.F90 and no f90 as in 4.3.5.8 tar.gz. There were differences,
but I assumed that the differences were small and, considering that the
difference between 4.3.5.6 and 4.3.5.8 would have been of solving some minor
bugs, I decided to make an experiment: compile the 4.3.5.8 with the
mod_bats_leaftemp from 4.3.5.6.
The result, was that batslib were successfully compiled, however the compile
was again stopped by make, when it complained about there was no
mod_precip.F90.
I found that there was a mod_precip.f90 instead. I tried the same as in former
follow-ups and changed the name of mod_precip.f90 to mod_precip.F90. I
configured and compiled again (always cleaning with make clean) and finally the
process was successfully completed without errors.
Thus I conclude that the packaging of the version 4.3.5.8 is not good. I will
run it and see if it gives some reasonable output.
I need to thank Peter Nunekpeku. He made an effort to solve my problem. But the
solution implied to get another more recent version of RegCM, which was not the
intent.
I would not mark this topic as closed until there is some review of
the packaged RegCM-4.3.5.8 to solve these problems: two names of source code
files are not correct and one source code file has something missing (probably
a reference to an array or a function) at least.
I know that this version is almost legacy; but trying a new version, like the
most recent, will lead me to a process of tune it again for my region of study.
------------------------------------
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.
2017-03-13 11:42 GMT+01:00 Fís. Diego Jiménez de la Cuesta <
diego.jimenez at mpimet.mpg.de>:
> I have tried modifying the Makefile of batslib changing to mod_bats_leaftemp.f90
> the dependencies to construct mod_bats_leaftemp.o. However, the same problem, as
> in the former follow-up, arises. This appears to be, as I have said before, a
> problem of that the model has been packaged with some parts missing or with
> defective files.
>
> It does not apply for me to migrate to the most recent version, since I want to
> compare some results of version 4.3.5.6 with a version that is equivalent. Then
> this error is blocking my research. Please, help me.
>
>
> ------------------------------------
> 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 <+49%2040%2041173386>
> Mob.: +49 (0)170 8139 769 <+49%20170%208139769>
> Email: diego.jimenez at mpimet.mpg.de
> ------------------------------------
>
> Sic Transit Gloria Mundi.
>
> 2017-03-13 11:41 GMT+01:00 Fís. Diego Jiménez de la Cuesta <
> diego.jimenez at mpimet.mpg.de>:
>
>> 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.
>>
>>
>> ------------------------------------
>> 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 <+49%2040%2041173386>
>> Mob.: +49 (0)170 8139 769 <+49%20170%208139769>
>> Email: diego.jimenez at mpimet.mpg.de
>> ------------------------------------
>>
>> Sic Transit Gloria Mundi.
>>
>> 2017-03-10 22:33 GMT+01:00 Fís. Diego Jiménez de la Cuesta <
>> diego.jimenez at mpimet.mpg.de>:
>>
>>> 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 <+49%2040%2041173386>
>>> Mob.: +49 (0)170 8139 769 <+49%20170%208139769>
>>> 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/20170314/982b99e2/attachment-0001.html>
More information about the RegCNET
mailing list