pnetcdf with WRF

Rob Latham robl at mcs.anl.gov
Tue Nov 23 09:00:20 CST 2010


On Mon, Nov 22, 2010 at 04:45:00PM +1100, Lev Lafayette wrote:
> Hi everyone,
> 
> I am attempting to install WRF (Weather Research and Forecasting) on a cluster using, as required and expected, pnetcdf.
> 
> No matter which openmpi and compilers I use (pgi, intel and gcc) I am receiving an error which is preventing a successful compilation of WRF 
> 
> i.e.,
> 
> strerrorf.f:(.text+0x2c): undefined reference to `nfmpi_xstrerror_'
> /usr/local/pnetcdf/1.2.0-pgi/lib/libpnetcdf.a(inq_libversf.o): In function `nfmpi_inq_libvers_':
> inq_libversf.f:(.text+0x21): undefined reference to `nfmpi_xinq_libvers_'


In addition to what Wei-keng suggested, I'd like to see what the
strerrorf.o and xstrerrorf.o files contain -- it will help us figure
out the fortran name mangling convention detected.

There are some key lines printed out amid the mass of configure
output.  On my system, which detected the fortran compiler and built
all the symbols correctly, I've got lines like this:

...
checking for pgf90... no
checking for f77... no
checking for fort77... no
checking for g77... no
checking for gfortran... gfortran
checking for Fortran .F compiler... 
checking if Fortran-77 compiler handles *.F files... yes
checking how to make dependencies... false
configure: checking for nm utility...
checking for nm... nm
checking nm flags... 
checking for C-equivalent to Fortran routine "SUB"... sub_
...

Do you see similar output?  When you configured pnetcdf, I'd like to
know which fotran compiler was detected and which C-equivalent
approach was selected.

What might be happening is that some parts of pnetcdf are built with
the system compiler and some parts are built with the MPI compiler.
That approach allows for a lot of flexibility, but maybe it's causing
you some grief here.  If you configure pnetcdf by explicitly selecting
the C and Fortran compilers, do you still get this problem?

CC=mpicc FC=mpif90 F77=mpif90 F90=mpif90 MPICC=mpicc MPIF90=mpif90 configure ...

==rob

-- 
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA


More information about the parallel-netcdf mailing list