diff --git a/src/plugins/mpi/mvapich/mvapich.c b/src/plugins/mpi/mvapich/mvapich.c index 4f50ce2dd56732bdad7b7c7eccebf7006f829bd8..afc41598ed4740c07a44948471144b2a9da292cc 100644 --- a/src/plugins/mpi/mvapich/mvapich.c +++ b/src/plugins/mpi/mvapich/mvapich.c @@ -1238,6 +1238,7 @@ mvapich_print_abort_message (mvapich_state_t *st, int rank, int dest, char *msg, int msglen) { slurm_step_layout_t *sl = st->job->step_layout; + int i; char *host; char *msgstr; char time_stamp[256]; @@ -1255,6 +1256,16 @@ mvapich_print_abort_message (mvapich_state_t *st, int rank, if (msg [msglen - 1] == '\n') msg [msglen - 1] = '\0'; + /* + * Replace internal newlines with periods. We want + * the full message to be written as a single line + * to the syslog. + */ + for (i = 0; i < msglen; i++) { + if (msg [i] == '\n') + msg [i] = '.'; + } + msgstr = msg; } else {