[Darshan-commits] [Git][darshan/darshan][dev-detailed-hdf5-mod] 3 commits: don't pass __iso99_fscanf ld-opts in all cases

Shane Snyder xgitlab at cels.anl.gov
Wed Apr 8 13:22:45 CDT 2020



Shane Snyder pushed to branch dev-detailed-hdf5-mod at darshan / darshan


Commits:
4884c119 by Shane Snyder at 2020-04-07T09:06:44-05:00
don't pass __iso99_fscanf ld-opts in all cases

- - - - -
3e336689 by Shane Snyder at 2020-04-07T09:14:50-05:00
Merge branch 'dev-fscanf-wrapper-fix' into dev-detailed-hdf5-mod

- - - - -
e1832e4d by Shane Snyder at 2020-04-08T09:50:39-05:00
don't forget DARSHAN_DECLs in hdf5 mod

- - - - -


5 changed files:

- darshan-runtime/Makefile.in
- darshan-runtime/configure
- darshan-runtime/configure.in
- darshan-runtime/lib/darshan-hdf5.c
- darshan-runtime/share/ld-opts/darshan-stdio-ld-opts → darshan-runtime/share/ld-opts/darshan-stdio-ld-opts.in


Changes:

=====================================
darshan-runtime/Makefile.in
=====================================
@@ -251,7 +251,7 @@ ifdef BUILD_POSIX_MODULE
 	install -m 644 $(srcdir)/share/ld-opts/darshan-posix-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-posix-ld-opts
 endif
 ifdef BUILD_STDIO_MODULE
-	install -m 644 $(srcdir)/share/ld-opts/darshan-stdio-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-stdio-ld-opts
+	install -m 644 share/ld-opts/darshan-stdio-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-stdio-ld-opts
 endif
 ifdef BUILD_MPIIO_MODULE
 	install -m 644 $(srcdir)/share/ld-opts/darshan-mpiio-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-mpiio-ld-opts


=====================================
darshan-runtime/configure
=====================================
@@ -632,6 +632,7 @@ BUILD_PNETCDF_MODULE
 DARSHAN_MPIIO_LD_OPTS
 BUILD_MPIIO_MODULE
 BUILD_DXT_MODULE
+DARSHAN_STDIO_ADD_FSCANF_LD_OPTS
 DARSHAN_STDIO_LD_OPTS
 BUILD_STDIO_MODULE
 DARSHAN_POSIX_LD_OPTS
@@ -4827,12 +4828,14 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+    DARSHAN_STDIO_ADD_FSCANF_LD_OPTS="--wrap=__isoc99_fscanf"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 $as_echo "#define HAVE_FSCANF_REDIRECT 1" >>confdefs.h
 
+    DARSHAN_STDIO_ADD_FSCANF_LD_OPTS=""
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -4864,7 +4867,8 @@ DARSHAN_VERSION="3.2.0-pre1"
 
 
 
-ac_config_files="$ac_config_files Makefile darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf share/mpi-profile/darshan-cc-static.conf share/mpi-profile/darshan-cxx-static.conf share/mpi-profile/darshan-f-static.conf share/ld-opts/darshan-base-ld-opts"
+
+ac_config_files="$ac_config_files Makefile darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf share/mpi-profile/darshan-cc-static.conf share/mpi-profile/darshan-cxx-static.conf share/mpi-profile/darshan-f-static.conf share/ld-opts/darshan-base-ld-opts share/ld-opts/darshan-stdio-ld-opts"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -5575,6 +5579,7 @@ do
     "share/mpi-profile/darshan-cxx-static.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-cxx-static.conf" ;;
     "share/mpi-profile/darshan-f-static.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-f-static.conf" ;;
     "share/ld-opts/darshan-base-ld-opts") CONFIG_FILES="$CONFIG_FILES share/ld-opts/darshan-base-ld-opts" ;;
+    "share/ld-opts/darshan-stdio-ld-opts") CONFIG_FILES="$CONFIG_FILES share/ld-opts/darshan-stdio-ld-opts" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac


=====================================
darshan-runtime/configure.in
=====================================
@@ -465,9 +465,11 @@ AC_TRY_COMPILE(
     int __isoc99_fscanf(FILE *stream, const char *format, ...) {return(0);}
     ],
     [],
-    AC_MSG_RESULT(no),
+    AC_MSG_RESULT(no)
+    DARSHAN_STDIO_ADD_FSCANF_LD_OPTS="--wrap=__isoc99_fscanf",
     AC_MSG_RESULT(yes)
     AC_DEFINE(HAVE_FSCANF_REDIRECT, 1, Define if fscanf is redirected to another function)
+    DARSHAN_STDIO_ADD_FSCANF_LD_OPTS=""
 )
 
 
@@ -486,6 +488,7 @@ AC_SUBST(BUILD_POSIX_MODULE)
 AC_SUBST(DARSHAN_POSIX_LD_OPTS)
 AC_SUBST(BUILD_STDIO_MODULE)
 AC_SUBST(DARSHAN_STDIO_LD_OPTS)
