2 #ifndef DUNE_REMOTEINDICES_HH
3 #define DUNE_REMOTEINDICES_HH
34 template<
typename TG,
typename TA>
38 inline static MPI_Datatype
getType();
40 static MPI_Datatype type;
44 template<
typename T,
typename A>
47 template<
typename T1,
typename T2>
53 template<
typename T1,
typename T2>
54 std::ostream& operator<<(std::ostream& os, const RemoteIndex<T1,T2>& index);
57 template<
typename T,
typename A,
bool mode>
64 template<
typename T1,
typename T2>
70 template<
typename T,
typename A,
typename A1>
75 template<
typename T,
typename A,
bool mode>
146 template<
class T,
class A>
147 std::ostream& operator<<(std::ostream& os, const RemoteIndices<T,A>& indices);
151 template<
class T,
class A>
158 template<
typename T1,
typename T2>
159 class OwnerOverlapCopyCommunication;
178 template<
class T,
class A=std::allocator<
RemoteIndex<
typename T::GlobalIndex,
179 typename T::LocalIndex::Attribute> > >
184 template<
typename T1,
typename A2,
typename A1>
189 template<
class G,
class T1,
class T2>
190 friend void fillIndexSetHoles(
const G& graph, Dune::OwnerOverlapCopyCommunication<T1,T2>& oocomm);
229 typedef typename A::template rebind<RemoteIndex>::other
Allocator;
236 typedef std::map<int, std::pair<RemoteIndexList*,RemoteIndexList*> >
259 const MPI_Comm& comm,
const std::vector<int>&
neighbours=std::vector<int>(),
bool includeSelf=
false);
289 const MPI_Comm& comm,
const std::vector<int>&
neighbours=std::vector<int>());
294 neighbourIds.clear();
295 neighbourIds.insert(neighbours.begin(), neighbours.end());
318 template<
bool ignorePublic>
351 template<
bool mode,
bool send>
413 std::set<int> neighbourIds;
416 const static int commTag_=333;
449 typedef IndexPair<GlobalIndex, LocalIndex>
470 template<
bool ignorePublic>
471 inline void buildRemote(
bool includeSelf);
491 template<
bool ignorePublic>
492 inline void packEntries(PairType** myPairs,
const ParallelIndexSet& indexSet,
493 char* p_out, MPI_Datatype type,
int bufferSize,
494 int* position,
int n);
510 PairType** local,
int localEntries,
char* p_in,
511 MPI_Datatype type,
int* positon,
int bufferSize,
515 int remoteEntries, PairType** localSource,
516 int localSourceEntries, PairType** localDest,
517 int localDestEntries,
char* p_in,
518 MPI_Datatype type,
int* position,
int bufferSize);
520 void unpackCreateRemote(
char* p_in, PairType** sourcePairs, PairType** DestPairs,
521 int remoteProc,
int sourcePublish,
int destPublish,
522 int bufferSize,
bool sendTwo,
bool fromOurSelf=
false);
542 template<
class T,
class A,
bool mode>
546 template<
typename T1,
typename A1>
671 RemoteIndexListModifier()
699 GlobalModifyIterator giter_;
709 template<
class T,
class A>
716 typedef T ParallelIndexSet;
731 typedef typename LocalIndex::Attribute Attribute;
737 typedef typename A::template rebind<RemoteIndex>::other Allocator;
750 typedef std::map<int, std::pair<RemoteIndexList*,RemoteIndexList*> >
768 inline void advance(
const GlobalIndex& global);
779 inline void advance(
const GlobalIndex& global,
const Attribute& attribute);
803 : iter_(iter), end_(end), index_(index), hasAttribute(false)
806 while(iter_!=end_ && iter_->second.first->localIndexPair().global()!=index_)
812 : iter_(iter), end_(end), index_(index), attribute_(attribute), hasAttribute(true)
815 while(iter_!=end_ && (iter_->second.first->localIndexPair().global()!=index_
816 || iter_->second.first->localIndexPair().local().attribute()!=attribute))
821 : iter_(other.iter_), end_(other.end_), index_(other.index_)
829 while(iter_!=end_ && (iter_->second.first->localIndexPair().global()!=index_ ||
831 iter_->second.first->localIndexPair().local().attribute()!=attribute_)))
833 assert(iter_==end_ ||
834 (iter_->second.first->localIndexPair().global()==index_));
835 assert(iter_==end_ || !hasAttribute ||
836 (iter_->second.first->localIndexPair().local().attribute()==attribute_));
843 return *(iter_->second.first);
855 return iter_->second.first.operator->();
861 return other.iter_==iter_;
867 return other.iter_!=iter_;
876 Attribute attribute_;
888 Attribute attribute_;
892 template<
typename TG,
typename TA>
895 if(type==MPI_DATATYPE_NULL){
901 length[0]=length[1]=length[2]=length[3]=1;
902 MPI_Address(rep, disp);
903 MPI_Address(&(rep[0].global_), disp+1);
904 MPI_Address(&(rep[0].local_), disp+2);
905 MPI_Address(rep+1, disp+3);
906 for(
int i=3; i >= 0; --i)
908 MPI_Type_struct(4, length, disp, types, &type);
909 MPI_Type_commit(&type);
914 template<
typename TG,
typename TA>
917 template<
typename T1,
typename T2>
919 : localIndex_(local), attribute_(attribute)
922 template<
typename T1,
typename T2>
924 : localIndex_(0), attribute_(attribute)
927 template<
typename T1,
typename T2>
929 : localIndex_(0), attribute_()
931 template<
typename T1,
typename T2>
934 return localIndex_==ri.localIndex_ && attribute_==ri.
attribute;
937 template<
typename T1,
typename T2>
940 return localIndex_!=ri.localIndex_ || attribute_!=ri.attribute_;
943 template<
typename T1,
typename T2>
946 return T2(attribute_);
949 template<
typename T1,
typename T2>
955 template<
typename T,
typename A>
958 const MPI_Comm& comm,
959 const std::vector<int>& neighbours,
961 : source_(&source), target_(&destination), comm_(comm),
962 sourceSeqNo_(-1), destSeqNo_(-1), publicIgnored(false), firstBuild(true),
963 includeSelf(includeSelf_)
968 template<
typename T,
typename A>
974 template<
typename T,
typename A>
976 :source_(0), target_(0), sourceSeqNo_(-1),
977 destSeqNo_(-1), publicIgnored(false), firstBuild(true)
980 template<
class T,
typename A>
983 const MPI_Comm& comm,
984 const std::vector<int>& neighbours)
988 target_ = &destination;
991 setNeighbours(neighbours);
994 template<
typename T,
typename A>
1002 template<
typename T,
typename A>
1010 template<
typename T,
typename A>
1016 template<
typename T,
typename A>
1017 template<
bool ignorePublic>
1020 char* p_out, MPI_Datatype type,
1022 int *position,
int n)
1027 const const_iterator end = indexSet.end();
1031 for(const_iterator index = indexSet.begin(); index != end; ++index)
1032 if(ignorePublic || index->local().isPublic()){
1034 MPI_Pack(const_cast<PairType*>(&(*index)), 1,
1036 p_out, bufferSize, position, comm_);
1037 pairs[i++] =
const_cast<PairType*
>(&(*index));
1043 template<
typename T,
typename A>
1050 const const_iterator end=indexSet.
end();
1051 for(const_iterator index=indexSet.
begin(); index!=end; ++index)
1052 if(index->local().isPublic())
1060 template<
typename T,
typename A>
1061 inline void RemoteIndices<T,A>::unpackCreateRemote(
char* p_in, PairType** sourcePairs,
1062 PairType** destPairs,
int remoteProc,
1063 int sourcePublish,
int destPublish,
1064 int bufferSize,
bool sendTwo,
1069 int noRemoteSource=-1, noRemoteDest=-1;
1070 char twoIndexSets=0;
1073 MPI_Unpack(p_in, bufferSize, &position, &twoIndexSets, 1, MPI_CHAR, comm_);
1075 MPI_Unpack(p_in, bufferSize, &position, &noRemoteSource, 1, MPI_INT, comm_);
1077 MPI_Unpack(p_in, bufferSize, &position, &noRemoteDest, 1, MPI_INT, comm_);
1081 RemoteIndexList* receive=
new RemoteIndexList();
1083 RemoteIndexList* send=0;
1089 send =
new RemoteIndexList();
1091 unpackIndices(*send, *receive, noRemoteSource, sourcePairs, sourcePublish,
1092 destPairs, destPublish, p_in, type, &position, bufferSize);
1095 unpackIndices(*receive, noRemoteSource, sourcePairs, sourcePublish,
1096 p_in, type, &position, bufferSize, fromOurSelf);
1101 int oldPos=position;
1103 unpackIndices(*receive, noRemoteSource, destPairs, destPublish,
1104 p_in, type, &position, bufferSize, fromOurSelf);
1109 send =
new RemoteIndexList();
1110 unpackIndices(*send, noRemoteDest, sourcePairs, sourcePublish,
1111 p_in, type, &position, bufferSize, fromOurSelf);
1114 if(receive->empty() && send->empty()){
1122 remoteIndices_.insert(std::make_pair(remoteProc,
1123 std::make_pair(send,receive)));
1128 template<
typename T,
typename A>
1129 template<
bool ignorePublic>
1130 inline void RemoteIndices<T,A>::buildRemote(
bool includeSelf)
1134 MPI_Comm_rank(comm_, &rank);
1135 MPI_Comm_size(comm_, &procs);
1139 int sourcePublish, destPublish;
1142 char sendTwo = (source_ != target_);
1144 if(procs==1 && !(sendTwo || includeSelf))
1148 sourcePublish = (ignorePublic)? source_->size() : noPublic(*source_);
1151 destPublish = (ignorePublic)? target_->size() : noPublic(*target_);
1156 int maxPublish, publish=sourcePublish+destPublish;
1159 MPI_Allreduce(&publish, &maxPublish, 1, MPI_INT, MPI_MAX, comm_);
1162 typedef IndexPair<GlobalIndex,LocalIndex> PairType;
1164 PairType** destPairs;
1165 PairType** sourcePairs =
new PairType*[sourcePublish>0?sourcePublish:1];
1168 destPairs =
new PairType*[destPublish>0?destPublish:1];
1170 destPairs=sourcePairs;
1172 char** buffer =
new char*[2];
1181 MPI_Pack_size(maxPublish, type, comm_,
1183 MPI_Pack_size(1, MPI_INT, comm_,
1185 MPI_Pack_size(1, MPI_CHAR, comm_,
1191 bufferSize += 2 * intSize + charSize;
1193 if(bufferSize<=0) bufferSize=1;
1195 buffer[0] =
new char[bufferSize];
1196 buffer[1] =
new char[bufferSize];
1200 MPI_Pack(&sendTwo, 1, MPI_CHAR, buffer[0], bufferSize, &position,
1204 MPI_Pack(&sourcePublish, 1, MPI_INT, buffer[0], bufferSize, &position,
1206 MPI_Pack(&destPublish, 1, MPI_INT, buffer[0], bufferSize, &position,
1210 packEntries<ignorePublic>(sourcePairs, *source_, buffer[0], type,
1211 bufferSize, &position, sourcePublish);
1214 packEntries<ignorePublic>(destPairs, *target_, buffer[0], type,
1215 bufferSize, &position, destPublish);
1219 if(sendTwo|| includeSelf)
1220 unpackCreateRemote(buffer[0], sourcePairs, destPairs, rank, sourcePublish,
1221 destPublish, bufferSize, sendTwo, includeSelf);
1223 neighbourIds.erase(rank);
1225 if(neighbourIds.size()==0)
1227 Dune::dvverb<<rank<<
": Sending messages in a ring"<<std::endl;
1229 for(
int proc=1; proc<procs; proc++){
1231 char* p_out = buffer[1-(proc%2)];
1232 char* p_in = buffer[proc%2];
1236 MPI_Ssend(p_out, bufferSize, MPI_PACKED, (rank+1)%procs,
1238 MPI_Recv(p_in, bufferSize, MPI_PACKED, (rank+procs-1)%procs,
1239 commTag_, comm_, &status);
1241 MPI_Recv(p_in, bufferSize, MPI_PACKED, (rank+procs-1)%procs,
1242 commTag_, comm_, &status);
1243 MPI_Ssend(p_out, bufferSize, MPI_PACKED, (rank+1)%procs,
1249 int remoteProc = (rank+procs-proc)%procs;
1251 unpackCreateRemote(p_in, sourcePairs, destPairs, remoteProc, sourcePublish,
1252 destPublish, bufferSize, sendTwo);
1259 MPI_Request* requests=
new MPI_Request[neighbourIds.size()];
1260 MPI_Request* req=requests;
1262 typedef typename std::set<int>::size_type size_type;
1263 size_type noNeighbours=neighbourIds.size();
1266 for(std::set<int>::iterator neighbour=neighbourIds.begin();
1267 neighbour!= neighbourIds.end(); ++neighbour){
1269 MPI_Issend(buffer[0], position , MPI_PACKED, *neighbour, commTag_, comm_, req++);
1274 for(size_type received=0; received <noNeighbours; ++received)
1278 MPI_Probe(MPI_ANY_SOURCE, commTag_, comm_, &status);
1279 int remoteProc=status.MPI_SOURCE;
1281 MPI_Get_count(&status, MPI_PACKED, &size);
1283 MPI_Recv(buffer[1], size, MPI_PACKED, remoteProc,
1284 commTag_, comm_, &status);
1286 unpackCreateRemote(buffer[1], sourcePairs, destPairs, remoteProc, sourcePublish,
1287 destPublish, bufferSize, sendTwo);
1290 MPI_Status* statuses =
new MPI_Status[neighbourIds.size()];
1292 if(MPI_ERR_IN_STATUS==MPI_Waitall(neighbourIds.size(), requests, statuses)){
1293 for(size_type i=0; i < neighbourIds.size(); ++i)
1294 if(statuses[i].MPI_ERROR!=MPI_SUCCESS){
1295 std::cerr<<rank<<
": MPI_Error occurred while receiving message."<<std::endl;
1296 MPI_Abort(comm_, 999);
1305 if(destPairs!=sourcePairs)
1308 delete[] sourcePairs;
1314 template<
typename T,
typename A>
1315 inline void RemoteIndices<T,A>::unpackIndices(RemoteIndexList& remote,
1325 if(remoteEntries==0)
1329 MPI_Unpack(p_in, bufferSize, position, &index, 1,
1331 GlobalIndex oldGlobal=index.global();
1332 int n_in=0, localIndex=0;
1335 while(localIndex<localEntries){
1336 if(local[localIndex]->global()==index.global()){
1337 int oldLocalIndex=localIndex;
1339 while(localIndex<localEntries &&
1340 local[localIndex]->global()==index.global()){
1341 if(!fromOurSelf || index.local().attribute() !=
1342 local[localIndex]->local().attribute())
1344 remote.push_back(RemoteIndex(index.local().attribute(),
1345 local[localIndex]));
1350 if((++n_in) < remoteEntries){
1351 MPI_Unpack(p_in, bufferSize, position, &index, 1,
1353 if(index.global()==oldGlobal)
1355 localIndex=oldLocalIndex;
1357 oldGlobal=index.global();
1365 if (local[localIndex]->global()<index.global()){
1370 if((++n_in) < remoteEntries){
1371 MPI_Unpack(p_in, bufferSize, position, &index, 1,
1373 oldGlobal=index.global();
1381 while(++n_in < remoteEntries)
1382 MPI_Unpack(p_in, bufferSize, position, &index, 1,
1387 template<
typename T,
typename A>
1388 inline void RemoteIndices<T,A>::unpackIndices(RemoteIndexList& send,
1389 RemoteIndexList& receive,
1391 PairType** localSource,
1392 int localSourceEntries,
1393 PairType** localDest,
1394 int localDestEntries,
1400 int n_in=0, sourceIndex=0, destIndex=0;
1403 while(n_in<remoteEntries && (sourceIndex<localSourceEntries || destIndex<localDestEntries)){
1406 MPI_Unpack(p_in, bufferSize, position, &index, 1,
1411 while(sourceIndex<localSourceEntries && localSource[sourceIndex]->global()<index.global())
1414 while(destIndex<localDestEntries && localDest[destIndex]->global()<index.global())
1418 if(sourceIndex<localSourceEntries && localSource[sourceIndex]->global()==index.global())
1419 send.push_back(RemoteIndex(index.local().attribute(),
1420 localSource[sourceIndex]));
1422 if(destIndex < localDestEntries && localDest[destIndex]->global() == index.global())
1423 receive.push_back(RemoteIndex(index.local().attribute(),
1424 localDest[sourceIndex]));
1429 template<
typename T,
typename A>
1432 typedef typename RemoteIndexMap::iterator Iterator;
1433 Iterator lend = remoteIndices_.end();
1434 for(Iterator lists=remoteIndices_.begin(); lists != lend; ++lists){
1435 if(lists->second.first==lists->second.second){
1437 delete lists->second.first;
1439 delete lists->second.first;
1440 delete lists->second.second;
1443 remoteIndices_.clear();
1447 template<
typename T,
typename A>
1450 return remoteIndices_.size();
1453 template<
typename T,
typename A>
1454 template<
bool ignorePublic>
1459 ignorePublic!=publicIgnored || !
1463 buildRemote<ignorePublic>(includeSelf);
1465 sourceSeqNo_ = source_->seqNo();
1466 destSeqNo_ = target_->seqNo();
1468 publicIgnored=ignorePublic;
1474 template<
typename T,
typename A>
1477 return sourceSeqNo_==source_->seqNo() && destSeqNo_ ==target_->seqNo();
1480 template<
typename T,
typename A>
1481 template<
bool mode,
bool send>
1488 sourceSeqNo_ = source_->seqNo();
1489 destSeqNo_ = target_->seqNo();
1491 typename RemoteIndexMap::iterator found = remoteIndices_.find(process);
1493 if(found == remoteIndices_.end())
1495 if(source_ != target_)
1496 remoteIndices_.insert(std::make_pair(process,
1501 remoteIndices_.insert(std::make_pair(process,
1502 std::make_pair(rlist, rlist)));
1504 found = remoteIndices_.find(process);
1516 template<
typename T,
typename A>
1520 return remoteIndices_.find(proc);
1523 template<
typename T,
typename A>
1527 return remoteIndices_.begin();
1530 template<
typename T,
typename A>
1534 return remoteIndices_.end();
1538 template<
typename T,
typename A>
1545 typedef typename std::map<int,std::pair<RList*,RList*> >
::const_iterator const_iterator;
1547 const const_iterator rend = remoteIndices_.
end();
1549 for(const_iterator rindex = remoteIndices_.begin(), rindex1=ri.remoteIndices_.begin(); rindex!=rend; ++rindex, ++rindex1){
1550 if(rindex->first != rindex1->first)
1552 if(*(rindex->second.first) != *(rindex1->second.first))
1554 if(*(rindex->second.second) != *(rindex1->second.second))
1560 template<
class T,
class A,
bool mode>
1562 RemoteIndexList& rList)
1563 : rList_(&rList), indexSet_(&indexSet), glist_(new GlobalList()), iter_(rList.beginModify()), end_(rList.end()), first_(true)
1567 for(ConstIterator iter=iter_; iter != end_; ++iter)
1568 glist_->push_back(iter->localIndexPair().global());
1569 giter_ = glist_->beginModify();
1573 template<
typename T,
typename A,
bool mode>
1575 : rList_(other.rList_), indexSet_(other.indexSet_),
1576 glist_(other.glist_), iter_(other.iter_), giter_(other.giter_), end_(other.end_),
1577 first_(other.first_), last_(other.last_)
1580 template<
typename T,
typename A,
bool mode>
1585 #ifdef DUNE_ISTL_WITH_CHECKING
1586 if(indexSet_->state()!=
GROUND)
1587 DUNE_THROW(InvalidIndexSetState,
"Index has to be in ground mode for repairing pointers to indices");
1592 GlobalIterator giter = glist_->begin();
1593 IndexIterator index = indexSet_->begin();
1595 for(Iterator iter=rList_->begin(); iter != end_; ++iter){
1596 while(index->global()<*giter){
1598 #ifdef DUNE_ISTL_WITH_CHECKING
1599 if(index == indexSet_.end())
1604 #ifdef DUNE_ISTL_WITH_CHECKING
1605 if(index->global() != *giter)
1608 iter->localIndex_ = &(*index);
1613 template<
typename T,
typename A,
bool mode>
1617 "might be added to the underlying index set. Use "
1618 "insert(const RemoteIndex&, const GlobalIndex&) instead");
1620 #ifdef DUNE_ISTL_WITH_CHECKING
1621 if(!first_ && index.localIndexPair().global()<last_)
1625 while(iter_ != end_ && iter_->localIndexPair().global() < index.localIndexPair().global()){
1630 assert(iter_==end_ || iter_->localIndexPair().global() != index.localIndexPair().global());
1631 iter_.insert(index);
1632 last_ = index.localIndexPair().global();
1636 template<
typename T,
typename A,
bool mode>
1640 "might be added to the underlying index set. Use "
1641 "insert(const RemoteIndex&) instead");
1642 #ifdef DUNE_ISTL_WITH_CHECKING
1643 if(!first_ && global<last_)
1647 while(iter_ != end_ && *giter_ < global){
1653 assert(iter_->localIndexPair().global() != global);
1654 iter_.insert(index);
1655 giter_.insert(global);
1661 template<
typename T,
typename A,
bool mode>
1664 #ifdef DUNE_ISTL_WITH_CHECKING
1665 if(!first_ && global<last_)
1673 while(iter_!=end_ && *giter_< global){
1677 if(*giter_ == global){
1683 while(iter_!=end_ && iter_->localIndexPair().global() < global)
1686 if(iter_->localIndexPair().global()==global){
1697 template<
typename T,
typename A>
1704 template<
typename T,
typename A>
1711 template<
typename T,
typename A>
1714 typedef typename RemoteIndexMap::const_iterator const_iterator;
1716 const const_iterator end=pmap.end();
1717 for(const_iterator process=pmap.begin(); process != end; ++process){
1718 const RemoteIndexList* list = send? process->second.first : process->second.second;
1720 map_.insert(std::make_pair(process->first,
1721 std::pair<iterator, const iterator>(list->
begin(), list->
end())));
1725 template<
typename T,
typename A>
1728 typedef typename Map::iterator
iterator;
1729 typedef typename Map::const_iterator const_iterator;
1730 const const_iterator end = map_.end();
1732 for(iterator iter = map_.begin(); iter != end;){
1738 remoteIndex = *current;
1740 while(iter->second.first!=iter->second.second && iter->second.first->localIndexPair().global()<index)
1741 ++(iter->second.first);
1744 if(iter->second.first == iter->second.second)
1754 template<
typename T,
typename A>
1756 const Attribute& attribute)
1758 typedef typename Map::iterator
iterator;
1759 typedef typename Map::const_iterator const_iterator;
1760 const const_iterator end = map_.end();
1762 for(iterator iter = map_.begin(); iter != end;){
1768 remoteIndex = *current;
1771 while(iter->second.first!=iter->second.second && iter->second.first->localIndexPair().global()<index)
1772 ++(iter->second.first);
1775 while(iter->second.first!=iter->second.second
1776 && iter->second.first->localIndexPair().global()==index
1777 && iter->second.first->localIndexPair().local().attribute()<attribute)
1778 ++(iter->second.first);
1781 if(iter->second.first == iter->second.second)
1788 attribute_=attribute;
1792 template<
typename T,
typename A>
1795 typedef typename Map::iterator
iterator;
1796 typedef typename Map::const_iterator const_iterator;
1797 const const_iterator end = map_.end();
1799 for(iterator iter = map_.begin(); iter != end;){
1805 if(iter->second.first->localIndexPair().global()==index_ &&
1806 (noattribute || iter->second.first->localIndexPair().local().attribute() == attribute_))
1807 ++(iter->second.first);
1810 if(iter->second.first == iter->second.second)
1819 template<
typename T,
typename A>
1822 return map_.empty();
1825 template<
typename T,
typename A>
1830 return iterator(map_.begin(), map_.end(), index_);
1832 return iterator(map_.begin(), map_.end(), index_,
1836 template<
typename T,
typename A>
1840 return iterator(map_.end(), map_.end(), index_);
1843 template<
typename TG,
typename TA>
1844 inline std::ostream& operator<<(std::ostream& os, const RemoteIndex<TG,TA>& index)
1846 os<<
"[global="<<index.localIndexPair().global()<<
", remote attribute="<<index.attribute()<<
" local attribute="<<index.localIndexPair().local().attribute()<<
"]";
1850 template<
typename T,
typename A>
1851 inline std::ostream& operator<<(std::ostream& os, const RemoteIndices<T,A>& indices)
1854 MPI_Comm_rank(indices.comm_, &rank);
1857 typedef typename std::map<int,std::pair<RList*,RList*> >::const_iterator const_iterator;
1859 const const_iterator rend = indices.remoteIndices_.
end();
1861 for(const_iterator rindex = indices.remoteIndices_.begin(); rindex!=rend; ++rindex){
1862 os<<rank<<
": Prozess "<<rindex->first<<
":";
1864 if(!rindex->second.first->empty()){
1867 const typename RList::const_iterator send= rindex->second.first->end();
1869 for(
typename RList::const_iterator index = rindex->second.first->begin();
1870 index != send; ++index)
1874 if(!rindex->second.second->empty()){
1875 os<<rank<<
": Prozess "<<rindex->first<<
": "<<
"receive: ";
1877 const typename RList::const_iterator rend= rindex->second.second->end();
1879 for(
typename RList::const_iterator index = rindex->second.second->begin();
1880 index != rend; ++index)
1883 os<<std::endl<<std::flush;