[MOAB-dev] moab / imesh with communicator other than mpi_comm_world?

Jason Kraftcheck kraftche at cae.wisc.edu
Wed Jan 13 16:48:13 CST 2010


acaceres at mcs.anl.gov wrote:
> Hi,
> 
> Are there any examples of using imesh (or failing that, moab) with a communicator other than MPI_COMM_WORLD? I see there's some option for it in MBCore::load_file... Thanks,
> 

After creating the MOAB instance, do:
  new MBPlarallelComm( &moab_instance, mpi_comm );

If MOAB is already initialized, then do:

int id;
MBParallelComm* mypcomm = new MBPlarallelComm( &moab_instance, mpi_comm, &id );

and then do:

std::ostringstream ss;
ss << "PARALLEL_COMM=" << id;
std::string options = ss.str();

and pass the 'options' string as an option to any parallel read/write requests.

- jason


More information about the moab-dev mailing list