//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
copy<set<int>::const_iterator,int*> (_proc_ids.begin(), _proc_ids.end(), ranks);
for (int i=0; i< (int)_proc_ids.size();i++)
if (ranks[i]>size_world-1)
copy<set<int>::const_iterator,int*> (_proc_ids.begin(), _proc_ids.end(), ranks);
for (int i=0; i< (int)_proc_ids.size();i++)
if (ranks[i]>size_world-1)
_comm_interface.groupIncl(group_world, _proc_ids.size(), ranks, &_group);
_comm_interface.commCreate(_world_comm, _group, &_comm);
_comm_interface.groupIncl(group_world, _proc_ids.size(), ranks, &_group);
_comm_interface.commCreate(_world_comm, _group, &_comm);
_comm_interface.commGroup(_world_comm, &group_world);
if (pend>size_world-1 || pend <pstart || pstart<0)
_comm_interface.commGroup(_world_comm, &group_world);
if (pend>size_world-1 || pend <pstart || pstart<0)
- throw INTERP_KERNEL::Exception("invalid argument in MPIProcessorGroup constructor (comm,pfirst,plast)");
+ {
+ _comm_interface.groupFree(&group_world);
+ throw INTERP_KERNEL::Exception("invalid argument in MPIProcessorGroup constructor (comm,pfirst,plast)");
+ }
int nprocs=pend-pstart+1;
int* ranks=new int[nprocs];
for (int i=pstart; i<=pend;i++)
int nprocs=pend-pstart+1;
int* ranks=new int[nprocs];
for (int i=pstart; i<=pend;i++)
_comm_interface.groupIncl(group_world, nprocs, ranks, &_group);
_comm_interface.commCreate(_world_comm, _group, &_comm);
_comm_interface.groupIncl(group_world, nprocs, ranks, &_group);
_comm_interface.commCreate(_world_comm, _group, &_comm);