Skip to content

Commit

Permalink
Use different approach to skip mini seissol
Browse files Browse the repository at this point in the history
  • Loading branch information
krenzland committed May 21, 2021
1 parent 768008d commit 46b617a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/Geometry/MeshReaderFBinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ void read_mesh_puml_c(const char* meshfile, const char* checkPointFile, bool has
double tpwgt = 1.0;

if constexpr (!seissol::isDeviceOn()) {
#ifdef USE_MINI_SEISSOL
if (seissol::MPI::mpi.size() > 1) {
logInfo(rank) << "Running mini SeisSol to determine node weight";
tpwgt = 1.0 / seissol::miniSeisSol(seissol::SeisSol::main.getMemoryManager());
Expand All @@ -305,8 +306,11 @@ void read_mesh_puml_c(const char* meshfile, const char* checkPointFile, bool has
<< " median =" << summary.median
<< " max =" << summary.max;
}
#else
logInfo(rank) << "Skipping mini SeisSol";
#endif
}

logInfo(rank) << "Reading PUML mesh" << meshfile;

Stopwatch watch;
Expand Down
6 changes: 0 additions & 6 deletions src/Geometry/PUMLReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,7 @@ void seissol::PUMLReader::partition( PUML::TETPUML &puml,
PUML::TETPartitionMetis metis(puml.originalCells(), puml.numOriginalCells());
#ifdef USE_MPI
auto* nodeWeights = new double[seissol::MPI::mpi.size()];
#ifdef USE_MINI_SEISSOL
MPI_Allgather(&tpwgt, 1, MPI_DOUBLE, nodeWeights, 1, MPI_DOUBLE, seissol::MPI::mpi.comm());
#else
for (int rk = 0; rk < seissol::MPI::mpi.size(); ++rk) {
nodeWeights[rk] = 1.0;
}
#endif
double sum = 0.0;
for (int rk = 0; rk < seissol::MPI::mpi.size(); ++rk) {
sum += nodeWeights[rk];
Expand Down

0 comments on commit 46b617a

Please sign in to comment.