[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #XBT-452987]: installing netcdf with mpif90

> Full Name: ZHUO LIU
> Email Address: address@hidden
> Organization: University of Manitoba
> Package Version: netcdf 4.1.3
> Operating System: mac osx lion/Xcode4.3
> Hardware: mac pro 3.2 ghz quad-core intel xeon
> Description of problem:
> dear Sir/madam,
> How are you.

> I have a problem to install netcdf 4.1.3 with openmpi, I have openmpi
> installed on  /Users/george/tmp/gopenmpi, now I download netcdf 4.1.3
> and installed it with the following commands,
> ./configure FC=/Users/george/tmp/gopenmpi/bin/mpif90 
> CC=/Users/george/tmp/gopenmpi/bin/mpicc 
> CXX=/Users/george/tmp/gopenmpi/bin/mpicxx CFLAGS=-m64 CXXFLAGS=-m64 
> FFLAGS=-m64 FCFLAGS=-m64 F90=/Users/george/tmp/gopenmpi/bin/mpif90 
> -prefix=/usr/local_parallel -enable-netcdf-4
> The config.log is attached.
> Then I typed make |&tee make.res, it seems successful, make.res is
> also attached.
> Then I execute: make check |&tee check.res
> I got errors that,
> ...
> ld: symbol(s) not found for architecture x86_64
> ...
> Please see the attachment check.res
> Please help me to find where it is wrong.
> Your help is appreciated.

I think you need to include CPPFLAGS="-DpgiFortran" in the environment 
variables before running the configure script, because the cfortran.h include 
file used for representing
how the Fortran compiler calls the C compiler does not include a test for the 
compiler, which uses the same conventions as the pgi f90 compiler.

An alternative solution would be to use the new netCDF 4.2 release to compile 
and install
just the C library.  Then you would use the netCDF-Fortran 4.2 or 4.4-beta1 
release to 
install the Fortran library, telling it where the C library is.  The netCDF-4.2 
still uses the cfortran.h definitions and so requires the 
definitions when you are building the C libraries, but if you try the 4.4-beta1 
Fortran library, it doesn't need cfortran.h or the CPPFLAGS definition.


Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu

Ticket Details
Ticket ID: XBT-452987
Department: Support netCDF
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.