Commit 60a4e16a authored by fisaila's avatar fisaila

Fixed a bug : local log pointer used in MPI_Scan operation is now also long long int


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/branches/darshan-florin-extensions-addcounters-datatypes@871 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 2aa1f3f9
......@@ -236,7 +236,7 @@ extern int epoch_counter;
extern char darshan_log[DARSHAN_TRACER_LOG_SIZE];
//extern char darshan_log[];
extern int darshan_log_ptr;
extern long long int darshan_log_ptr;
void darshan_trace_log_record(int rank, int epoch, int op, double tm1, double tm2, int send_count, int recv_count, long long int offset);
void darshan_trace_log_write();
......
......@@ -144,7 +144,7 @@ int epoch_counter = 0;
char darshan_log[DARSHAN_TRACER_LOG_SIZE];
int darshan_log_ptr = 0;
long long int darshan_log_ptr = 0;
void darshan_trace_log_record(int rank, int epoch, int op, double tm1, double tm2, int send_count, int recv_count, long long int offset) {
......@@ -197,7 +197,7 @@ void darshan_trace_log_write() {
fprintf(stdout, "DARSHAN_TRACEFILE:%s\n", filename);
MPI_Scan(&darshan_log_ptr, &offset, 1, MPI_LONG_LONG_INT, MPI_SUM, MPI_COMM_WORLD);
// printf("%d: darshan_log_ptr=%lld offset=%lld\n", rank, darshan_log_ptr, offset-darshan_log_ptr);
DARSHAN_MPI_CALL(PMPI_File_open)(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_WRONLY | MPI_MODE_EXCL,
MPI_INFO_NULL, &fh);
DARSHAN_MPI_CALL(PMPI_File_write_at_all)(fh, offset - darshan_log_ptr, darshan_log, darshan_log_ptr, MPI_BYTE, &status);
......
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