mus_particles_global_errorcheck Subroutine

public subroutine mus_particles_global_errorcheck(flag, comm)

Routine to aggregate local error flags and use MPI allreduce to set a global flag if any of the local flags is true

Arguments

Type IntentOptional Attributes Name
logical, intent(inout) :: flag

Error flag: at input this will be the local error code of this rank only which is set to TRUE if there is an error and FALSE if not. Upon output this will be set to flag = TRUE if ANY of the local error codes (on all processes in comm) were TRUE.

integer, intent(in) :: comm

MPI communicator