Skip to content

Commit

Permalink
Update partition tool output to not echo information that is not pert…
Browse files Browse the repository at this point in the history
…inent. Improve partition docs
  • Loading branch information
Chrismarsh committed Jun 27, 2024
1 parent 545a4ae commit e990af5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/partition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Therefore only the mesh elements for this rank are loaded, dramatically reducing

.. warning::

The mesh should be have been permuted prior to hdf5 conversion for maximum MPI performance.
Failure to do so will result in significantly degraded runtime performance!
The mesh must be permuted using the metis partitioning method prior to hdf5 conversion for maximum MPI performance.

Please see :ref:`Mesh permutation <target mesh-permutation>` for more details.

Expand Down Expand Up @@ -119,6 +118,7 @@ Output

json to hdf5
*************
If you do not specify any mpi configuration options, then only the ``.json`` to ``.h5`` conversion will be done.
Output will be two ``.h5`` files called ``basename_mesh.h5`` and ``basename_param.h5``.
For example if the input mesh is ``granger1m.mesh`` then basename is ``granger1m`` resulting in the files

Expand Down
8 changes: 6 additions & 2 deletions src/preprocessing/partition/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1469,12 +1469,16 @@ int main(int argc, char* argv[])

auto is_json_mesh = boost::filesystem::path(mesh_filename).extension().string() == ".mesh";

if (is_json_mesh)
if (vm.count("mpi-ranks") && is_json_mesh)
{
SPDLOG_WARN("The input mesh is in json format. It MUST be converted to hdf5 before it can be partitioned.\n"
" Once the hdf5 conversion is done, this tool will re-run with the h5 mesh as input to fully "
"partition the mesh.");
}
else if(is_json_mesh)
{
SPDLOG_DEBUG("Converting mesh from json to h5.");
}

if (!vm.count("mesh-file"))
{
Expand Down Expand Up @@ -1503,7 +1507,7 @@ int main(int argc, char* argv[])
SPDLOG_WARN("MPI ranks will be ignored for the json -> h5 conversion. ");
}

if (!vm.count("max-ghost-distance"))
if (!vm.count("max-ghost-distance") && vm.count("mpi-ranks"))
{
SPDLOG_WARN("Using default max ghost distance of 100 m");
}
Expand Down

0 comments on commit e990af5

Please sign in to comment.