Commit 909941b5 authored by Philip Carns's avatar Philip Carns

fix bugs in previous datatype workaround for openmpi


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@411 3b7491f3-a168-0410-bf4b-c445ed680a29
parent d8572a7e
...@@ -1835,14 +1835,18 @@ static int cp_log_write(struct darshan_job_runtime* final_job, int rank, ...@@ -1835,14 +1835,18 @@ static int cp_log_write(struct darshan_job_runtime* final_job, int rank,
{ {
/* TODO: keep this print or not? */ /* TODO: keep this print or not? */
fprintf(stderr, "darshan library warning: unable to open log file %s\n", logfile_name); fprintf(stderr, "darshan library warning: unable to open log file %s\n", logfile_name);
DARSHAN_MPI_CALL(PMPI_Type_free)(&mtype); if(count > 0)
DARSHAN_MPI_CALL(PMPI_Type_free)(&mtype);
return(-1); return(-1);
} }
DARSHAN_MPI_CALL(PMPI_File_set_size)(fh, 0); DARSHAN_MPI_CALL(PMPI_File_set_size)(fh, 0);
/* figure out where everyone is writing */ /* figure out where everyone is writing */
DARSHAN_MPI_CALL(PMPI_Type_size)(mtype, &my_total); if(count > 0)
DARSHAN_MPI_CALL(PMPI_Type_size)(mtype, &my_total);
else
my_total = 0;
my_total_long = my_total; my_total_long = my_total;
DARSHAN_MPI_CALL(PMPI_Scan)(&my_total_long, &offset, 1, DARSHAN_MPI_CALL(PMPI_Scan)(&my_total_long, &offset, 1,
MPI_LONG, MPI_SUM, MPI_COMM_WORLD); MPI_LONG, MPI_SUM, MPI_COMM_WORLD);
......
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