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 Sep 12, 2024
1 parent 5191820 commit a135d96
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 a135d96

Please sign in to comment.