+AC_SUBST(DARSHAN_STDIO_ADD_FSCANF_LD_OPTS)
 AC_SUBST(BUILD_DXT_MODULE)
 AC_SUBST(BUILD_MPIIO_MODULE)
 AC_SUBST(DARSHAN_MPIIO_LD_OPTS)
@@ -513,6 +516,7 @@ share/mpi-profile/darshan-cc-static.conf
 share/mpi-profile/darshan-cxx-static.conf
 share/mpi-profile/darshan-f-static.conf
 share/ld-opts/darshan-base-ld-opts
+share/ld-opts/darshan-stdio-ld-opts
 )
 
 msg="Building Darshan with CC=$CC and with the following features:"


=====================================
darshan-runtime/lib/darshan-hdf5.c
=====================================
@@ -252,7 +252,7 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
 
 }
 
-herr_t H5Fflush(hid_t object_id, H5F_scope_t scope)
+herr_t DARSHAN_DECL(H5Fflush)(hid_t object_id, H5F_scope_t scope)
 {
     struct hdf5_file_record_ref *rec_ref;
     hid_t file_id;
@@ -404,7 +404,7 @@ herr_t DARSHAN_DECL(H5Fclose)(hid_t file_id)
     darshan_add_record_ref(&(hdf5_dataset_runtime->hid_hash), &__ret, sizeof(hid_t), __rec_ref); \
 } while(0)
 
-hid_t H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t dcpl_id)
+hid_t DARSHAN_DECL(H5Dcreate1)(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t dcpl_id)
 {
     double tm1, tm2;
     hid_t ret;
@@ -425,7 +425,7 @@ hid_t H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
     return(ret);
 }
 
-hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t dtype_id, hid_t space_id,
+hid_t DARSHAN_DECL(H5Dcreate2)(hid_t loc_id, const char *name, hid_t dtype_id, hid_t space_id,
     hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id)
 {
     double tm1, tm2;
@@ -447,7 +447,7 @@ hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t dtype_id, hid_t space_id,
     return(ret);
 }
 
-hid_t H5Dopen1(hid_t loc_id, const char *name)
+hid_t DARSHAN_DECL(H5Dopen1)(hid_t loc_id, const char *name)
 {
     hid_t dtype_id;
     hid_t space_id;
@@ -493,7 +493,7 @@ hid_t H5Dopen1(hid_t loc_id, const char *name)
     return(ret);
 }
 
-hid_t H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id)
+hid_t DARSHAN_DECL(H5Dopen2)(hid_t loc_id, const char *name, hid_t dapl_id)
 {
     hid_t dtype_id;
     hid_t space_id;
@@ -539,7 +539,7 @@ hid_t H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id)
     return(ret);
 }
 
-herr_t H5Dread(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id,
+herr_t DARSHAN_DECL(H5Dread)(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id,
     hid_t file_space_id, hid_t xfer_plist_id, void * buf)
 {
     struct hdf5_dataset_record_ref *rec_ref;
@@ -658,7 +658,7 @@ herr_t H5Dread(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id,
     return(ret);
 }
 
-herr_t H5Dwrite(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id,
+herr_t DARSHAN_DECL(H5Dwrite)(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id,
     hid_t file_space_id, hid_t xfer_plist_id, const void * buf)
 {
     struct hdf5_dataset_record_ref *rec_ref;
@@ -777,7 +777,7 @@ herr_t H5Dwrite(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id,
     return(ret);
 }
 
-herr_t H5Dflush(hid_t dataset_id)
+herr_t DARSHAN_DECL(H5Dflush)(hid_t dataset_id)
 {
     struct hdf5_dataset_record_ref *rec_ref;
     double tm1, tm2;
@@ -807,7 +807,7 @@ herr_t H5Dflush(hid_t dataset_id)
     return(ret);
 }
 
-herr_t H5Dclose(hid_t dataset_id)
+herr_t DARSHAN_DECL(H5Dclose)(hid_t dataset_id)
 {
     struct hdf5_dataset_record_ref *rec_ref;
     double tm1, tm2;


=====================================
darshan-runtime/share/ld-opts/darshan-stdio-ld-opts → darshan-runtime/share/ld-opts/darshan-stdio-ld-opts.in
=====================================
@@ -27,5 +27,5 @@
 --wrap=fsetpos
 --wrap=fsetpos64
 --wrap=rewind
---wrap=__isoc99_fscanf
 --wrap=printf
+ at DARSHAN_STDIO_ADD_FSCANF_LD_OPTS@



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/205066ba5f2eb53613d9f925dbb6bc4804746bf7...e1832e4d504621c1ed7ccad5689be34263eaafb5

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/205066ba5f2eb53613d9f925dbb6bc4804746bf7...e1832e4d504621c1ed7ccad5689be34263eaafb5
You're receiving this email because of your account on xgitlab.cels.anl.gov.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20200408/2ff22d1d/attachment-0001.html>


More information about the Darshan-commits mailing list