Skip to content

Commit a60e57b

Browse files
Update to create_cell_partitioner API (#171)
* update * Fix for cell_partitioner * Adjust logging --------- Co-authored-by: Chris Richardson <cnr12@cam.ac.uk>
1 parent 1331728 commit a60e57b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,10 @@ int main(int argc, char* argv[])
263263
std::string thread_name = "RANK: " + std::to_string(mpi_rank);
264264
std::string fmt = "[%Y-%m-%d %H:%M:%S.%e] [" + thread_name + "] [%l] %v";
265265
spdlog::set_pattern(fmt);
266-
if (mpi_rank == 0)
267-
spdlog::set_level(spdlog::level::info);
266+
267+
// Turn off logging except on rank 0, if set (e.g. use SPDLOG_LEVEL=info in CLI)
268+
if (mpi_rank != 0)
269+
spdlog::set_level(spdlog::level::err);
268270

269271
solve(argc, argv);
270272

src/mesh.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ create_cube_mesh(MPI_Comm comm, std::size_t target_dofs, bool target_dofs_total,
179179
else
180180
MPI_Comm_dup(comm, &sub_comm);
181181

182-
auto cell_part = dolfinx::mesh::create_cell_partitioner(
183-
dolfinx::mesh::GhostMode::none, graph_part);
182+
auto cell_part = dolfinx::mesh::create_cell_partitioner(dolfinx::mesh::GhostMode::none,
183+
graph_part, 2);
184184
auto mesh = dolfinx::mesh::create_box(
185185
comm, sub_comm, {{{0.0, 0.0, 0.0}, {1.0, 1.0, 1.0}}}, {Nx, Ny, Nz},
186186
dolfinx::mesh::CellType::tetrahedron, cell_part);

0 commit comments

Comments
 (0)