Commit 1d184b81 authored by Philip Carns's avatar Philip Carns

gather more helpful error information when we fail to open a log file


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@426 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 603d4e0d
......@@ -1836,7 +1836,11 @@ static int cp_log_write(struct darshan_job_runtime* final_job, int rank,
/* TODO: keep this print or not? */
if(rank == 0)
{
fprintf(stderr, "darshan library warning: unable to open log file %s\n", logfile_name);
int msg_len;
char msg[MPI_MAX_ERROR_STRING] = {0};
MPI_Error_string(ret, msg, &msg_len);
fprintf(stderr, "darshan library warning: unable to open log file %s: %s\n", logfile_name, msg);
}
if(count > 0)
DARSHAN_MPI_CALL(PMPI_Type_free)(&mtype);
......
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