[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #EZD-873215]: netcdf on linux 2.6
- Subject: [netCDF #EZD-873215]: netcdf on linux 2.6
- Date: Mon, 04 Sep 2006 16:21:28 -0600
Hi Gaby,
> re: please report the results of 'locate libnetcdf'
>
> niwa-27499b: Yes Mistress 301>> locate libnetcdf
> /home/turekg/local/lib/libnetcdf.a
> /home/turekg/local/lib/libnetcdf_c++.a
OK.
> re: and the results of 'ifort -g *.f90 -o a.out -L/home/turekg/local/lib
> -lnetcdf'
>
> lots of errors including Cannot open include file 'netcdf.inc'
Yup, I should have said to include the directive to tell ifort where to find
netCDF include files.
> But this works:
> ifort -g *.f90 -o a.out -I/home/turekg/local/include -L/home/turekg/local/lib
> -lnetcdf
Very good. Looks like the problem was solved by putting the referece to
the netCDF library at the end of the ifort invocation command line.
Just so you know: I installed the Intel Fortran compiler (evaluation copy)
v9.1.036 on my home machine running Fedora Core 5 and was able to build the
netCDF 3.6.0-p1 distribution and run all tests with no problems. I am under
the impression that Fedora Core 5 and SuSE 10 are more-or-less equivalent
in most things since they are running the latest 2.6 kernel and bundle the
latest
GNU compilers. Your latest success reaffirms this view of FC5 vs SuSE.
You may want to review the netCDF FAQ section on using the ifort compiler.
The FAQ, submitted by a user, is very specific about some environment
variables that should be specified before running netCDF's configure script:
Unidata HomePage
http://www.unidata.ucar.edu
netCDF
http://www.unidata.ucar.edu/software/netcdf
Frequently Asked Questions about netCDF
http://www.unidata.ucar.edu/software/netcdf/docs/faq.html
Installation and Porting
How do I build netCDF for use with Fortran compiler xxx and C compiler
yyy on platform zzz?
http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#other-builds
builds in other environments
http://www.unidata.ucar.edu/software/netcdf/docs/other-builds.html
Linux x86 with Intel ifort 8.1 fortran compile
The list of environment variables needed is found in the last link.
I rebuilt my netCDF distribution using ifort after defining the following
environment variables:
LD_LIBRARY_PATH=/usr/lib:/lib:/opt/intel/fc/9.1.036/lib
PATH=$PATH:/opt/intel/fc/9.1.036/bin
CC=gcc
CPPFLAGS=-DNDEBUG -DpgiFortran
CFLAGS=-O2 -g
F90=ifort
FC=ifort
FFLAGS=-g -O2 -mp -auto
After defining these environment variables, I created a fresh
netCDF installation as follows:
cd netcdf-3.6.0-p1/src
make uninstall
make distclean
./configure
make
make install
make test
Cheers,
Tom
****************************************************************************
Unidata User Support UCAR Unidata Program
(303) 497-8642 P.O. Box 3000
address@hidden Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage http://www.unidata.ucar.edu
****************************************************************************
Ticket Details
===================
Ticket ID: EZD-873215
Department: Support netCDF
Priority: Normal
Status: Closed