[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #IDN-696942]: confusion about how to install netcdf
- Subject: [netCDF #IDN-696942]: confusion about how to install netcdf
- Date: Mon, 18 Jun 2012 08:54:13 -0600
> New Ticket: confusion about how to install netcdf
>
> A user reported an issue with this function:
> http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f90/NF90_005fCREATE.html
>
> IT looks like this function is available only when you compile netcdf
> with some options, but it is not clear to me which ones. In
> particular,
> it is not available for the following two installations
nf90_create() is just one of the functions in the netCDF Fortran
library. It is available for an installation that has working Fortran
compilers that the configure script can find and for which the netCDF
Fortran library is built and installed. It's not a special Fortran
function that requires extra compiler options, if the Fortran-90
library was installed successfully then nf90_create() is in it.
> 1) Janus:
>
> nc-config --all
>
> This netCDF 4.1.3 has been built with the following features:
>
> --cc ->
> /curc/tools/free/redhat_5_x86_64/openmpi-1.4.5_pgi-12.3/bin/mpicc
> --cflags ->
>
> -I/curc/tools/free/redhat_5_x86_64/netcdf-4.1.3_pgi-12.3_hdf5-1.8.8_openmpi-1.4.5/include
>
> -DpgiFortran
> -I/curc/tools/free/redhat_5_x86_64/hdf5-1.8.8_openmpi-1.4.5_pgi-12.3/include
> --libs ->
> -L/curc/tools/free/redhat_5_x86_64/netcdf-4.1.3_pgi-12.3_hdf5-1.8.8_openmpi-1.4.5/lib
>
> -L/curc/tools/free/redhat_5_x86_64/hdf5-1.8.8_openmpi-1.4.5_pgi-12.3/lib
> -L/usr/lib64 -lnetcdf -lhdf5_hl -lhdf5 -lm -lcurl
>
> --cxx ->
> /curc/tools/free/redhat_5_x86_64/openmpi-1.4.5_pgi-12.3/bin/mpic++
> --has-c++ -> yes
>
> --fc ->
> /curc/tools/free/redhat_5_x86_64/openmpi-1.4.5_pgi-12.3/bin/mpif90
> --fflags -> -O3 -fPIC
> -I/curc/tools/free/redhat_5_x86_64/hdf5-1.8.8_openmpi-1.4.5_pgi-12.3/include
> /curc/tools/free/redhat_5_x86_64/netcdf-4.1.3_pgi-12.3_hdf5-1.8.8_openmpi-1.4.5/include
> --flibs ->
> -L/curc/tools/free/redhat_5_x86_64/netcdf-4.1.3_pgi-12.3_hdf5-1.8.8_openmpi-1.4.5/lib
>
> -lnetcdff
> -L/curc/tools/free/redhat_5_x86_64/hdf5-1.8.8_openmpi-1.4.5_pgi-12.3/lib
> -L/usr/lib64 -lnetcdf -lhdf5_hl -lhdf5 -lm -lcurl
> --has-f77 -> no
> --has-f90 -> no
I can think of several reasons for the two lines above:
- the configure script could not find a working Fortran-77 or
Fortran-90 compiler
- this nc-config doesn't correspond to the library installation
- nc-config has a bug on this platform
- someone modified the nc-config script manually
- "--disable-fortran" was specified to the configure script when
netCDF was built
Was "make check" run when netCDF was installed on Janus? Do you still
have the "config.log" file created during the installation on Janus,
that would provide more details about any attempts to test the Fortran
compilers and that might explain why they didn't work for netCDF, if
that's what the configure script determined? Do you still have the
output of running the configure script on Janus (which is different
from config.log, it would have had to be manually captured in a file).
> --has-dap -> yes
> --has-nc2 -> yes
> --has-nc4 -> yes
> --has-hdf5 -> yes
> --has-hdf4 -> no
> --has-pnetcdf-> no
> --has-szlib ->
>
> --prefix ->
> /curc/tools/free/redhat_5_x86_64/netcdf-4.1.3_pgi-12.3_hdf5-1.8.8_openmpi-1.4.5
> --includedir->
> /curc/tools/free/redhat_5_x86_64/netcdf-4.1.3_pgi-12.3_hdf5-1.8.8_openmpi-1.4.5/include
> --version -> netCDF 4.1.3
>
>
> 2) Bluefire:
>
>
> nc-config --all
>
> This netCDF 4.1.3 has been built with the following features:
>
> --cc -> xlc_r
> --cflags -> -I/contrib/netcdf/4.1.3_netcdf3-format/include
> --libs -> -L/contrib/netcdf/4.1.3_netcdf3-format/lib -lnetcdf
>
> --cxx -> xlC_r
> --has-c++ -> yes
>
> --fc -> xlf95_r
> --fflags -> -qarch=auto -qtune=auto -qcache=auto
> -I/contrib/netcdf/4.1.3_netcdf3-format/include
> --flibs -> -L/contrib/netcdf/4.1.3_netcdf3-format/lib -lnetcdff
> -lnetcdf
> --has-f77 -> yes
> --has-f90 -> yes
Evidently the Fortran compilers worked fine in this case, according to
tests by the configure script.
> --has-dap -> no
> --has-nc2 -> yes
> --has-nc4 -> no
> --has-hdf5 -> no
> --has-hdf4 -> no
> --has-pnetcdf-> no
> --has-szlib ->
>
> --prefix -> /contrib/netcdf/4.1.3_netcdf3-format
> --includedir-> /contrib/netcdf/4.1.3_netcdf3-format/include
> --version -> netCDF 4.1.3
What's the evidence that nf90_create() is missing in this case? If
"make check" was run when netCDF was installed, it tests all the
netCDF Fortran functions and could not have completed successfully
unless nf90_create() worked as intended. If you still have the source
directories and "make clean" hasn't been run from the top level where
netCDF was built, can you go to examples/F90 and invoke
make clean check
That should test all the functions and also show how the Fortran-90
library was successfully invoked.
> Questions:
>
> a) is this correct?
No, no special options are needed specifying how configure should
invoke the compilers with the FC environment variable, and FFLAGS or
FCFLAGS if any special flags are required for Fortran 77 or Fortran 90
compilation.
> b) how to change Janus installation to fix it?
??
> c) would it be possible for the future to include this
> information on the documentation page? I mean the
> http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f90/NF90_005fCREATE.html
> should say: "avaliable since netcdf vx.y, if netcdf
> is compiled using option z"
No, that function has been available since the first release of the
Fortran 90 API to netCDF, and requires no special option.
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: IDN-696942
Department: Support netCDF
Priority: Normal
Status: Closed