[MITgcm-support] Compiling error when using MNC package

michael schaferkotter schaferk at bellsouth.net
Fri May 12 08:03:39 EDT 2017


typically to build netCDF applications require the hdf5 libraries AND 
the netcdf libraries to be loaded.

0. did not read carefully enough to determine which cray.
1. have not built MITgcm on cray
2. building many other netCDF applications on cray XC-40 using modules 
for an intel build, is accomplished:

module unload PrgEnv-cray PrgEnv-gnu PrgEnv-pgi PrgEnv-intel
module load PrgEnv-intel

module load cray-hdf5/1.8.13
module load cray-netcdf/4.3.2


On 5/12/17 3:23 AM, Yankun Gong wrote:
> Hi Martin,
>
> Thanks for your suggestions.
>
> I have checked the genmake.log file and found the NetCDF libs were 
> successful checked. The details about NetCDF libs in genmake.log are 
> shown below:
>
> running: check_netcdf_libs()
> ===  genmake_tnc.F  >>>
>       program fgennc
> #include "netcdf.inc"
>       integer iret, ncid, xid
>       iret = nf_create('genmake_tnc.nc <http://genmake_tnc.nc>', 
> NF_CLOBBER, ncid)
>       IF (iret .NE. NF_NOERR) write(*,*) NF_STRERROR(iret)
>       iret = nf_def_dim(ncid, 'X', 11, xid)
>       IF (iret .NE. NF_NOERR) write(*,*) NF_STRERROR(iret)
>       iret = nf_close(ncid)
>       IF (iret .NE. NF_NOERR) write(*,*) NF_STRERROR(iret)
>       end
> <<<  genmake_tnc.F  ===
> cat genmake_tnc.F |  cpp -traditional -P -DWORDLENGTH=4 -D_BYTESWAPIO 
> -DHAVE_LAPACK -DALLOW_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE 
> -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT 
> -I/opt/cray/netcdf-hdf5parallel/4.3.3.1/cray/83/include 
> <http://4.3.3.1/cray/83/include> -I${MPICH_DIR}/include
> ftn  -O3 -hfp3 -Oipa5 -c genmake_tnc.f  \
>   &&  ftn  -O3 -hfp3 -Oipa5 -o genmake_tnc.o 
> -L/opt/cray/netcdf-hdf5parallel/4.3.3.1/cray/83/lib 
> <http://4.3.3.1/cray/83/lib> -L${MPICH_DIR}/lib
> /opt/cray/hdf5-parallel/1.8.14/CRAY/8.3/lib/libhdf5_parallel.a(H5PL.o): In 
> function `H5PL__open$$CFE_id_56395c9c_01603595':
> /b/ulib/hdf5/1.8.14/rpm/BUILD/cray-hdf5-1.8.14-cce1-parallel/src/H5PL.c:536: 
> warning: Using 'dlopen' in statically linked applications requires at 
> runtime the shared libraries from the glibc version used for linking
> check_netcdf: successful
>  --> set HAVE_NETCDF='t'
>
> By the way, the attachment is genmake.log file.
>
> Thank again for your help.
>
> Regards,
> Yankun
>
> __
> _
> _
> *Yankun Gong*
> School of Civil, Environmental and Mining Engineering & UWA Oceans 
> Institute
> The University of Western Australia, Perth WA 6009 Australia
> *T *+61 0420 831 087 • *E *yankun.gong at research.uwa.edu.au 
> <mailto:yankun.gong at research.uwa.edu.au>
>
> On 12 May 2017 at 15:59, Martin Losch <Martin.Losch at awi.de 
> <mailto:Martin.Losch at awi.de>> wrote:
>
>     Hi Yakun,
>
>     the error message means, that the netcdf library is not found or
>     that the objects in the libary do not match the “name mangling
>     convention” (I hope that I got this right).
>
>     For debugging, I usually find it the easiest to check the output
>     of genmake2: which of the tests fail? then have a look at
>     genmake.log and check out the details, why and where they fail. I
>     assume that the netcdf example will already fail in that test and
>     you can use the commands in genmake.log to create short test that
>     let’s you play with library settings until it works.
>
>     Martin
>
>     > On 12. May 2017, at 08:55, Yankun Gong
>     <yankun.gong at research.uwa.edu.au
>     <mailto:yankun.gong at research.uwa.edu.au>> wrote:
>     >
>     > Hi all,
>     >
>     > When I decide to compile MITgcm model with mnc package on Cray
>     System, errors occur on the third/last step of compilation (make).
>     In fact, the model can successfully compile without mnc package
>     and I am sure that I have added the Libs of NetCDF on build
>     options. The compiling errors are shown below:
>     >
>     > MNC_CW_READWRITE_I.o: In function `mnc_cw_i_w_s_':
>     >
>     /scratch/pawsey0106/gongyk/MITgcm_c66g/test_IW/build/MNC_CW_READWRITE_I.f:361:
>     undefined
>     > […]
>     > /scratch/pawsey0106/gongyk/MITgcm_c66g/test_IW/build/mnc_var.f:13005: undefined reference to
>     `nf_put_vara_int_'
>     > make[1]: *** [mitgcmuv] Error 1
>     > make[1]: Leaving directory
>     `/scratch/pawsey0106/gongyk/MITgcm_c66g/test_IW/build'
>     > make: *** [fwd_exe_target] Error 2
>     >
>     >
>     > Any help and suggestions are welcome!
>     >
>     > Thanks
>     > Yankun
>     >
>     >
>     > Yankun Gong
>     > School of Civil, Environmental and Mining Engineering & UWA
>     Oceans Institute
>     > The University of Western Australia, Perth WA 6009 Australia
>     > T  +61 0420 831 087  •  E yankun.gong at research.uwa.edu.au
>     <mailto:yankun.gong at research.uwa.edu.au>
>     > _______________________________________________
>     > MITgcm-support mailing list
>     > MITgcm-support at mitgcm.org <mailto:MITgcm-support at mitgcm.org>
>     > http://mitgcm.org/mailman/listinfo/mitgcm-support
>     <http://mitgcm.org/mailman/listinfo/mitgcm-support>
>
>
>     _______________________________________________
>     MITgcm-support mailing list
>     MITgcm-support at mitgcm.org <mailto:MITgcm-support at mitgcm.org>
>     http://mitgcm.org/mailman/listinfo/mitgcm-support
>     <http://mitgcm.org/mailman/listinfo/mitgcm-support>
>
>
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20170512/78849195/attachment-0001.htm>


More information about the MITgcm-support mailing list