Skip to content

Commit

Permalink
moved geo id reset, workaround for precice#378
Browse files Browse the repository at this point in the history
  • Loading branch information
uekerman committed May 13, 2019
1 parent 8e20061 commit bdc94bd
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/precice/impl/SolverInterfaceImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ void SolverInterfaceImpl:: configure
(
const std::string& configurationFileName )
{
mesh::Mesh::resetGeometryIDsGlobally();
mesh::Data::resetDataCount();
Participant::resetParticipantCount();

config::Configuration config;
xml::configure(config.getXMLTag(), configurationFileName);
if(_accessorProcessRank==0){
Expand All @@ -110,9 +114,6 @@ void SolverInterfaceImpl:: configure
Event e("configure"); // no precice::syncMode as this is not yet configured here
utils::ScopedEventPrefix sep("configure/");

mesh::Mesh::resetGeometryIDsGlobally();
mesh::Data::resetDataCount();
Participant::resetParticipantCount();
_meshLock.clear();

_dimensions = config.getDimensions();
Expand Down Expand Up @@ -176,11 +177,11 @@ void SolverInterfaceImpl:: configure
for (const auto& meshID : _meshIDs) {
_meshLock.add(meshID.second, false);
}

utils::Parallel::initializeMPI(nullptr, nullptr);
logging::setMPIRank(utils::Parallel::getProcessRank());
utils::EventRegistry::instance().initialize("precice-" + _accessorName, "", utils::Parallel::getGlobalCommunicator());

// Setup communication to server
if (_clientMode){
initializeClientServerCommunication();
Expand All @@ -200,7 +201,7 @@ double SolverInterfaceImpl:: initialize()
solverInitEvent.pause(precice::syncMode);
Event e("initialize", precice::syncMode);
utils::ScopedEventPrefix sep("initialize/");

if (_clientMode){
DEBUG("Request perform initializations");
_requestManager->requestInitialize();
Expand Down Expand Up @@ -1353,7 +1354,7 @@ void SolverInterfaceImpl:: configurePartitions
std::string receiver ( _accessorName );
std::string provider ( context->receiveMeshFrom );
DEBUG ( "Receiving mesh from " << provider );

context->partition = partition::PtrPartition(new partition::ReceivedPartition(context->mesh, context->geoFilter, context->safetyFactor));

m2n::PtrM2N m2n = m2nConfig->getM2N ( receiver, provider );
Expand Down

0 comments on commit bdc94bd

Please sign in to comment.