Commit 5b9f50bf authored by Philip Carns's avatar Philip Carns

use MPI_Wtime() value in file name hash calculation to avoid collisions

when one executable produces multiple logs rapidly (ie,
cp-shutdown-bench)


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@596 3b7491f3-a168-0410-bf4b-c445ed680a29
parent adce0a32
......@@ -276,6 +276,7 @@ void darshan_shutdown(int timing_flag)
char env_check[256];
char* env_tok;
#endif
uint64_t hlevel;
CP_LOCK();
if(!darshan_global_job)
......@@ -354,6 +355,8 @@ void darshan_shutdown(int timing_flag)
}
bcst1=DARSHAN_MPI_CALL(PMPI_Wtime)();
hlevel = bcst1*1000000;
DARSHAN_MPI_CALL(PMPI_Bcast)(mnt_id_array_root,
CP_MAX_MNTS*sizeof(int64_t), MPI_BYTE, 0, MPI_COMM_WORLD);
DARSHAN_MPI_CALL(PMPI_Bcast)(mnt_hash_array_root,
......@@ -474,7 +477,7 @@ void darshan_shutdown(int timing_flag)
/* generate a random number to help differentiate the log */
(void) gethostname(hname, sizeof(hname));
logmod = darshan_hash((void*)hname,strlen(hname),0);
logmod = darshan_hash((void*)hname,strlen(hname),hlevel);
/* see if darshan was configured using the --with-logpath-by-env
* argument, which allows the user to specify an absolute path to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment