Skip to content

Logging with MPI enabled before MPI_Init causes error #277

@TheAssembler1

Description

@TheAssembler1

Bug Report

Logging functions need to call MPI_Initialized to check that MPI has been initialized before trying to get rank for logging. We can simply cache the result once it succeeds so we don't call it for every log call.

Error looks like this if logging is attempted before MPI is initialized:

*** The MPI_Comm_rank() function was called before MPI_INIT was invoked.
*** This is disallowed by the MPI standard.
*** Your MPI job will now abort.
[blypc:18971] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions