Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

Commit

Permalink
Print first message earlier, so we know that MPI_Init completed
Browse files Browse the repository at this point in the history
  • Loading branch information
morrone committed Sep 10, 2012
1 parent e3d1a77 commit 15e5f64
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/ior.c
Expand Up @@ -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 *);
Expand Down Expand Up @@ -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"); */
Expand Down Expand Up @@ -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;
Expand All @@ -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++) {
Expand Down

0 comments on commit 15e5f64

Please sign in to comment.