[Darshan-commits] [Git][darshan/darshan][autoperf-mod-update] cleanup autoconf for autoperf

Shane Snyder xgitlab at cels.anl.gov
Thu Mar 11 19:09:27 CST 2021



Shane Snyder pushed to branch autoperf-mod-update at darshan / darshan


Commits:
4411f79c by Shane Snyder at 2021-03-12T01:08:26+00:00
cleanup autoconf for autoperf

- - - - -


4 changed files:

- darshan-log-format.h
- darshan-runtime/Makefile.in
- darshan-runtime/configure.in
- darshan-runtime/lib/darshan-core.c


Changes:

=====================================
darshan-log-format.h
=====================================
@@ -120,10 +120,10 @@ struct darshan_base_record
 /* DXT */
 #include "darshan-dxt-log-format.h"
 #include "darshan-mdhim-log-format.h"
-#ifdef DARSHAN_USE_APXC
+#ifdef BUILD_APXC_MODULE
 #include "darshan-apxc-log-format.h"
 #endif
-#ifdef DARSHAN_USE_APMPI
+#ifdef BUILD_APMPI_MODULE
 #include "darshan-apmpi-log-format.h"
 #endif
 
@@ -141,14 +141,14 @@ struct darshan_base_record
 /* NOTE: if APXC support is not enabled, we still want to hold it's spot
  * in the module id space
  */
-#ifdef DARSHAN_USE_APXC
+#ifdef BUILD_APXC_MODULE
 #define __APXC_VER APXC_VER
 #define __apxc_logutils &apxc_logutils
 #else
 #define __APXC_VER 0
 #define __apxc_logutils NULL
 #endif
-#ifdef DARSHAN_USE_APMPI
+#ifdef BUILD_APMPI_MODULE
 #define __APMPI_VER APMPI_VER
 #define __apmpi_logutils &apmpi_logutils
 #else


=====================================
darshan-runtime/Makefile.in
=====================================
@@ -16,8 +16,8 @@ LD = @LD@
 DISABLE_STATIC_LIB = @DISABLE_STATIC_LIB@
 DISABLE_LDPRELOAD = @DISABLE_LDPRELOAD@
 ENABLE_MMAP_LOGS = @ENABLE_MMAP_LOGS@
-DARSHAN_USE_APXC = @DARSHAN_USE_APXC@
-DARSHAN_USE_APMPI = @DARSHAN_USE_APMPI@
+BUILD_APXC_MODULE = @BUILD_APXC_MODULE@
+BUILD_APMPI_MODULE = @BUILD_APMPI_MODULE@
 DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h
 DARSHAN_VERSION = @DARSHAN_VERSION@
 
@@ -107,10 +107,10 @@ CFLAGS += -DDARSHAN_MDHIM
 CFLAGS_SHARED += -DDARSHAN_MDHIM
 endif
 
-ifdef DARSHAN_USE_APXC
+ifdef BUILD_APXC_MODULE
 include $(srcdir)/../modules/autoperf/apxc/Makefile.darshan
 endif
-ifdef DARSHAN_USE_APMPI
+ifdef BUILD_APMPI_MODULE
 include $(srcdir)/../modules/autoperf/apmpi/Makefile.darshan
 endif
 


=====================================
darshan-runtime/configure.in
=====================================
@@ -221,13 +221,22 @@ AS_IF([test "x$enable_mpiio_mod" = "xno" || test "x$ENABLE_MPI" = "x"],
       DARSHAN_MPIIO_LD_OPTS=)
 
 # AUTOPERF MPI module
