[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #ASX-279014]: Building netcdf-fortran-4.2 on 64-bit CentOS 5.6
- Subject: [netCDF #ASX-279014]: Building netcdf-fortran-4.2 on 64-bit CentOS 5.6
- Date: Wed, 16 May 2012 09:37:11 -0600
Hi Jennifer,
> I have successfully built the C version of netcdf-4.2 with lots of
> important features enabled, here is the output from nc-config:
>
> # /opt/netcdf/4.2/gnu/4.1.2/bin/nc-config --all
>
> This netCDF 4.2 has been built with the following features:
> --cc -> /usr/bin/gcc
> --cflags -> -I/opt/netcdf/4.2/gnu/4.1.2/include
> -I/opt/hdf5/1.8.8/intel/11.1.064/include
> -I/opt/hdf/4.2.6/intel/11.1.064/include -I/opt/szip/2.1/include
> --libs -> -L/opt/netcdf/4.2/gnu/4.1.2/lib -lnetcdf
> --cxx -> @CXX@
> --has-c++ -> @HAS_CXX@
> --fc -> @FC@
> --fflags -> @FFLAGS@ @MOD_FLAG@/opt/netcdf/4.2/gnu/4.1.2/include
> --flibs -> -L/opt/netcdf/4.2/gnu/4.1.2/lib @NC_FLIBS@
> --has-f77 -> @HAS_F77@
> --has-f90 -> @HAS_F90@
> --has-dap -> yes
> --has-nc2 -> yes
> --has-nc4 -> yes
> --has-hdf5 -> yes
> --has-hdf4 -> yes
> --has-pnetcdf-> no
> --has-szlib ->
> --prefix -> /opt/netcdf/4.2/gnu/4.1.2
> --includedir-> /opt/netcdf/4.2/gnu/4.1.2/include
> --version -> netCDF 4.2
>
> We use a module system to set paths and the right environment, here is
> the output from the 'env | grep netcdf' command:
>
> PATH=/opt/netcdf/4.2/gnu/4.1.2/bin:/opt/hdf/4.2.6/intel/11.1.064/bin:/opt/hdf5/1.8.8/intel/11.1.064/bin:/opt/intel/compiler/11.1.064/bin/intel64:/homes/jma/bin:/homes/jma/ncl-6.0.0/bin:/homes/colagds/bin:/usr/local/grads/2.0:/usr/local/grads:/usr/kerberos/bin:/usr/java/default/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:.
> PWD=/opt/netcdf/4.2/intel/11.1.064
> LD_LIBRARY_PATH=/opt/netcdf/4.2/gnu/4.1.2/lib:/opt/szip/2.1/gnu/4.1.2/lib:/opt/hdf/4.2.6/intel/11.1.064/lib:/opt/hdf5/1.8.8/intel/11.1.064/lib:/opt/intel/compiler/11.1.064/ipp/em64t/sharedlib:/opt/intel/compiler/11.1.064/mkl/lib/em64t:/opt/intel/compiler/11.1.064/tbb/intel64/cc4.1.0_libc2.4_kernel2.6.16.21/lib:/opt/intel/compiler/11.1.064/lib/intel64:/opt/udunits/2.1.23/lib
> MANPATH=/opt/netcdf/4.2/gnu/4.1.2/share/man:/opt/intel/compiler/11.1.064/mkl/man:/opt/intel/compiler/11.1.064/man:/usr/java/default/man:
> LOADEDMODULES=intel/11.1.064:hdf5/1.8.8/intel/11.1.064:hdf/4.2.6/intel/11.1.064:szip/2.1/gnu/4.1.2:netcdf/4.2/gnu/4.1.2
> INCLUDE=/opt/netcdf/4.2/gnu/4.1.2/include:/opt/szip/2.1/gnu/4.1.2/include:/opt/hdf/4.2.6/intel/11.1.064/include:/opt/hdf5/1.8.8/intel/11.1.064/include:/opt/intel/compiler/11.1.064/ipp/em64t/include:/opt/intel/compiler/11.1.064/mkl/include
> INFOPATH=/opt/netcdf/4.2/gnu/4.1.2/share/info
> LIBRARY_PATH=/opt/netcdf/4.2/gnu/4.1.2/lib:/opt/szip/2.1/gnu/4.1.2/lib:/opt/hdf/4.2.6/intel/11.1.064/lib:/opt/hdf5/1.8.8/intel/11.1.064/lib:/opt/intel/compiler/11.1.064/ipp/em64t/lib:/opt/intel/compiler/11.1.064/mkl/lib/em64t:/opt/intel/compiler/11.1.064/tbb/intel64/cc4.1.0_libc2.4_kernel2.6.16.21/lib
> NETCDF=/opt/netcdf/4.2/gnu/4.1.2
> NETCDF_HOME=/opt/netcdf/4.2/gnu/4.1.2
> _LMFILES_=/opt/Modules/modulefiles/intel/11.1.064:/opt/Modules/modulefiles/hdf5/1.8.8/intel/11.1.064:/opt/Modules/modulefiles/hdf/4.2.6/intel/11.1.064:/opt/Modules/modulefiles/szip/2.1/gnu/4.1.2:/opt/Modules/modulefiles/netcdf/4.2/gnu/4.1.2
>
>
> Now I am trying to build the fortran version of 4.2. We have the intel
> fortran compiler, ifort, version 11.1.064. Before I begin I set three
> environment vars, then run ./configure with only the --prefix option:
>
> setenv FC ifort
> setenv CPPFLAGS -I/opt/netcdf/4.2/gnu/4.1.2/include
> setenv LDFLAGS -I/opt/netcdf/4.2/gnu/4.1.2/lib
> ./configure --prefix=/opt/netcdf/4.2/intel/11.1.064
>
> Configure and make all work fine, but nf-config says I don't have nc4
> support:
>
> is6[jma]:/opt/netcdf/4.2/intel/11.1.064/src # ../bin/nf-config --all
> This netCDF-Fortran 4.2 has been built with the following features:
> --cc -> /usr/bin/gcc
> --cflags -> -I/opt/netcdf/4.2/intel/11.1.064/include
> -I/opt/netcdf/4.2/gnu/4.1.2/include
> --libs -> -L/opt/netcdf/4.2/intel/11.1.064/lib
> -I/opt/netcdf/4.2/gnu/4.1.2/lib -lnetcdf
> --fc -> ifort
> --fflags -> -g -I/opt/netcdf/4.2/intel/11.1.064/include
> --flibs -> -L/opt/netcdf/4.2/intel/11.1.064/lib -lnetcdff
> -I/opt/netcdf/4.2/gnu/4.1.2/lib -lnetcdf
> --has-f90 -> yes
> --has-nc2 -> no
> --has-nc4 -> no
> --prefix -> /opt/netcdf/4.2/intel/11.1.064
> --includedir-> /opt/netcdf/4.2/intel/11.1.064/include
> --version -> netCDF-Fortran 4.2
>
> It doesn't say whether the fortran library is dap-enabled, but I need
> that too. The --enable-netcdf-4 option does not appear to be valid with
> the fortran version of the configure script. I am primarily a C
> programmer, not all that experienced in building fortran code. Can you
> see what I am doing wrong here? Let me know if you need any more
> information...
These are symptoms of bugs in nc-config and nf-config, not calling each other
to determine what features are supported. We need to get out a bug-fix release
for netcdf-fortran soon, because I think these bugs are fixed in the current
snapshot.
Unfortunately, there's no bundled snapshot release of netcdf-fortran yet, only
an svn source tree. The issue for tracking is here:
https://www.unidata.ucar.edu/jira/browse/NCF-165
I believe running "make check" for the Fortran release should verify that you
actually
have support for version 2 interfaces and for the netCDF-4 APIs. Let me know
if your
"make check" for Fortran does not include these lines:
*** Testing netCDF v2 api for F77.
*** SUCCESS!
PASS: tst_f77_v2
*** Testing definition of netCDF-4 vars from Fortran 77.
*** SUCCESS!
PASS: ftst_vars
*** Testing netCDF-4 vars from F77 with new types.
*** SUCCESS!
PASS: ftst_vars2
*** Testing enum and opaque types.
*** SUCCESS!
PASS: ftst_vars3
*** Testing VLEN types.
*** SUCCESS!
PASS: ftst_vars4
*** Testing compound types.
*** SUCCESS!
PASS: ftst_vars5
If you see all those, then that verifies "nf-config --all" is wrong
about the supported features. Also, DAP access is supported in the
Fortran APIs as a consequence of support in the separate C library,
but I see it's not explicitly tested for when "make check" is run.
The current versions of nc-config.in for the C release and nf-config.in
for the Fortran release are available here:
http://svn.unidata.ucar.edu/repos/netcdf/trunk/nc-config.in
http://svn.unidata.ucar.edu/repos/netcdf-fortran/trunk/nf-config.in
Unfortunately to fix nc-config and nf-config requires starting over by
copying the two files above into the top source directory of the respective
releases, rerunning configure, make check, make install for the C release,
then rerunning configure, make check, make install for the Fortran release.
Please let us know if that doesn't fix the problems with nf-config returning
the wrong information, and thanks for reporting the bugs!
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: ASX-279014
Department: Support netCDF
Priority: Normal
Status: Closed