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

  • To: Ed Hartnett <ed@xxxxxxxxxxxxxxxx>
  • Subject: Re: [netcdfgroup] NetCDF 4.0.1 with --enable-netcdf-4 conflicts with Open MPI by redefining MPI_Comm, etc
  • From: Constantine Khroulev <c.khroulev@xxxxxxxxx>
  • Date: Wed, 7 Oct 2009 10:17:45 -0800
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



  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: