Skip to content

Commit

Permalink
Add mesh preprocessing to timing output
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcars committed Nov 13, 2024
1 parent ab97118 commit 6db6000
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion palace/utils/geodata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ std::unique_ptr<mfem::ParMesh> ReadMesh(MPI_Comm comm, const IoData &iodata)
// If possible on root, read the serial mesh (converting format if necessary), and do all
// necessary serial preprocessing. When finished, distribute the mesh to all processes.
// Count disk I/O time separately for the mesh read from file.
BlockTimer bt0(Timer::MESH_PREPROCESS);

// If not doing any local adaptation, or performing conformal adaptation, we can use the
// mesh partitioner.
Expand Down Expand Up @@ -118,7 +119,7 @@ std::unique_ptr<mfem::ParMesh> ReadMesh(MPI_Comm comm, const IoData &iodata)

// Only one process per node reads the serial mesh.
{
BlockTimer bt(Timer::IO);
BlockTimer bt1(Timer::IO);
if ((use_mesh_partitioner && Mpi::Root(comm)) ||
(!use_mesh_partitioner && Mpi::Root(node_comm)))
{
Expand Down
2 changes: 2 additions & 0 deletions palace/utils/timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Timer
enum Index
{
INIT = 0,
MESH_PREPROCESS, // Preprocessing mesh
CONSTRUCT, // Space and operator construction
WAVE_PORT, // Wave port solver
KSP, // Linear solver
Expand All @@ -52,6 +53,7 @@ class Timer
// clang-format off
inline static const std::vector<std::string> descriptions{
"Initialization",
" Mesh Preprocessing",
"Operator Construction",
" Wave Ports",
"Linear Solve",
Expand Down

0 comments on commit 6db6000

Please sign in to comment.