[MITgcm-support] netcdf v3.x (Gus Correa)

guopu at scsio.ac.cn guopu at scsio.ac.cn
Wed Sep 16 10:22:12 EDT 2015


Hello Gus Correa and others,

I tried following your advices about netcdf, however it still did not work.

The computer uses command 'module' to load libraries and define environment variables. The version of netcdf that I load is named 'netcdf/4.1.3_hdf5_openmpi-intel', and 3 environment variables are given as: $SCINET_NETCDF_BASE, $SCINET_NETCDF_INC, $SCINET_NETCDF_LIB. They point to /scinet/gpc/Libraries/netcdf-4.1.3/openmpi_intel, /scinet/gpc/Libraries/netcdf-4.1.3/openmpi_intel/include, and /scinet/gpc/Libraries/netcdf-4.1.3/openmpi_intel/lib, respectively.


In my optfile I add: LIBS="-L${SCINET_NETCDF_LIB}  -lnetcdff  -lnetcdf". But when I compile it still shows: "Can we create NetCDF-enabled binaries... no". Then I added INCLUDEDIRS and INCLUDES in optfile like LIBS, it still did not work. I did not try Lapack. Where is my mistake?

Best,

Pu





> 
> ------------------------------
> 
> Message: 2
> Date: Thu, 18 Jun 2015 15:12:17 -0400
> From: Gus Correa <gus at ldeo.columbia.edu>
> To: mitgcm-support at mitgcm.org
> Subject: Re: [MITgcm-support] netcdf v3.x
> Message-ID: <55831811.8070703 at ldeo.columbia.edu>
> Content-Type: text/plain; charset=windows-1252; format=flowed
> 
> Hi Pu
> 
> Dimitris pointed out that you can use raw binary output
> (from the MITgcm mdsio package), instead of NetCDF, if you wish.
> 
> However, assuming you want NetCDF output, here is a wild guess:
> 
> In your optfile, try to insert '-lnetcdff -lnetcdf' in your LIBS 
> variable, say, something like this:
> 
> LIBS="-L${NETCDF_HOME}/lib -lnetcdff -lnetcdf"
> 
> (note the double 'ff" in the first), and run genmake2 again.
> 
> NetCDF-3 had only '-lnetcdf' library (for both C and Fortran),
> whereas in NetCDF-4 there is one library for Fortran, one for C,
> and a hierarchical dependency.
> 
> Likewise, for Lapack you may need to point to the location of your 
> lapack, say:
> 
> LIBS="-L${NETCDF_HOME}/lib -lnetcdff -lnetcdf -L/your/lapack/lib -llapack"
> 
> If you are using a Lapack from Intel or ACML
> it may get a tad more involved, because it may require additional (Intel 
> or ACML) libraries.
> 
> I hope this helps,
> Gus Correa
> 
> On 06/18/2015 12:37 PM, Dimitris Menemenlis wrote:
> > You don?t need netcdf or lapack libraries to run MITgcm.
> > Only if you want to output variables in netcdf format, do you need to
> > install a netcdf library.
> >
> >> On Jun 18, 2015, at 9:22 AM, guopu at scsio.ac.cn
> >> <mailto:guopu at scsio.ac.cn> wrote:
> >>
> >> Dear sir,
> >>
> >> I am learning to use MITgcm, and now it runs well except for "Can we
> >> create NetCDF-enabled binaries... no" and "Can we create
> >> LAPACK-enabled binaries... no". The cluster I am using is SCINET in
> >> Canada and the version of netcdf is 4.1.3_hdf5_openmpi_intel. I have
> >> set the environment variables about netcdf in optfile. Now I wonder if
> >> I need install netcdf of other version because that the
> >> MITgcm_manual.pdf says that the standard netCDF v3.x library is
> >> needed. All the netcdf versions are 4.x on SCINET. Should I find a
> >> v3.x and install it in my home directory?
> >>
> >> Thanks for you help.
> >>
> >> Pu
> >>
> >
> >
> >
> > _______________________________________________
> > 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/20150916/46b8ca5f/attachment.htm>


More information about the MITgcm-support mailing list