[MOAB-dev] possible bug in WriteHDF5Parallel.cpp

Grindeanu, Iulian R. iulian at mcs.anl.gov
Mon Jun 30 09:20:47 CDT 2014


thanks for reporting it
Yes, that tag looks way too big; Not sure how it slipped until now. probably cray environment is pickier

It seems that most newer compilers/env accept tags to 32 bits

Iulian
________________________________________
From: moab-dev-bounces at mcs.anl.gov [moab-dev-bounces at mcs.anl.gov] on behalf of Mark Filipiak [mjf at staffmail.ed.ac.uk]
Sent: Monday, June 30, 2014 8:27 AM
To: moab-dev at mcs.anl.gov
Subject: [MOAB-dev] possible bug in WriteHDF5Parallel.cpp

Hi,

I think there is a bug in WriteHDF5Parallel.cpp (MOAB 4.6.3 and 4.6.2),
where an arbitrary MPI message tag is used:

ErrorCode WriteHDF5Parallel::communicate_shared_set_ids( const Range& owned,
                                                         const Range& remote
)
{
  ErrorCode rval;
  int mperr;
  const int TAG = 0xDEADF00;

...

      mperr = MPI_Irecv( &recv_buf[i][0], recv_buf[i].size(),
MPI_UNSIGNED_LONG,
                         procs[i], TAG, comm, &recv_req[i] );
CHECK_MPI(mperr);

...

    mperr = MPI_Isend( &send_buf[i][0], send_buf[i].size(),
MPI_UNSIGNED_LONG,
                       si->first, TAG, comm, &send_req[i] );

...

The value 0xDEADF00 gives me an MPI tag error when running the
parallel_hdf5_test after building MOAB on a Cray XC30 with the Gnu compiler.
The code should use an MPI enquiry function to get the maximum allowed value
for a tag (MPI_TAG_UB) and choose an arbitrary value less than this.  The
maximum allowed value is guaranteed to be >= 32767, so you could choose an
arbitrary value >= 0 and <= 32767.


Regards,

Mark

Mark Filipiak
EPCC
The University of Edinburgh
James Clerk Maxwell Building
Mayfield Road
Edinburgh
EH9 3JZ
UK
Telephone +44 131 651 3467
Fax +44 131 650 6555




--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



More information about the moab-dev mailing list