From 0ccafb5bd6e9821fcced9af8f1d4a3531c8b0f1e Mon Sep 17 00:00:00 2001 From: Konstantin Kutscher <kutscher@irmb.tu-bs.de> Date: Thu, 5 Jul 2018 09:15:08 +0200 Subject: [PATCH] fixes restart of demObjects --- source/Applications/Thermoplast/config.txt | 6 +++--- source/DemCoupling/RestartDemCouplingCoProcessor.cpp | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/source/Applications/Thermoplast/config.txt b/source/Applications/Thermoplast/config.txt index 7ddd18eac..d8e5a35d2 100644 --- a/source/Applications/Thermoplast/config.txt +++ b/source/Applications/Thermoplast/config.txt @@ -6,15 +6,15 @@ boundingBox = 60 1370 10 190 1530 320 #boundingBox = 60 0 10 190 1530 2320 blocknx = 10 10 10 #blocknx = 300 420 320 -endTime = 20 -outTime = 20 +endTime = 100 +outTime = 100 availMem = 25e9 uLB = 0.1 #PE parameters peMinOffset = 0 0 0 #46 2 2 peMaxOffset = 0 0 0 #-8 -25 -2 -sphereTime = 20 +sphereTime = 100 #geometry files pathGeo = d:/Projects/ThermoPlast/SimGeo diff --git a/source/DemCoupling/RestartDemCouplingCoProcessor.cpp b/source/DemCoupling/RestartDemCouplingCoProcessor.cpp index 9b657c212..e16fadb15 100644 --- a/source/DemCoupling/RestartDemCouplingCoProcessor.cpp +++ b/source/DemCoupling/RestartDemCouplingCoProcessor.cpp @@ -41,16 +41,17 @@ void RestartDemObjectsCoProcessor::write(int step) if (comm->isRoot()) UBLOG(logINFO, "RestartDemObjectsCoProcessor size p: " << p.size()); - std::vector<double> values = comm->gather(p); + std::vector<double> rvalues; + comm->allGather(p, rvalues); if (comm->isRoot()) { std::string subfolder = "dem_cp_"+UbSystem::toString(step); std::string filePath = path+"/dem_cp/"+subfolder+"/dem_cp.bin"; UbFileOutputBinary fo(filePath); - fo.writeInteger((int)values.size()); - fo.writeVector<double>(values); - UBLOG(logINFO, "RestartDemObjectsCoProcessor size: " << values.size()); + fo.writeInteger((int)rvalues.size()); + fo.writeVector<double>(rvalues); + UBLOG(logINFO, "RestartDemObjectsCoProcessor size: " << rvalues.size()); } if (comm->isRoot()) UBLOG(logINFO, "RestartDemObjectsCoProcessor write:stop "); } -- GitLab