Commit b91f8bda authored by fisaila's avatar fisaila

Small code refactoring.



git-svn-id: https://svn.mcs.anl.gov/repos/darshan/branches/darshan-florin-extensions-addcounters-datatypes@877 3b7491f3-a168-0410-bf4b-c445ed680a29
parent c0fc8c5b
......@@ -164,7 +164,7 @@ void darshan_trace_log_record(int rank, int epoch, int op, double tm1, double tm
d->tm2 = tm2;
d->send_count = send_count;
d->recv_count = recv_count;
d->offset = offset;
d->offset = offset;
darshan_log_ptr += sizeof(struct darshan_trace_record);
}
}
......
......@@ -973,11 +973,12 @@ ssize_t DARSHAN_DECL(write)(int fd, const void *buf, size_t count)
CP_RECORD_WRITE(ret, fd, count, 0, 0, aligned_flag, 0, tm1, tm2);
if (darshan_global_job) {
int rank;
long long int off=0;
PMPI_Comm_rank(MPI_COMM_WORLD, &rank);
off = lseek64(fd,0,SEEK_CUR);
darshan_trace_log_record(rank, epoch_counter, CP_POSIX_WRITES, tm1, tm2, count, 0, off);
// int rank;
//PMPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (getenv("DARSHAN_TRACING")){
darshan_trace_log_record(-1, epoch_counter, CP_POSIX_WRITES, tm1, tm2, count, 0, __real_lseek64(fd,0,SEEK_CUR));
}
}
CP_UNLOCK();
......
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