<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
img {
max-width: 100%;
height: auto;
}
p.details {
font-style:italic;
color:#777
}
.footer p {
font-size:small;
color:#777
}
pre.commit-message {
white-space: pre-wrap;
}
.file-stats a {
text-decoration: none;
}
.file-stats .new-file {
color: #090;
}
.file-stats .deleted-file {
color: #B00;
}
</style>
<body>
<div class='content'>
<h3>Shane Snyder pushed to branch mmap-dev at <a href="https://xgitlab.cels.anl.gov/darshan/darshan">darshan / darshan</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/c3c5e59770b89b2d00aeb45a1dccbbf132a0514d">c3c5e597</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2015-10-13T16:44:32Z</i>
</div>
<pre class='commit-message'>more mmap logic and instrumentation for testing</pre>
</li>
</ul>
<h4>4 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
darshan-runtime/Makefile.in
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
darshan-runtime/lib/darshan-core.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
darshan-runtime/lib/darshan-posix.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
darshan-util/Makefile.in
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/c3c5e59770b89b2d00aeb45a1dccbbf132a0514d#diff-0'>
<strong>
darshan-runtime/Makefile.in
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/Makefile.in
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/Makefile.in
</span><span style="color: #aaaaaa">@@ -33,15 +33,8 @@ CFLAGS_SHARED = -DDARSHAN_CONFIG_H=\"darshan-runtime-config.h\" -I . -I$(srcdir)
</span>
LIBS = -lz @LIBBZ2@
-static-mod-objs = lib/darshan-posix.o lib/darshan-mpiio.o lib/darshan-hdf5.o lib/darshan-pnetcdf.o
-dynamic-mod-objs = lib/darshan-posix.po lib/darshan-mpiio.po lib/darshan-hdf5.po lib/darshan-pnetcdf.po
-
-ifdef DARSHAN_USE_BGQ
-static-mod-objs += lib/darshan-bgq.o
-dynamic-mod-objs += lib/darshan-bgq.po
-CFLAGS += -DDARSHAN_BGQ
-CFLAGS_SHARED += -DDARSHAN_BGQ
-endif
<span style="color: #000000;background-color: #ddffdd">+static-mod-objs = lib/darshan-posix.o
+dynamic-mod-objs = lib/darshan-posix.po
</span>
lib::
@mkdir -p $@
</code></pre>
<br>
</li>
<li id='diff-1'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/c3c5e59770b89b2d00aeb45a1dccbbf132a0514d#diff-1'>
<strong>
darshan-runtime/lib/darshan-core.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-core.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-core.c
</span><span style="color: #aaaaaa">@@ -122,7 +122,7 @@ void darshan_core_initialize(int argc, char **argv)
</span> struct darshan_core_runtime *init_core = NULL;
int internal_timing_flag = 0;
double init_start, init_time, init_max;
<span style="color: #000000;background-color: #ffdddd">- char *mmap_log_name = "darshan-log.out";
</span><span style="color: #000000;background-color: #ddffdd">+ char mmap_log_name[PATH_MAX];
</span> int mmap_fd;
int mmap_size;
int sys_page_size;
<span style="color: #aaaaaa">@@ -176,6 +176,26 @@ void darshan_core_initialize(int argc, char **argv)
</span> memset(init_core, 0, sizeof(*init_core));
init_core->wtime_offset = DARSHAN_MPI_CALL(PMPI_Wtime)();
<span style="color: #000000;background-color: #ddffdd">+ /* Use DARSHAN_JOBID_OVERRIDE for the env var for __DARSHAN_JOBID */
+ envstr = getenv(DARSHAN_JOBID_OVERRIDE);
+ if(!envstr)
+ {
+ envstr = __DARSHAN_JOBID;
+ }
+
+ /* find a job id */
+ jobid_str = getenv(envstr);
+ if(jobid_str)
+ {
+ /* in cobalt we can find it in env var */
+ ret = sscanf(jobid_str, "%d", &jobid);
+ }
+ if(!jobid_str || ret != 1)
+ {
+ /* use pid as fall back */
+ jobid = getpid();
+ }
+
</span> sys_page_size = sysconf(_SC_PAGESIZE);
assert(sys_page_size > 0);
<span style="color: #aaaaaa">@@ -187,7 +207,13 @@ void darshan_core_initialize(int argc, char **argv)
</span> if(mmap_size % sys_page_size)
mmap_size = ((mmap_size / sys_page_size) + 1) * sys_page_size;
<span style="color: #000000;background-color: #ffdddd">- /* TODO: logfile name should have process rank in it for uniqueness */
</span><span style="color: #000000;background-color: #ddffdd">+ /* construct a unique temporary log file name for this process
+ * to write mmap log data to
+ */
+ snprintf(mmap_log_name, PATH_MAX, "/tmp/darshan_job%d.%d",
+ jobid, my_rank);
+
+ /* create the temporary mmapped darshan log */
</span> mmap_fd = open(mmap_log_name, O_CREAT|O_RDWR|O_EXCL , 0644);
if(mmap_fd < 0)
{
<span style="color: #aaaaaa">@@ -238,26 +264,6 @@ void darshan_core_initialize(int argc, char **argv)
</span> init_core->mmap_job_p->uid = getuid();
init_core->mmap_job_p->start_time = time(NULL);
init_core->mmap_job_p->nprocs = nprocs;
-
<span style="color: #000000;background-color: #ffdddd">- /* Use DARSHAN_JOBID_OVERRIDE for the env var for __DARSHAN_JOBID */
- envstr = getenv(DARSHAN_JOBID_OVERRIDE);
- if(!envstr)
- {
- envstr = __DARSHAN_JOBID;
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* find a job id */
- jobid_str = getenv(envstr);
- if(jobid_str)
- {
- /* in cobalt we can find it in env var */
- ret = sscanf(jobid_str, "%d", &jobid);
- }
- if(!jobid_str || ret != 1)
- {
- /* use pid as fall back */
- jobid = getpid();
- }
</span> init_core->mmap_job_p->jobid = (int64_t)jobid;
/* if we are using any hints to write the log file, then record those
<span style="color: #aaaaaa">@@ -299,42 +305,17 @@ void darshan_core_initialize(int argc, char **argv)
</span>
void darshan_core_shutdown()
{
-
<span style="color: #000000;background-color: #ffdddd">- return;
</span>-#if 0
int i;
<span style="color: #000000;background-color: #ffdddd">- char *logfile_name;
</span> struct darshan_core_runtime *final_core;
int internal_timing_flag = 0;
<span style="color: #000000;background-color: #ffdddd">- char *envjobid;
- char *jobid_str;
- int jobid;
- struct tm *start_tm;
- time_t start_time_tmp;
- int ret = 0;
- int all_ret = 0;
- int64_t first_start_time;
- int64_t last_end_time;
- int local_mod_use[DARSHAN_MAX_MODS] = {0};
- int global_mod_use_count[DARSHAN_MAX_MODS] = {0};
- darshan_record_id shared_recs[DARSHAN_CORE_MAX_RECORDS] = {0};
</span> double start_log_time;
<span style="color: #000000;background-color: #ffdddd">- double open1, open2;
- double job1, job2;
- double rec1, rec2;
- double mod1[DARSHAN_MAX_MODS] = {0};
- double mod2[DARSHAN_MAX_MODS] = {0};
- double header1, header2;
</span> double tm_end;
<span style="color: #000000;background-color: #ffdddd">- uint64_t gz_fp = 0;
- unsigned char tmp_partial_flag;
- MPI_File log_fh;
- MPI_Status status;
</span>
if(getenv("DARSHAN_INTERNAL_TIMING"))
internal_timing_flag = 1;
<span style="color: #000000;background-color: #ffdddd">- start_log_time = DARSHAN_MPI_CALL(PMPI_Wtime)();
</span><span style="color: #000000;background-color: #ddffdd">+ if(internal_timing_flag)
+ start_log_time = DARSHAN_MPI_CALL(PMPI_Wtime)();
</span>
/* disable darhan-core while we shutdown */
DARSHAN_CORE_LOCK();
<span style="color: #aaaaaa">@@ -346,413 +327,38 @@ void darshan_core_shutdown()
</span> final_core = darshan_core;
darshan_core = NULL;
<span style="color: #000000;background-color: #ffdddd">- /* we also need to set which modules were registered on this process and
- * call into those modules and give them a chance to perform any necessary
- * pre-shutdown steps.
- */
</span> for(i = 0; i < DARSHAN_MAX_MODS; i++)
{
if(final_core->mod_array[i])
{
<span style="color: #000000;background-color: #ffdddd">- local_mod_use[i] = 1;
</span> final_core->mod_array[i]->mod_funcs.begin_shutdown();
}
}
DARSHAN_CORE_UNLOCK();
<span style="color: #000000;background-color: #ffdddd">- logfile_name = malloc(PATH_MAX);
- if(!logfile_name)
- {
- darshan_core_cleanup(final_core);
- return;
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* set darshan job id/metadata and constuct log file name on rank 0 */
- if(my_rank == 0)
- {
- /* Use DARSHAN_JOBID_OVERRIDE for the env var for __DARSHAN_JOBID */
- envjobid = getenv(DARSHAN_JOBID_OVERRIDE);
- if(!envjobid)
- {
- envjobid = __DARSHAN_JOBID;
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* find a job id */
- jobid_str = getenv(envjobid);
- if(jobid_str)
- {
- /* in cobalt we can find it in env var */
- ret = sscanf(jobid_str, "%d", &jobid);
- }
- if(!jobid_str || ret != 1)
- {
- /* use pid as fall back */
- jobid = getpid();
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- final_core->log_job.jobid = (int64_t)jobid;
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* if we are using any hints to write the log file, then record those
- * hints with the darshan job information
- */
- darshan_log_record_hints_and_ver(final_core);
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* use human readable start time format in log filename */
- start_time_tmp = final_core->log_job.start_time;
- start_tm = localtime(&start_time_tmp);
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* construct log file name */
- darshan_get_logfile_name(logfile_name, jobid, start_tm);
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* broadcast log file name */
- DARSHAN_MPI_CALL(PMPI_Bcast)(logfile_name, PATH_MAX, MPI_CHAR, 0,
- MPI_COMM_WORLD);
</span>-
<span style="color: #000000;background-color: #ffdddd">- if(strlen(logfile_name) == 0)
- {
- /* failed to generate log file name */
- free(logfile_name);
- darshan_core_cleanup(final_core);
- return;
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- final_core->log_job.end_time = time(NULL);
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* reduce to report first start time and last end time across all ranks
- * at rank 0
- */
- DARSHAN_MPI_CALL(PMPI_Reduce)(&final_core->log_job.start_time, &first_start_time, 1, MPI_LONG_LONG, MPI_MIN, 0, MPI_COMM_WORLD);
- DARSHAN_MPI_CALL(PMPI_Reduce)(&final_core->log_job.end_time, &last_end_time, 1, MPI_LONG_LONG, MPI_MAX, 0, MPI_COMM_WORLD);
- if(my_rank == 0)
- {
- final_core->log_job.start_time = first_start_time;
- final_core->log_job.end_time = last_end_time;
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* reduce the number of times a module was opened globally and bcast to everyone */
- DARSHAN_MPI_CALL(PMPI_Allreduce)(local_mod_use, global_mod_use_count, DARSHAN_MAX_MODS, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* get a list of records which are shared across all processes */
- darshan_get_shared_records(final_core, shared_recs);
</span>-
<span style="color: #000000;background-color: #ffdddd">- if(internal_timing_flag)
- open1 = DARSHAN_MPI_CALL(PMPI_Wtime)();
- /* collectively open the darshan log file */
- ret = darshan_log_open_all(logfile_name, &log_fh);
- if(internal_timing_flag)
- open2 = DARSHAN_MPI_CALL(PMPI_Wtime)();
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* error out if unable to open log file */
- DARSHAN_MPI_CALL(PMPI_Allreduce)(&ret, &all_ret, 1, MPI_INT,
- MPI_LOR, MPI_COMM_WORLD);
- if(all_ret != 0)
- {
- if(my_rank == 0)
- {
- fprintf(stderr, "darshan library warning: unable to open log file %s\n",
- logfile_name);
- unlink(logfile_name);
- }
- free(logfile_name);
- darshan_core_cleanup(final_core);
- return;
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- if(internal_timing_flag)
- job1 = DARSHAN_MPI_CALL(PMPI_Wtime)();
- /* rank 0 is responsible for writing the compressed darshan job information */
- if(my_rank == 0)
- {
- void *pointers[2] = {&final_core->log_job, final_core->trailing_data};
- int lengths[2] = {sizeof(struct darshan_job), strlen(final_core->trailing_data)};
- int comp_buf_sz = 0;
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* compress the job info and the trailing mount/exe data */
- all_ret = darshan_deflate_buffer(pointers, lengths, 2,
- final_core->comp_buf, &comp_buf_sz);
- if(all_ret)
- {
- fprintf(stderr, "darshan library warning: unable to compress job data\n");
- unlink(logfile_name);
- }
- else
- {
- /* write the job information, preallocing space for the log header */
- gz_fp += sizeof(struct darshan_header);
- all_ret = DARSHAN_MPI_CALL(PMPI_File_write_at)(log_fh, gz_fp,
- final_core->comp_buf, comp_buf_sz, MPI_BYTE, &status);
- if(all_ret != MPI_SUCCESS)
- {
- fprintf(stderr, "darshan library warning: unable to write job data to log file %s\n",
- logfile_name);
- unlink(logfile_name);
-
- }
- gz_fp += comp_buf_sz;
- }
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* error out if unable to write job information */
- DARSHAN_MPI_CALL(PMPI_Bcast)(&all_ret, 1, MPI_INT, 0, MPI_COMM_WORLD);
- if(all_ret != 0)
- {
- free(logfile_name);
- darshan_core_cleanup(final_core);
- return;
- }
- if(internal_timing_flag)
- job2 = DARSHAN_MPI_CALL(PMPI_Wtime)();
</span>-
<span style="color: #000000;background-color: #ffdddd">- if(internal_timing_flag)
- rec1 = DARSHAN_MPI_CALL(PMPI_Wtime)();
- /* write the record name->id hash to the log file */
- final_core->log_header.rec_map.off = gz_fp;
- ret = darshan_log_write_record_hash(log_fh, final_core, &gz_fp);
- final_core->log_header.rec_map.len = gz_fp - final_core->log_header.rec_map.off;
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* error out if unable to write record hash */
- DARSHAN_MPI_CALL(PMPI_Allreduce)(&ret, &all_ret, 1, MPI_INT,
- MPI_LOR, MPI_COMM_WORLD);
- if(all_ret != 0)
- {
- if(my_rank == 0)
- {
- fprintf(stderr, "darshan library warning: unable to write record hash to log file %s\n",
- logfile_name);
- unlink(logfile_name);
- }
- free(logfile_name);
- darshan_core_cleanup(final_core);
- return;
- }
- if(internal_timing_flag)
- rec2 = DARSHAN_MPI_CALL(PMPI_Wtime)();
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* loop over globally used darshan modules and:
- * - perform shared file reductions, if possible
- * - get final output buffer
- * - compress (zlib) provided output buffer
- * - append compressed buffer to log file
- * - add module index info (file offset/length) to log header
- * - shutdown the module
- */
- for(i = 0; i < DARSHAN_MAX_MODS; i++)
- {
- struct darshan_core_module* this_mod = final_core->mod_array[i];
- struct darshan_core_record_ref *ref = NULL;
- darshan_record_id mod_shared_recs[DARSHAN_CORE_MAX_RECORDS];
- int mod_shared_rec_cnt = 0;
- void* mod_buf = NULL;
- int mod_buf_sz = 0;
- int j;
</span>-
<span style="color: #000000;background-color: #ffdddd">- if(global_mod_use_count[i] == 0)
- {
- if(my_rank == 0)
- {
- final_core->log_header.mod_map[i].off = 0;
- final_core->log_header.mod_map[i].len = 0;
- }
- continue;
- }
-
- if(internal_timing_flag)
- mod1[i] = DARSHAN_MPI_CALL(PMPI_Wtime)();
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* set the shared file list for this module */
- memset(mod_shared_recs, 0, DARSHAN_CORE_MAX_RECORDS * sizeof(darshan_record_id));
- for(j = 0; j < DARSHAN_CORE_MAX_RECORDS && shared_recs[j] != 0; j++)
- {
- HASH_FIND(hlink, final_core->rec_hash, &shared_recs[j],
- sizeof(darshan_record_id), ref);
- assert(ref);
- if(DARSHAN_CORE_MOD_ISSET(ref->global_mod_flags, i))
- {
- mod_shared_recs[mod_shared_rec_cnt++] = shared_recs[j];
- }
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* if module is registered locally, get the corresponding output buffer
- *
- * NOTE: this function can be used to run collective operations across
- * modules, if there are file records shared globally.
- */
- if(this_mod)
- {
- this_mod->mod_funcs.get_output_data(MPI_COMM_WORLD, mod_shared_recs,
- mod_shared_rec_cnt, &mod_buf, &mod_buf_sz);
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* append this module's data to the darshan log */
- final_core->log_header.mod_map[i].off = gz_fp;
- ret = darshan_log_append_all(log_fh, final_core, mod_buf, mod_buf_sz, &gz_fp);
- final_core->log_header.mod_map[i].len =
- gz_fp - final_core->log_header.mod_map[i].off;
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* error out if the log append failed */
- DARSHAN_MPI_CALL(PMPI_Allreduce)(&ret, &all_ret, 1, MPI_INT,
- MPI_LOR, MPI_COMM_WORLD);
- if(all_ret != 0)
- {
- if(my_rank == 0)
- {
- fprintf(stderr,
- "darshan library warning: unable to write %s module data to log file %s\n",
- darshan_module_names[i], logfile_name);
- unlink(logfile_name);
- }
- free(logfile_name);
- darshan_core_cleanup(final_core);
- return;
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* shutdown module if registered locally */
- if(this_mod)
- {
- this_mod->mod_funcs.shutdown();
- }
- if(internal_timing_flag)
- mod2[i] = DARSHAN_MPI_CALL(PMPI_Wtime)();
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* run a reduction to determine if any application processes had to set the
- * partial flag. this happens when a process has tracked too many records
- * at once and cannot track new records
- */
- DARSHAN_MPI_CALL(PMPI_Reduce)(&(final_core->log_header.partial_flag),
- &tmp_partial_flag, 1, MPI_UNSIGNED_CHAR, MPI_MAX, 0, MPI_COMM_WORLD);
</span>-
<span style="color: #000000;background-color: #ffdddd">- if(internal_timing_flag)
- header1 = DARSHAN_MPI_CALL(PMPI_Wtime)();
- /* rank 0 is responsible for writing the log header */
- if(my_rank == 0)
- {
- /* initialize the remaining header fields */
- strcpy(final_core->log_header.version_string, DARSHAN_LOG_VERSION);
- final_core->log_header.magic_nr = DARSHAN_MAGIC_NR;
- final_core->log_header.comp_type = DARSHAN_ZLIB_COMP;
- final_core->log_header.partial_flag = tmp_partial_flag;
</span>-
<span style="color: #000000;background-color: #ffdddd">- all_ret = DARSHAN_MPI_CALL(PMPI_File_write_at)(log_fh, 0, &(final_core->log_header),
- sizeof(struct darshan_header), MPI_BYTE, &status);
- if(all_ret != MPI_SUCCESS)
- {
- fprintf(stderr, "darshan library warning: unable to write header to log file %s\n",
- logfile_name);
- unlink(logfile_name);
- }
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* error out if unable to write log header */
- DARSHAN_MPI_CALL(PMPI_Bcast)(&all_ret, 1, MPI_INT, 0, MPI_COMM_WORLD);
- if(all_ret != 0)
- {
- free(logfile_name);
- darshan_core_cleanup(final_core);
- return;
- }
- if(internal_timing_flag)
- header2 = DARSHAN_MPI_CALL(PMPI_Wtime)();
</span><span style="color: #000000;background-color: #ddffdd">+ final_core->mmap_job_p->end_time = time(NULL);
</span>
<span style="color: #000000;background-color: #ffdddd">- DARSHAN_MPI_CALL(PMPI_File_close)(&log_fh);
</span>-
<span style="color: #000000;background-color: #ffdddd">- /* if we got this far, there are no errors, so rename from *.darshan_partial
- * to *-<logwritetime>.darshan, which indicates that this log file is
- * complete and ready for analysis
- */
- if(my_rank == 0)
- {
- if(getenv("DARSHAN_LOGFILE"))
- {
</span>-#ifdef __DARSHAN_GROUP_READABLE_LOGS
<span style="color: #000000;background-color: #ffdddd">- chmod(logfile_name, (S_IRUSR|S_IRGRP));
</span>-#else
<span style="color: #000000;background-color: #ffdddd">- chmod(logfile_name, (S_IRUSR));
</span>-#endif
<span style="color: #000000;background-color: #ffdddd">- }
- else
- {
- char* tmp_index;
- double end_log_time;
- char* new_logfile_name;
</span>-
<span style="color: #000000;background-color: #ffdddd">- new_logfile_name = malloc(PATH_MAX);
- if(new_logfile_name)
- {
- new_logfile_name[0] = '\0';
- end_log_time = DARSHAN_MPI_CALL(PMPI_Wtime)();
- strcat(new_logfile_name, logfile_name);
- tmp_index = strstr(new_logfile_name, ".darshan_partial");
- sprintf(tmp_index, "_%d.darshan", (int)(end_log_time-start_log_time+1));
- rename(logfile_name, new_logfile_name);
- /* set permissions on log file */
</span>-#ifdef __DARSHAN_GROUP_READABLE_LOGS
<span style="color: #000000;background-color: #ffdddd">- chmod(new_logfile_name, (S_IRUSR|S_IRGRP));
</span>-#else
<span style="color: #000000;background-color: #ffdddd">- chmod(new_logfile_name, (S_IRUSR));
</span>-#endif
<span style="color: #000000;background-color: #ffdddd">- free(new_logfile_name);
- }
- }
- }
</span>-
<span style="color: #000000;background-color: #ffdddd">- free(logfile_name);
</span> darshan_core_cleanup(final_core);
if(internal_timing_flag)
{
<span style="color: #000000;background-color: #ffdddd">- double open_tm, open_slowest;
- double header_tm, header_slowest;
- double job_tm, job_slowest;
- double rec_tm, rec_slowest;
- double mod_tm[DARSHAN_MAX_MODS], mod_slowest[DARSHAN_MAX_MODS];
</span> double all_tm, all_slowest;
tm_end = DARSHAN_MPI_CALL(PMPI_Wtime)();
<span style="color: #000000;background-color: #ffdddd">- open_tm = open2 - open1;
- header_tm = header2 - header1;
- job_tm = job2 - job1;
- rec_tm = rec2 - rec1;
</span> all_tm = tm_end - start_log_time;
<span style="color: #000000;background-color: #ffdddd">- for(i = 0;i < DARSHAN_MAX_MODS; i++)
- {
- mod_tm[i] = mod2[i] - mod1[i];
- }
</span>
<span style="color: #000000;background-color: #ffdddd">- DARSHAN_MPI_CALL(PMPI_Reduce)(&open_tm, &open_slowest, 1,
- MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);
- DARSHAN_MPI_CALL(PMPI_Reduce)(&header_tm, &header_slowest, 1,
- MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);
- DARSHAN_MPI_CALL(PMPI_Reduce)(&job_tm, &job_slowest, 1,
- MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);
- DARSHAN_MPI_CALL(PMPI_Reduce)(&rec_tm, &rec_slowest, 1,
- MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);
</span> DARSHAN_MPI_CALL(PMPI_Reduce)(&all_tm, &all_slowest, 1,
MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);
<span style="color: #000000;background-color: #ffdddd">- DARSHAN_MPI_CALL(PMPI_Reduce)(mod_tm, mod_slowest, DARSHAN_MAX_MODS,
- MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);
</span>
if(my_rank == 0)
{
fprintf(stderr, "#darshan:<op>\t<nprocs>\t<time>\n");
<span style="color: #000000;background-color: #ffdddd">- fprintf(stderr, "darshan:log_open\t%d\t%f\n", nprocs, open_slowest);
- fprintf(stderr, "darshan:job_write\t%d\t%f\n", nprocs, job_slowest);
- fprintf(stderr, "darshan:hash_write\t%d\t%f\n", nprocs, rec_slowest);
- fprintf(stderr, "darshan:header_write\t%d\t%f\n", nprocs, header_slowest);
- for(i = 0; i < DARSHAN_MAX_MODS; i++)
- {
- if(global_mod_use_count[i])
- fprintf(stderr, "darshan:%s_shutdown\t%d\t%f\n", darshan_module_names[i],
- nprocs, mod_slowest[i]);
- }
</span> fprintf(stderr, "darshan:core_shutdown\t%d\t%f\n", nprocs, all_slowest);
}
}
return;
-#endif
}
/* *********************************** */
</code></pre>
<br>
</li>
<li id='diff-2'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/c3c5e59770b89b2d00aeb45a1dccbbf132a0514d#diff-2'>
<strong>
darshan-runtime/lib/darshan-posix.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-posix.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-posix.c
</span><span style="color: #aaaaaa">@@ -346,6 +346,16 @@ static void posix_shutdown(void);
</span> (__file)->file_record->counters[POSIX_STATS] += 1; \
} while(0)
<span style="color: #000000;background-color: #ddffdd">+static double psx_wrap_time = 0.0;
+
+#define PSX_PRE_WRAP() \
+ double pre_wrap = darshan_core_wtime();
+
+#define PSX_POST_WRAP() \
+ double post_wrap = darshan_core_wtime(); \
+ psx_wrap_time += (post_wrap-pre_wrap);
+
+
</span> /**********************************************************
* Wrappers for POSIX I/O functions of interest *
**********************************************************/
<span style="color: #aaaaaa">@@ -356,6 +366,8 @@ int DARSHAN_DECL(open)(const char *path, int flags, ...)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(open);
if(flags & O_CREAT)
<span style="color: #aaaaaa">@@ -381,6 +393,8 @@ int DARSHAN_DECL(open)(const char *path, int flags, ...)
</span> POSIX_RECORD_OPEN(ret, path, mode, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -390,6 +404,8 @@ int DARSHAN_DECL(open64)(const char *path, int flags, ...)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(open64);
if(flags & O_CREAT)
<span style="color: #aaaaaa">@@ -415,6 +431,8 @@ int DARSHAN_DECL(open64)(const char *path, int flags, ...)
</span> POSIX_RECORD_OPEN(ret, path, mode, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -423,6 +441,8 @@ int DARSHAN_DECL(creat)(const char* path, mode_t mode)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(creat);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -434,6 +454,8 @@ int DARSHAN_DECL(creat)(const char* path, mode_t mode)
</span> POSIX_RECORD_OPEN(ret, path, mode, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -442,6 +464,8 @@ int DARSHAN_DECL(creat64)(const char* path, mode_t mode)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(creat64);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -453,6 +477,8 @@ int DARSHAN_DECL(creat64)(const char* path, mode_t mode)
</span> POSIX_RECORD_OPEN(ret, path, mode, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -462,6 +488,8 @@ FILE* DARSHAN_DECL(fopen)(const char *path, const char *mode)
</span> int fd;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(fopen);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -478,6 +506,8 @@ FILE* DARSHAN_DECL(fopen)(const char *path, const char *mode)
</span> POSIX_RECORD_OPEN(fd, path, 0, 1, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -487,6 +517,8 @@ FILE* DARSHAN_DECL(fopen64)(const char *path, const char *mode)
</span> int fd;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(fopen64);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -503,6 +535,8 @@ FILE* DARSHAN_DECL(fopen64)(const char *path, const char *mode)
</span> POSIX_RECORD_OPEN(fd, path, 0, 1, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -511,6 +545,8 @@ int DARSHAN_DECL(mkstemp)(char* template)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(mkstemp);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -522,6 +558,8 @@ int DARSHAN_DECL(mkstemp)(char* template)
</span> POSIX_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -530,6 +568,8 @@ int DARSHAN_DECL(mkostemp)(char* template, int flags)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(mkostemp);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -541,6 +581,8 @@ int DARSHAN_DECL(mkostemp)(char* template, int flags)
</span> POSIX_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -549,6 +591,8 @@ int DARSHAN_DECL(mkstemps)(char* template, int suffixlen)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(mkstemps);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -560,6 +604,8 @@ int DARSHAN_DECL(mkstemps)(char* template, int suffixlen)
</span> POSIX_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -568,6 +614,8 @@ int DARSHAN_DECL(mkostemps)(char* template, int suffixlen, int flags)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(mkostemps);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -579,6 +627,8 @@ int DARSHAN_DECL(mkostemps)(char* template, int suffixlen, int flags)
</span> POSIX_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -588,6 +638,8 @@ ssize_t DARSHAN_DECL(read)(int fd, void *buf, size_t count)
</span> int aligned_flag = 0;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(read);
if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -601,6 +653,8 @@ ssize_t DARSHAN_DECL(read)(int fd, void *buf, size_t count)
</span> POSIX_RECORD_READ(ret, fd, 0, 0, aligned_flag, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -610,6 +664,8 @@ ssize_t DARSHAN_DECL(write)(int fd, const void *buf, size_t count)
</span> int aligned_flag = 0;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(write);
if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -623,6 +679,8 @@ ssize_t DARSHAN_DECL(write)(int fd, const void *buf, size_t count)
</span> POSIX_RECORD_WRITE(ret, fd, 0, 0, aligned_flag, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -632,6 +690,8 @@ ssize_t DARSHAN_DECL(pread)(int fd, void *buf, size_t count, off_t offset)
</span> int aligned_flag = 0;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(pread);
if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -645,6 +705,8 @@ ssize_t DARSHAN_DECL(pread)(int fd, void *buf, size_t count, off_t offset)
</span> POSIX_RECORD_READ(ret, fd, 1, offset, aligned_flag, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -654,6 +716,8 @@ ssize_t DARSHAN_DECL(pwrite)(int fd, const void *buf, size_t count, off_t offset
</span> int aligned_flag = 0;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(pwrite);
if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -667,6 +731,8 @@ ssize_t DARSHAN_DECL(pwrite)(int fd, const void *buf, size_t count, off_t offset
</span> POSIX_RECORD_WRITE(ret, fd, 1, offset, aligned_flag, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -676,6 +742,8 @@ ssize_t DARSHAN_DECL(pread64)(int fd, void *buf, size_t count, off64_t offset)
</span> int aligned_flag = 0;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(pread64);
if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -689,6 +757,8 @@ ssize_t DARSHAN_DECL(pread64)(int fd, void *buf, size_t count, off64_t offset)
</span> POSIX_RECORD_READ(ret, fd, 1, offset, aligned_flag, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -698,6 +768,8 @@ ssize_t DARSHAN_DECL(pwrite64)(int fd, const void *buf, size_t count, off64_t of
</span> int aligned_flag = 0;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(pwrite64);
if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -711,6 +783,8 @@ ssize_t DARSHAN_DECL(pwrite64)(int fd, const void *buf, size_t count, off64_t of
</span> POSIX_RECORD_WRITE(ret, fd, 1, offset, aligned_flag, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -721,6 +795,8 @@ ssize_t DARSHAN_DECL(readv)(int fd, const struct iovec *iov, int iovcnt)
</span> int i;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(readv);
for(i=0; i<iovcnt; i++)
<span style="color: #aaaaaa">@@ -738,6 +814,8 @@ ssize_t DARSHAN_DECL(readv)(int fd, const struct iovec *iov, int iovcnt)
</span> POSIX_RECORD_READ(ret, fd, 0, 0, aligned_flag, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -748,6 +826,8 @@ ssize_t DARSHAN_DECL(writev)(int fd, const struct iovec *iov, int iovcnt)
</span> int i;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(writev);
for(i=0; i<iovcnt; i++)
<span style="color: #aaaaaa">@@ -765,6 +845,8 @@ ssize_t DARSHAN_DECL(writev)(int fd, const struct iovec *iov, int iovcnt)
</span> POSIX_RECORD_WRITE(ret, fd, 0, 0, aligned_flag, 0, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -774,6 +856,8 @@ size_t DARSHAN_DECL(fread)(void *ptr, size_t size, size_t nmemb, FILE *stream)
</span> int aligned_flag = 0;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(fread);
if((unsigned long)ptr % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -796,6 +880,8 @@ size_t DARSHAN_DECL(fread)(void *ptr, size_t size, size_t nmemb, FILE *stream)
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -805,6 +891,8 @@ size_t DARSHAN_DECL(fwrite)(const void *ptr, size_t size, size_t nmemb, FILE *st
</span> int aligned_flag = 0;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(fwrite);
if((unsigned long)ptr % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -827,6 +915,8 @@ size_t DARSHAN_DECL(fwrite)(const void *ptr, size_t size, size_t nmemb, FILE *st
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -836,6 +926,8 @@ off_t DARSHAN_DECL(lseek)(int fd, off_t offset, int whence)
</span> struct posix_file_runtime* file;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(lseek);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -858,6 +950,8 @@ off_t DARSHAN_DECL(lseek)(int fd, off_t offset, int whence)
</span> POSIX_UNLOCK();
}
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -867,6 +961,8 @@ off_t DARSHAN_DECL(lseek64)(int fd, off_t offset, int whence)
</span> struct posix_file_runtime* file;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(lseek64);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -889,6 +985,8 @@ off_t DARSHAN_DECL(lseek64)(int fd, off_t offset, int whence)
</span> POSIX_UNLOCK();
}
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -898,6 +996,8 @@ int DARSHAN_DECL(fseek)(FILE *stream, long offset, int whence)
</span> struct posix_file_runtime* file;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(fseek);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -920,6 +1020,8 @@ int DARSHAN_DECL(fseek)(FILE *stream, long offset, int whence)
</span> POSIX_UNLOCK();
}
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -928,6 +1030,8 @@ int DARSHAN_DECL(__xstat)(int vers, const char *path, struct stat *buf)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(__xstat);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -942,6 +1046,8 @@ int DARSHAN_DECL(__xstat)(int vers, const char *path, struct stat *buf)
</span> POSIX_LOOKUP_RECORD_STAT(path, buf, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -950,6 +1056,8 @@ int DARSHAN_DECL(__xstat64)(int vers, const char *path, struct stat64 *buf)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(__xstat64);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -964,6 +1072,8 @@ int DARSHAN_DECL(__xstat64)(int vers, const char *path, struct stat64 *buf)
</span> POSIX_LOOKUP_RECORD_STAT(path, buf, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -972,6 +1082,8 @@ int DARSHAN_DECL(__lxstat)(int vers, const char *path, struct stat *buf)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(__lxstat);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -986,6 +1098,8 @@ int DARSHAN_DECL(__lxstat)(int vers, const char *path, struct stat *buf)
</span> POSIX_LOOKUP_RECORD_STAT(path, buf, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -994,6 +1108,8 @@ int DARSHAN_DECL(__lxstat64)(int vers, const char *path, struct stat64 *buf)
</span> int ret;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(__lxstat64);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1008,6 +1124,8 @@ int DARSHAN_DECL(__lxstat64)(int vers, const char *path, struct stat64 *buf)
</span> POSIX_LOOKUP_RECORD_STAT(path, buf, tm1, tm2);
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1017,6 +1135,8 @@ int DARSHAN_DECL(__fxstat)(int vers, int fd, struct stat *buf)
</span> struct posix_file_runtime* file;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(__fxstat);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1035,6 +1155,8 @@ int DARSHAN_DECL(__fxstat)(int vers, int fd, struct stat *buf)
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1044,6 +1166,8 @@ int DARSHAN_DECL(__fxstat64)(int vers, int fd, struct stat64 *buf)
</span> struct posix_file_runtime* file;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(__fxstat64);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1062,6 +1186,8 @@ int DARSHAN_DECL(__fxstat64)(int vers, int fd, struct stat64 *buf)
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1071,6 +1197,8 @@ void* DARSHAN_DECL(mmap)(void *addr, size_t length, int prot, int flags,
</span> void* ret;
struct posix_file_runtime* file;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(mmap);
ret = __real_mmap(addr, length, prot, flags, fd, offset);
<span style="color: #aaaaaa">@@ -1086,6 +1214,8 @@ void* DARSHAN_DECL(mmap)(void *addr, size_t length, int prot, int flags,
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1095,6 +1225,8 @@ void* DARSHAN_DECL(mmap64)(void *addr, size_t length, int prot, int flags,
</span> void* ret;
struct posix_file_runtime* file;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(mmap64);
ret = __real_mmap64(addr, length, prot, flags, fd, offset);
<span style="color: #aaaaaa">@@ -1110,6 +1242,8 @@ void* DARSHAN_DECL(mmap64)(void *addr, size_t length, int prot, int flags,
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1119,6 +1253,8 @@ int DARSHAN_DECL(fsync)(int fd)
</span> struct posix_file_runtime* file;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(fsync);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1140,6 +1276,8 @@ int DARSHAN_DECL(fsync)(int fd)
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1149,6 +1287,8 @@ int DARSHAN_DECL(fdatasync)(int fd)
</span> struct posix_file_runtime* file;
double tm1, tm2;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(fdatasync);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1170,6 +1310,8 @@ int DARSHAN_DECL(fdatasync)(int fd)
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1179,6 +1321,8 @@ int DARSHAN_DECL(close)(int fd)
</span> double tm1, tm2;
int ret;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(close);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1201,6 +1345,8 @@ int DARSHAN_DECL(close)(int fd)
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1211,6 +1357,8 @@ int DARSHAN_DECL(fclose)(FILE *fp)
</span> double tm1, tm2;
int ret;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(fclose);
tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1233,6 +1381,8 @@ int DARSHAN_DECL(fclose)(FILE *fp)
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1240,6 +1390,8 @@ int DARSHAN_DECL(aio_read)(struct aiocb *aiocbp)
</span> {
int ret;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(aio_read);
ret = __real_aio_read(aiocbp);
<span style="color: #aaaaaa">@@ -1251,6 +1403,8 @@ int DARSHAN_DECL(aio_read)(struct aiocb *aiocbp)
</span> POSIX_UNLOCK();
}
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1258,6 +1412,8 @@ int DARSHAN_DECL(aio_write)(struct aiocb *aiocbp)
</span> {
int ret;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(aio_write);
ret = __real_aio_write(aiocbp);
<span style="color: #aaaaaa">@@ -1269,6 +1425,8 @@ int DARSHAN_DECL(aio_write)(struct aiocb *aiocbp)
</span> POSIX_UNLOCK();
}
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1276,6 +1434,8 @@ int DARSHAN_DECL(aio_read64)(struct aiocb64 *aiocbp)
</span> {
int ret;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(aio_read64);
ret = __real_aio_read64(aiocbp);
<span style="color: #aaaaaa">@@ -1287,6 +1447,8 @@ int DARSHAN_DECL(aio_read64)(struct aiocb64 *aiocbp)
</span> POSIX_UNLOCK();
}
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1294,6 +1456,8 @@ int DARSHAN_DECL(aio_write64)(struct aiocb64 *aiocbp)
</span> {
int ret;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(aio_write64);
ret = __real_aio_write64(aiocbp);
<span style="color: #aaaaaa">@@ -1305,6 +1469,8 @@ int DARSHAN_DECL(aio_write64)(struct aiocb64 *aiocbp)
</span> POSIX_UNLOCK();
}
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1315,6 +1481,8 @@ ssize_t DARSHAN_DECL(aio_return)(struct aiocb *aiocbp)
</span> struct posix_aio_tracker *tmp;
int aligned_flag = 0;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(aio_return);
ret = __real_aio_return(aiocbp);
<span style="color: #aaaaaa">@@ -1343,6 +1511,8 @@ ssize_t DARSHAN_DECL(aio_return)(struct aiocb *aiocbp)
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1353,6 +1523,8 @@ ssize_t DARSHAN_DECL(aio_return64)(struct aiocb64 *aiocbp)
</span> struct posix_aio_tracker *tmp;
int aligned_flag = 0;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(aio_return64);
ret = __real_aio_return64(aiocbp);
<span style="color: #aaaaaa">@@ -1381,6 +1553,8 @@ ssize_t DARSHAN_DECL(aio_return64)(struct aiocb64 *aiocbp)
</span> }
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1390,6 +1564,8 @@ int DARSHAN_DECL(lio_listio)(int mode, struct aiocb *const aiocb_list[],
</span> int ret;
int i;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(lio_listio);
ret = __real_lio_listio(mode, aiocb_list, nitems, sevp);
<span style="color: #aaaaaa">@@ -1404,6 +1580,8 @@ int DARSHAN_DECL(lio_listio)(int mode, struct aiocb *const aiocb_list[],
</span> POSIX_UNLOCK();
}
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -1413,6 +1591,8 @@ int DARSHAN_DECL(lio_listio64)(int mode, struct aiocb64 *const aiocb_list[],
</span> int ret;
int i;
<span style="color: #000000;background-color: #ddffdd">+ PSX_PRE_WRAP();
+
</span> MAP_OR_FAIL(lio_listio64);
ret = __real_lio_listio64(mode, aiocb_list, nitems, sevp);
<span style="color: #aaaaaa">@@ -1427,6 +1607,8 @@ int DARSHAN_DECL(lio_listio64)(int mode, struct aiocb64 *const aiocb_list[],
</span> POSIX_UNLOCK();
}
<span style="color: #000000;background-color: #ddffdd">+ PSX_POST_WRAP();
+
</span> return(ret);
}
<span style="color: #aaaaaa">@@ -2054,6 +2236,8 @@ static void posix_begin_shutdown()
</span> instrumentation_disabled = 1;
POSIX_UNLOCK();
<span style="color: #000000;background-color: #ddffdd">+ fprintf(stderr, "POSIX:wrappers\t%f\n", psx_wrap_time);
+
</span> return;
}
</code></pre>
<br>
</li>
<li id='diff-3'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/c3c5e59770b89b2d00aeb45a1dccbbf132a0514d#diff-3'>
<strong>
darshan-util/Makefile.in
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-util/Makefile.in
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-util/Makefile.in
</span><span style="color: #aaaaaa">@@ -127,6 +127,19 @@ ifeq ($(DARSHAN_ENABLE_SHARED),1)
</span> install -m 755 libdarshan-util.so $(libdir)
endif
install -m 644 $(srcdir)/darshan-logutils.h $(includedir)
<span style="color: #000000;background-color: #ddffdd">+ install -m 644 $(srcdir)/darshan-posix-logutils.h $(includedir)
+ install -m 644 $(srcdir)/darshan-mpiio-logutils.h $(includedir)
+ install -m 644 $(srcdir)/darshan-hdf5-logutils.h $(includedir)
+ install -m 644 $(srcdir)/darshan-pnetcdf-logutils.h $(includedir)
+ install -m 644 $(srcdir)/darshan-bgq-logutils.h $(includedir)
+ install -m 644 $(srcdir)/../darshan-posix-log-format.h $(includedir)
+ install -m 644 $(srcdir)/../darshan-mpiio-log-format.h $(includedir)
+ install -m 644 $(srcdir)/../darshan-hdf5-log-format.h $(includedir)
+ install -m 644 $(srcdir)/../darshan-pnetcdf-log-format.h $(includedir)
+ install -m 644 $(srcdir)/../darshan-bgq-log-format.h $(includedir)
+ install -d $(includedir)/uthash-1.9.2
+ install -d $(includedir)/uthash-1.9.2/src
+ install -m 644 uthash-1.9.2/src/uthash.h $(includedir)/uthash-1.9.2/src/
</span> install -m 644 $(DARSHAN_LOG_FORMAT) $(includedir)
install -m 755 darshan-job-summary/bin/darshan-job-summary.pl $(bindir)
install -d $(libdir)/TeX
</code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/c3c5e59770b89b2d00aeb45a1dccbbf132a0514d">View it on GitLab</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://xgitlab.cels.anl.gov/darshan/darshan/commit/c3c5e59770b89b2d00aeb45a1dccbbf132a0514d"}}</script>
</p>
</div>
</body>
</html>