Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Print first message earlier, so we know that MPI_Init completed

  • Loading branch information...
commit 15e5f648a841fe491fcd1179f7e88f92a06e3414 1 parent e3d1a77
@morrone morrone authored
Showing with 18 additions and 3 deletions.
  1. +18 −3 src/ior.c
View
21 src/ior.c
@@ -69,6 +69,7 @@ static void DisplayUsage(char **);
static void GetTestFileName(char *, IOR_param_t *);
static char *PrependDir(IOR_param_t *, char *);
static char **ParseFileName(char *, int *);
+static void PrintEarlyHeader();
static void PrintHeader(int argc, char **argv);
static IOR_test_t *SetupTests(int, char **);
static void ShowTestInfo(IOR_param_t *);
@@ -105,6 +106,8 @@ int main(int argc, char **argv)
MPI_CHECK(MPI_Comm_size(MPI_COMM_WORLD, &numTasksWorld),
"cannot get number of tasks");
MPI_CHECK(MPI_Comm_rank(MPI_COMM_WORLD, &rank), "cannot get rank");
+ PrintEarlyHeader();
+
/* set error-handling */
/*MPI_CHECK(MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN),
"cannot set errhandler"); */
@@ -1352,6 +1355,21 @@ static void XferBuffersFree(void *buffer, void *checkBuffer,
return;
}
+
+/*
+ * Message to print immediately after MPI_Init so we know that
+ * ior has started.
+ */
+static void PrintEarlyHeader()
+{
+ if (rank != 0)
+ return;
+
+ printf("IOR-" META_VERSION ": MPI Coordinated Test of Parallel I/O\n");
+ printf("\n");
+ fflush(stdout);
+}
+
static void PrintHeader(int argc, char **argv)
{
struct utsname unamebuf;
@@ -1360,9 +1378,6 @@ static void PrintHeader(int argc, char **argv)
if (rank != 0)
return;
- printf("IOR-" META_VERSION ": MPI Coordinated Test of Parallel I/O\n");
- printf("\n");
-
fprintf(stdout, "Began: %s", CurrentTimeString());
fprintf(stdout, "Command line used:");
for (i = 0; i < argc; i++) {
Please sign in to comment.
Something went wrong with that request. Please try again.