Skip to content

Commit

Permalink
Change to more concise naming of output files
Browse files Browse the repository at this point in the history
  • Loading branch information
luszczek committed Dec 20, 2016
1 parent 8ab3558 commit cae6508
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,15 @@ HPCG_Init(int * argc_p, char ** *argv_p, HPCG_Params & params) {

time ( &rawtime );
ptm = localtime(&rawtime);
sprintf( fname, "hpcg_log_%04d.%02d.%02d.%02d.%02d.%02d.txt",
sprintf( fname, "hpcg%04d%02d%02dT%02d%02d%02d.txt",
1900 + ptm->tm_year, ptm->tm_mon+1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec );

if (0 == params.comm_rank) {
HPCG_fout.open(fname);
} else {
#if defined(HPCG_DEBUG) || defined(HPCG_DETAILED_DEBUG)
char local[15];
sprintf( local, "%d_", params.comm_rank );
sprintf( fname, "hpcg_log_%s%04.d%02d.%02d.%02d.%02d.%02d.txt", local,
1900 + ptm->tm_year, ptm->tm_mon+1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec );
sprintf( fname, "hpcg%04d%02d%02dT%02d%02d%02d_%d.txt",
1900 + ptm->tm_year, ptm->tm_mon+1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec, params.comm_rank );
HPCG_fout.open(fname);
#else
HPCG_fout.open(NULLDEVICE);
Expand Down

0 comments on commit cae6508

Please sign in to comment.