Skip to content
7 changes: 7 additions & 0 deletions tcgmsg/tcgmsg-mpi/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ extern void exit(int status);
#include "armci.h"

char tcgmsg_err_string[ERR_STR_LEN];
#ifdef MPI_COMM_WORLD
MPI_Comm TCGMSG_Comm=MPI_COMM_WORLD;
#else
MPI_Comm TCGMSG_Comm;
#endif
int _tcg_initialized=0;
long DEBUG_;
int SR_parallel;
Expand Down Expand Up @@ -142,6 +146,9 @@ void tcgi_alt_pbegin(int *argc, char **argv[])
#else
MPI_Init(argc, argv);
#endif
#ifndef MPI_COMM_WORLD

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These three lines don't seem quite right

TCGMSG_Comm=MPI_COMM_WORLD;
#endif
#if defined(MPI_VERSION) && (MPI_VERSION >= 2)
MPI_Comm_set_errhandler(TCGMSG_Comm, MPI_ERRORS_RETURN);
#else
Expand Down