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

[netCDF #WRU-143814]: Building errors related to parallel-netcdf



Hi,

> I want to use parallel-netcdf through the F90 API in NetCDF, so I try to 
> build NetCDF with '--enable-pnetcdf' option (in Mac). The packages of NetCDF 
> are:
> 
> netcdf-4.2.1.1.tar.gz, netcdf-fortran-4.2.tar.gz
> 
> But I encountered the following error when running my programs:
> 
> dyld: lazy symbol binding failed: Symbol not found: _nf_create_par_
> Referenced from: /usr/local/lib/libnetcdff.5.dylib
> Expected in: flat namespace
> 
> So I checked the symbols in the library with '--enable-pnetcdf' switched on:
> 
> $ nm /usr/local/lib/libnetcdff.dylib | grep nf_create
> 552:                 U _nf_create_
> 553:00000000000021ad T _nf_create__
> 554:                 U _nf_create_par_
> 555:00000000000091ed T _nf_create_par__
> 
> and with '--enable-pnetcdf' switched off:
> 
> $ nm /usr/local/lib/libnetcdff.dylib | grep nf_create
> 544:0000000000001b8d T _nf_create_
> 545:0000000000008bcd T _nf_create_par_
> 
> What is the '_nf_create_par__' when building with parallel-netcdf?

That just looks like a mismatch between how the Fortran-77 functions
expect the corresponding C functions to be named (one trailing "_"
character) and how they are actually named (two trailing "_" characters").
Perhaps the C library was compiled without the correct flag that 
determines this naming convention, such as -DpgiFortran or -DgFortran.

Sorry, I'm unable to duplicate this problem.  Building the netCDF Fortran
library on MacOS requires that the Fortran compiler you use is compatible 
with the C compiler, and that the C library is built with correct flags to
specify which conventions are used to call C functions from Fortran, as
described in step 4 here, under the "Using Static Libraries" section:

  http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html

I've sometimes been able to build the netCDF Fortran libraries with
parallel support by using the macports.org package named "netcdf-fortran",
as follows:

  $ sudo port install netcdf-fortran +mpich

but that uses only HDF5 parallel I/O, and didn't work when I tried it 
recently.  You might send your question to the parallel-netcdf support
email to see if they can help.

--Russ

> Best regards,
> 
> Li
> 
> -----------------------------------------
> Dr. Li Dong (??)
> LASG, Institute of Atmospheric Physics
> Chinese Academy of Sciences
> P.O. Box 9804
> Beijing 100029, China
> Phone: 8610-8299 5143
> 
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: WRU-143814
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.