[MOAB-dev] r2994 - MOAB/trunk/parallel
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Fri Jul 10 16:15:45 CDT 2009
Author: kraftche
Date: 2009-07-10 16:15:45 -0500 (Fri, 10 Jul 2009)
New Revision: 2994
Modified:
MOAB/trunk/parallel/MBParallelComm.cpp
Log:
put back buffer size limit for bcast
Modified: MOAB/trunk/parallel/MBParallelComm.cpp
===================================================================
--- MOAB/trunk/parallel/MBParallelComm.cpp 2009-07-10 20:09:37 UTC (rev 2993)
+++ MOAB/trunk/parallel/MBParallelComm.cpp 2009-07-10 21:15:45 UTC (rev 2994)
@@ -434,10 +434,17 @@
if ((int)procConfig.proc_rank() != from_proc)
buff.resize(buff_size);
- success = MPI_Bcast( &buff[0], buff_size, MPI_UNSIGNED_CHAR, from_proc, procConfig.proc_comm() );
- if (MPI_SUCCESS != success) {
- result = MB_FAILURE;
- RRA("MPI_Bcast of buffer failed.");
+ size_t offset = 0;
+ while (buff_size) {
+ int size = std::min( buff_size, MAX_BCAST_SIZE );
+ success = MPI_Bcast( &buff[offset], size, MPI_UNSIGNED_CHAR, from_proc, procConfig.proc_comm() );
+ if (MPI_SUCCESS != success) {
+ result = MB_FAILURE;
+ RRA("MPI_Bcast of buffer failed.");
+ }
+
+ offset += size;
+ buff_size -= size;
}
if ((int)procConfig.proc_rank() != from_proc) {
More information about the moab-dev
mailing list