-BUILD_APMPI_MODULE=1
-AUTOPERF_APMPI_LD_OPTS="@${darshan_share_path}/ld-opts/autoperf-apmpi-ld-opts"
-AC_ARG_ENABLE(autoperf-apmpi,
-              AS_HELP_STRING([--disable-autoperf-apmpi], [Disables compilation and use of AUTOPERF MPI module (requires MPI)]))
-AS_IF([test "x$enable_autoperf_apmpi" = "xno" || test "x$ENABLE_MPI" = "x"],
-      BUILD_APMPI_MODULE=
-      AUTOPERF_APMPI_LD_OPTS=)
+BUILD_APMPI_MODULE=
+AUTOPERF_APMPI_LD_OPTS=
+AC_ARG_ENABLE(apmpi-mod,
+              AS_HELP_STRING([--enable-apmpi-mod], [Enables compilation and use of AUTOPERF MPI module (requires MPI)]))
+AS_IF([test "x$enable_apmpi_mod" = "xyes"],
+    AS_IF([test "x$ENABLE_MPI" = "x"],
+        [AC_MSG_ERROR(Autoperf MPI module requires MPI support)]
+    )
+    abssrcdir=$(readlink -f ${srcdir})
+    AC_CHECK_HEADER([${abssrcdir}/../modules/autoperf/apmpi/darshan-apmpi-log-format.h],
+                    [],
+                    [AC_MSG_ERROR([The Autoperf MPI module is not present])],
+                    [-]) # this last part tells it to only check for presence
+    BUILD_APMPI_MODULE=1
+    AUTOPERF_APMPI_LD_OPTS="@${darshan_share_path}/ld-opts/autoperf-apmpi-ld-opts"
+)
 
 AC_ARG_ENABLE(apmpi-coll-sync,
 [  --enable-apmpi-coll-sync
@@ -238,10 +247,25 @@ fi]
 ,)
 
 #AUTOPERF APXC module
-AC_ARG_ENABLE(autoperf-apxc,
-              AS_HELP_STRING([--disable-autoperf-apxc], [Disables compilation and use of AUTOPERF APXC module (requires MPI)]))
-AS_IF([test "x$enable_autoperf_apxc" = "xno" || test "x$ENABLE_MPI" = "x"],
-      )
+BUILD_APXC_MODULE=
+AC_ARG_ENABLE(apxc-mod,
+              AS_HELP_STRING([--enable-apxc-mod], [Enables compilation and use of AUTOPERF APXC module (requires MPI)])
+)
+AS_IF([test "x$enable_apxc_mod" = "xyes"],
+    AS_IF([test "x$ENABLE_MPI" = "x"],
+        [AC_MSG_ERROR(Autoperf XC module requires MPI support)]
+    )
+    abssrcdir=$(readlink -f ${srcdir})
+    AC_CHECK_HEADER([papi.h],
+                    [with_papi=-lpapi],
+                    [AC_MSG_ERROR([Cannot find papi header required for Autoperf XC module])],
+                    [])
+    AC_CHECK_HEADER([${abssrcdir}/../modules/autoperf/apxc/darshan-apxc-log-format.h],
+                    [],
+                    [AC_MSG_ERROR([The Autoperf XC git submodule is not present])],
+                    [-]) # this last part tells it to only check for presence
+    BUILD_APXC_MODULE=1
+)
 
 # HDF5 module (disabled by default)
 BUILD_HDF5_MODULE=
@@ -336,30 +360,6 @@ AS_IF([test "x$enable_mdhim" = "xyes"],
 
       )
 
-if test x$enable_autoperf_apxc = xyes; then
-    abssrcdir=$(readlink -f ${srcdir})
-    AC_CHECK_HEADER([papi.h],
-                    with_papi=-lpapi,
-                    [AC_MSG_ERROR([Cannot find required header for papi])],
-                    [])
-    AC_CHECK_HEADER([${abssrcdir}/../modules/autoperf/apxc/darshan-apxc-log-format.h],
-                    DARSHAN_USE_APXC=1,
-                    [AC_MSG_ERROR([The autoperf apxc module is not present])],
-                    [-]) # this last part tells it to only check for presence
-fi
-
-if test x$enable_autoperf_apmpi = xyes; then
-    abssrcdir=$(readlink -f ${srcdir})
-    AC_CHECK_HEADER([papi.h],
-                    with_papi=-lpapi,
-                    [AC_MSG_ERROR([Cannot find required header for papi])],
-                    [])
-    AC_CHECK_HEADER([${abssrcdir}/../modules/autoperf/apmpi/darshan-apmpi-log-format.h],
-                    DARSHAN_USE_APMPI=1,
-                    [AC_MSG_ERROR([The autoperf apmpi module is not present])],
-                    [-]) # this last part tells it to only check for presence
-fi
-
 dnl sanity check some config parameters
 if test x$GOT_LOG_PATH != x1; then
     AC_MSG_ERROR(must provide --with-log-path=<path> _or_ --with-log-path-by-env=<variable list> argument to configure.)
