Commit 9dbf40ee authored by Dave Moxey's avatar Dave Moxey

Fix for reading initial conditions in parallel format when using hybrid parallelism with npz > 1.

parent a576c8b9
......@@ -432,22 +432,27 @@ namespace Nektar
else // only load relevant partitions
{
int i,j;
map<int,int> FileIDs;
map<int,vector<int> > FileIDs;
map<int,vector<int> >::iterator it;
set<int> LoadFile;
for(i = 0; i < elementIDs_OnPartitions.size(); ++i)
{
for(j = 0; j < elementIDs_OnPartitions[i].size(); ++j)
{
FileIDs[elementIDs_OnPartitions[i][j]] = i;
FileIDs[elementIDs_OnPartitions[i][j]].push_back(i);
}
}
for(i = 0; i < ElementIDs.num_elements(); ++i)
{
if(FileIDs.count(ElementIDs[i]))
it = FileIDs.find(ElementIDs[i]);
if (it != FileIDs.end())
{
LoadFile.insert(FileIDs[ElementIDs[i]]);
for (j = 0; j < it->second.size(); ++j)
{
LoadFile.insert(it->second[j]);
}
}
}
......
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