[Darshan-commits] [Darshan] branch, master, updated. 9b5c82c3fb8beb74fe4e3cc06a9be93e99273f33

Service Account git at mcs.anl.gov
Fri Oct 24 13:48:42 CDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".

The branch, master has been updated
       via  9b5c82c3fb8beb74fe4e3cc06a9be93e99273f33 (commit)
      from  cbc0323ace90320d137850792db0114a008042a3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9b5c82c3fb8beb74fe4e3cc06a9be93e99273f33
Author: Phil Carns <carns at mcs.anl.gov>
Date:   Fri Oct 24 14:48:25 2014 -0400

    add wrappers for mkstemp() functions
    
    fixes #147

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |    1 +
 darshan-runtime/configure                          |    2 +-
 darshan-runtime/configure.in                       |    2 +-
 darshan-runtime/lib/darshan-posix.c                |   78 ++++++++++++++++++++
 .../lib/pkgconfig/darshan-runtime.pc.in            |    2 +-
 darshan-runtime/share/craype-1.x/darshan-module.in |    2 +-
 6 files changed, 83 insertions(+), 4 deletions(-)


Diff of changes:
diff --git a/ChangeLog b/ChangeLog
index 0c757ab..32dfabe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ Darshan Release Change Log
 
 darshan-2.3.1-pre1
 =============
+* Add wrappers for mkstemp(), mkostemp(), mkstemps(), and mkostemps()
 * Change OPEN_TIMESTAMP field to report timestamp right before open() is
   invoked rather than after timestamp after open is completed
 * Change start_time and end_time fields in job record to use min and max
diff --git a/darshan-runtime/configure b/darshan-runtime/configure
index 53b5972..3b2e305 100755
--- a/darshan-runtime/configure
+++ b/darshan-runtime/configure
@@ -4167,7 +4167,7 @@ done
 
 
 # libc functions wrapped by darshan
-CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64"
+CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64,-wrap,mkstemp,-wrap,mkostemp,-wrap,mkstemps,-wrap,mkostemps"
 
 # ,-u,__wrap___fxstat64,-u,pthread_mutex_lock,-u,pthread_mutex_unlock
 
diff --git a/darshan-runtime/configure.in b/darshan-runtime/configure.in
index 8515994..13041c7 100644
--- a/darshan-runtime/configure.in
+++ b/darshan-runtime/configure.in
@@ -188,7 +188,7 @@ CFLAGS="$old_cflags"
 AC_CHECK_HEADERS(mntent.h sys/mount.h)
 
 # libc functions wrapped by darshan
-CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64"
+CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64,-wrap,mkstemp,-wrap,mkostemp,-wrap,mkstemps,-wrap,mkostemps"
 
 # ,-u,__wrap___fxstat64,-u,pthread_mutex_lock,-u,pthread_mutex_unlock
 
diff --git a/darshan-runtime/lib/darshan-posix.c b/darshan-runtime/lib/darshan-posix.c
index 82a8ce0..1556cc4 100644
--- a/darshan-runtime/lib/darshan-posix.c
+++ b/darshan-runtime/lib/darshan-posix.c
@@ -73,6 +73,10 @@ extern double (*__real_PMPI_Wtime)(void);
 
 #endif
 
+DARSHAN_FORWARD_DECL(mkstemp, int, (char *template));
+DARSHAN_FORWARD_DECL(mkostemp, int, (char *template, int flags));
+DARSHAN_FORWARD_DECL(mkstemps, int, (char *template, int suffixlen));
+DARSHAN_FORWARD_DECL(mkostemps, int, (char *template, int suffixlen, int flags));
 DARSHAN_FORWARD_DECL(creat, int, (const char* path, mode_t mode));
 DARSHAN_FORWARD_DECL(creat64, int, (const char* path, mode_t mode));
 DARSHAN_FORWARD_DECL(open, int, (const char *path, int flags, ...));
@@ -505,6 +509,80 @@ int DARSHAN_DECL(creat)(const char* path, mode_t mode)
     return(ret);
 }
 
