sprintf (mpiPi.oFilename, "%s/%s.%d.%d.%d.mpiP", mpiPi.outputDir, mpiPi.appName, mpiPi.size, mpiPi.procID, printCount);
mpiPi_publishResults (){  int ac;  callsite_stats_t **av;  int i;  FILE *fp;  static int printCount = 0;  if (mpiPi.collectorRank != mpiPi.rank)    {      return;    }  /* take the final data from merge and display in a nice format */  if (0 ==      h_gather_data (mpiPi.global_callsite_stats, &ac, (void ***) &av))    {      mpiPi_msg_warn ("Global callsite table empty! Aborting report!\n");      return;    }  mpiPi_msg_debug ("Found %d entries in global callsite table.\n", ac);  mpiPi_msg_debug ("\n");  /* Generate output filename, and open */  {    char nowstr[128];    const struct tm *nowstruct;    char *fmtstr = "%Y %m %d %H %M %S";    nowstruct = localtime (&mpiPi.start_timeofday);    if (strftime (nowstr, 128, fmtstr, nowstruct) == (size_t) 0)      mpiPi_msg_warn ("Could not get string from strftime()\n");    for (i = 0; nowstr[i] != '\0'; i++)      {	if (nowstr[i] == ' ')	  {	    nowstr[i] = '-';	  }      }    if ( printCount == 0 )      sprintf (mpiPi.oFilename, "%s/%s.%d.%d.mpiP", mpiPi.outputDir,               mpiPi.appName, mpiPi.size, mpiPi.procID);    else      sprintf (mpiPi.oFilename, "%s/%s.%d.%d.%d.mpiP", mpiPi.outputDir,               mpiPi.appName, mpiPi.size, mpiPi.procID, printCount);    printCount++;    fp = fopen (mpiPi.oFilename, "w");  }  if (fp == NULL)    {      mpiPi_msg_warn ("Could not open [%s], writing to stdout\n",		      mpiPi.oFilename);      fp = stdout;    }  else    {      mpiPi_msg ("\n");      mpiPi_msg ("Storing mpiP output in [%s].\n", mpiPi.oFilename);      mpiPi_msg ("\n");    }  mpiPi_profile_print (fp);  if (fp != stdout)    {      fclose (fp);    }}