Commit a53967a1 authored by François Trahay's avatar François Trahay Committed by Mathieu Faverge

OTF2: improve support for mpi communicators

parent 72b33654
......@@ -315,7 +315,6 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefGroup(void * /*userD
g->_paradigm = paradigm;
g->_flags = flags;
g->_members.resize(numberOfMembers);
g->_membersSize = numberOfMembers;
for(uint32_t i=0; i<numberOfMembers; i++) {
g->_members[i] = members[i];
}
......@@ -465,20 +464,25 @@ OTF2_Location* ParserDefinitionOTF2::get_location_in_communicator(const OTF2_Com
uint32_t rank) {
struct OTF2_Comm * c= _comms[comm];
if(!c) {
cerr<<"Error: cannot find communicator "<<comm<<endl;
abort();
cerr<<"Warning: cannot find communicator "<<comm<<endl;
// This is probably because the tracing tool did not support communicators
// Let's assume that rank is actually a locationRef
return get_location_by_id(rank);
}
struct OTF2_Group *g= _groups[c->_group];
if(!g) {
cerr<<"Error: cannot find rank "<<rank<<" in communicator "<<comm<<endl;
abort();
cerr<<"Warning: cannot find rank "<<rank<<" in communicator "<<comm<<endl;
// This is probably because the tracing tool did not support communicators
// Let's assume that rank is actually a locationRef
return get_location_by_id(rank);
}
if(rank > g->_members.size()) {
cerr<<"Error: searching for rank "<<rank<<" in communicator "<<comm<<", but comm_size="<<g->_members.size()<<", memberSize="<<g->_membersSize<<endl;
*(int*)0=0;
abort();
cerr<<"Warning: searching for rank "<<rank<<" in communicator "<<comm<<", but comm_size="<<g->_members.size()<<endl;
// This is probably because the tracing tool did not support communicators
// Let's assume that rank is actually a locationRef
return get_location_by_id(rank);
}
return get_location_by_id(g->_members[rank]);
}
......
......@@ -172,7 +172,6 @@ struct OTF2_Group {
OTF2_Paradigm _paradigm;
OTF2_GroupFlag _flags;
std::vector<uint64_t> _members;
size_t _membersSize;
};
struct OTF2_Comm {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment