Skip to content

Commit

Permalink
Log on all ranks when PYOP2_SPMD_STRICT is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JDBetteridge committed Oct 2, 2024
1 parent 137e301 commit 532c0f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion firedrake/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import tsfc.logging # noqa: F401
import pyop2.logger # noqa: F401

from pyop2.configuration import configuration
from pyop2.mpi import COMM_WORLD


Expand Down Expand Up @@ -79,7 +80,7 @@ def set_log_handlers(handlers=None, comm=COMM_WORLD):
handler = logging.StreamHandler()
handler.setFormatter(logging.Formatter(fmt="%(name)s:%(levelname)s %(message)s"))

if comm is not None and comm.rank != 0:
if comm is not None and comm.rank != 0 and not configuration["spmd_strict"]:
handler = logging.NullHandler()

logger.addHandler(handler)
Expand Down

0 comments on commit 532c0f9

Please sign in to comment.