+int DARSHAN_DECL(mkstemp)(char* template)
+{
+    int ret;
+    double tm1, tm2;
+
+    MAP_OR_FAIL(mkstemp);
+
+    tm1 = darshan_wtime();
+    ret = __real_mkstemp(template);
+    tm2 = darshan_wtime();
+
+    CP_LOCK();
+    CP_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
+    CP_UNLOCK();
+
+    return(ret);
+}
+
+int DARSHAN_DECL(mkostemp)(char* template, int flags)
+{
+    int ret;
+    double tm1, tm2;
+
+    MAP_OR_FAIL(mkostemp);
+
+    tm1 = darshan_wtime();
+    ret = __real_mkostemp(template, flags);
+    tm2 = darshan_wtime();
+
+    CP_LOCK();
+    CP_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
+    CP_UNLOCK();
+
+    return(ret);
+}
+
+
+int DARSHAN_DECL(mkstemps)(char* template, int suffixlen)
+{
+    int ret;
+    double tm1, tm2;
+
+    MAP_OR_FAIL(mkstemps);
+
+    tm1 = darshan_wtime();
+    ret = __real_mkstemps(template, suffixlen);
+    tm2 = darshan_wtime();
+
+    CP_LOCK();
+    CP_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
+    CP_UNLOCK();
+
+    return(ret);
+}
+
+
+int DARSHAN_DECL(mkostemps)(char* template, int suffixlen, int flags)
+{
+    int ret;
+    double tm1, tm2;
+
+    MAP_OR_FAIL(mkostemps);
+
+    tm1 = darshan_wtime();
+    ret = __real_mkostemps(template, suffixlen, flags);
+    tm2 = darshan_wtime();
+
+    CP_LOCK();
+    CP_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
+    CP_UNLOCK();
+
+    return(ret);
+}
+
 int DARSHAN_DECL(creat64)(const char* path, mode_t mode)
 {
     int ret;
diff --git a/darshan-runtime/lib/pkgconfig/darshan-runtime.pc.in b/darshan-runtime/lib/pkgconfig/darshan-runtime.pc.in
index d4d1a6c..7cbef13 100644
--- a/darshan-runtime/lib/pkgconfig/darshan-runtime.pc.in
+++ b/darshan-runtime/lib/pkgconfig/darshan-runtime.pc.in
@@ -11,7 +11,7 @@ Requires.private:
 darshan_prefix=@prefix@
 darshan_includedir=
 darshan_libdir= -L${darshan_prefix}/lib
-darshan_linkopts="-Wl,-u,MPI_Init,-u,MPI_Wtime,-u,__wrap_H5Fcreate,-u,__wrap_ncmpi_create,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64"
+darshan_linkopts="-Wl,-u,MPI_Init,-u,MPI_Wtime,-u,__wrap_H5Fcreate,-u,__wrap_ncmpi_create,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64,-wrap,mkstemp,-wrap,mkostemp,-wrap,mkstemps,-wrap,mkostemps"
 
 Cflags:
 Libs: ${darshan_linkopts} ${darshan_libdir} -lfmpich -lmpichcxx -ldarshan-mpi-io -ldarshan-posix -ldarshan-stubs
diff --git a/darshan-runtime/share/craype-1.x/darshan-module.in b/darshan-runtime/share/craype-1.x/darshan-module.in
index c58fff7..6915b7b 100644
--- a/darshan-runtime/share/craype-1.x/darshan-module.in
+++ b/darshan-runtime/share/craype-1.x/darshan-module.in
@@ -55,7 +55,7 @@ prepend-path CRAY_LD_LIBRARY_PATH           $root/lib
 
 
 # initial link options for Darshan
-setenv DARSHAN_POST_LINK_OPTS " -L$root/lib -ldarshan-mpi-io -lz -Wl,-u,__wrap_fopen,-u,MPI_Init,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64  -lfmpich -lmpichcxx -ldarshan-posix -ldarshan-mpi-io -lz "
+setenv DARSHAN_POST_LINK_OPTS " -L$root/lib -ldarshan-mpi-io -lz -Wl,-u,__wrap_fopen,-u,MPI_Init,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64,-wrap,mkstemp,-wrap,mkostemp,-wrap,mkstemps,-wrap,mkostemps  -lfmpich -lmpichcxx -ldarshan-posix -ldarshan-mpi-io -lz "
 
 # Add Darshan to the PE_PRODUCT_LIST variable.  This will cause the
 # compiler scripts to insert DARSHAN_POST_LINK_OPTS into the link command


hooks/post-receive
--



More information about the Darshan-commits mailing list