Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: [netcdfgroup] NetCDF 4.0.1 with --enable-netcdf-4 conflicts with Open MPI by redefining MPI_Comm, etc

Ed,

On Oct 6, 2009, at 11:47 PM, Ed Hartnett wrote:

As I understand it, the reason this problem comes up is because some
users have parallel programs which use sequential netCDF. So the user
program contains the include for mpi.h, but sequential netCDF has
redefined MPI_Comm and MPI_Info.

This matches my understanding.

I think the smart thing to do might be to have a separate header
netcdf_par.h, which is included by people who want to use parallel
I/O. This way, the sequential header (netcdf.h) does not need to contain
anything related to mpi.

I would extend this to
1) having a separate (private) header netcdf_par.h that includes mpi.h
2) making the configure script put "#include <netcdf_par.h>" in netcdf.h if HDF5 is compiled with MPI.
3) only building NetCDF parallel I/O if HDF5 is compiled with MPI.

This way all users include netcdf.h, but its parallel features are available only if they can actually be used.

Just an idea.

Right now, I also build nc_create_par/nc_open_par functions whether the
build is for parallel or not. I think I will have to change that too.

I will try and get this change in before the 4.1 release, but I am on
travel right now...

Thank you!

--
Constantine


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690