@@ -571,8 +571,7 @@ AC_SUBST(BUILD_MPIIO_MODULE)
 AC_SUBST(DARSHAN_MPIIO_LD_OPTS)
 AC_SUBST(BUILD_PNETCDF_MODULE)
 AC_SUBST(DARSHAN_PNETCDF_LD_OPTS)
-AC_SUBST(DARSHAN_USE_APXC)
-AC_SUBST(DARSHAN_USE_APMPI)
+AC_SUBST(BUILD_APXC_MODULE)
 AC_SUBST(BUILD_APMPI_MODULE)
 AC_SUBST(AUTOPERF_APMPI_LD_OPTS)
 AC_SUBST(BUILD_HDF5_MODULE)
@@ -616,5 +615,5 @@ AS_IF([test "x$BUILD_PNETCDF_MODULE" = "x"], [AC_MSG_NOTICE(PnetCDF module suppo
 AS_IF([test "x$BUILD_BGQ_MODULE" = "x"],     [AC_MSG_NOTICE(BG/Q module support:    no)], [AC_MSG_NOTICE(BG/Q module support:    yes)])
 AS_IF([test "x$BUILD_LUSTRE_MODULE" = "x"],  [AC_MSG_NOTICE(Lustre module support:  no)], [AC_MSG_NOTICE(Lustre module support:  yes)])
 AS_IF([test "x$BUILD_MDHIM_MODULE" = "x"],   [AC_MSG_NOTICE(MDHIM module support:   no)], [AC_MSG_NOTICE(MDHIM module support:   yes)])
-AS_IF([test "x$DARSHAN_USE_APXC" = "x"],   [AC_MSG_NOTICE(AUTOPERF APXC module support:   no)], [AC_MSG_NOTICE(AUTOPERF APXC module support:   yes)])
-AS_IF([test "x$DARSHAN_USE_APMPI" = "x"],   [AC_MSG_NOTICE(AUTOPERF MPI module support:   no)], [AC_MSG_NOTICE(AUTOPERF MPI module support:   yes)])
+AS_IF([test "x$BUILD_APXC_MODULE" = "x"],   [AC_MSG_NOTICE(AUTOPERF APXC module support:   no)], [AC_MSG_NOTICE(AUTOPERF APXC module support:   yes)])
+AS_IF([test "x$BUILD_APMPI_MODULE" = "x"],   [AC_MSG_NOTICE(AUTOPERF MPI module support:   no)], [AC_MSG_NOTICE(AUTOPERF MPI module support:   yes)])


=====================================
darshan-runtime/lib/darshan-core.c
=====================================
@@ -89,10 +89,10 @@ char** user_darshan_path_exclusions = NULL;
 extern void bgq_runtime_initialize();
 #endif
 
-#ifdef DARSHAN_USE_APXC
+#ifdef BUILD_APXC_MODULE
 extern void apxc_runtime_initialize();
 #endif
-#ifdef DARSHAN_USE_APMPI
+#ifdef BUILD_APMPI_MODULE
 extern void apmpi_runtime_initialize();
 #endif
 
@@ -104,10 +104,10 @@ void (*mod_static_init_fns[])(void) =
 #ifdef DARSHAN_BGQ
     &bgq_runtime_initialize,
 #endif
-#ifdef DARSHAN_USE_APXC
+#ifdef BUILD_APXC_MODULE
     &apxc_runtime_initialize,
 #endif
-#ifdef DARSHAN_USE_APMPI
+#ifdef BUILD_APMPI_MODULE
     &apmpi_runtime_initialize,
 #endif
     NULL



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/commit/4411f79cd0e26c21beb1cc988b490940b01dd098

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/commit/4411f79cd0e26c21beb1cc988b490940b01dd098
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/20210311/df4d7da7/attachment-0001.html>


More information about the Darshan-commits mailing list