[Darshan-commits] [Git][darshan/darshan][no-mpi] 2 commits: rename DARSHAN_NOMPI to DARSHAN_ENABLE_NONMPI

Glenn K. Lockwood xgitlab at cels.anl.gov
Wed Nov 28 13:43:50 CST 2018


Glenn K. Lockwood pushed to branch no-mpi at darshan / darshan


Commits:
6a8e4062 by Glenn K. Lockwood at 2018-11-28T19:41:34Z
rename DARSHAN_NOMPI to DARSHAN_ENABLE_NONMPI

- - - - -
480799bd by Glenn K. Lockwood at 2018-11-28T19:42:53Z
remove signal handler and atexit options

- - - - -


3 changed files:

- darshan-runtime/darshan-core.h
- darshan-runtime/lib/darshan-core-init-finalize.c
- darshan-runtime/lib/darshan-core.c


Changes:

=====================================
darshan-runtime/darshan-core.h
=====================================
@@ -35,7 +35,7 @@
 #define DARSHAN_MMAP_LOG_PATH_OVERRIDE "DARSHAN_MMAP_LOGPATH"
 
 /* Environment variable to enable profiling without MPI */
-#define DARSHAN_NO_MPI "DARSHAN_NOMPI"
+#define DARSHAN_ENABLE_NONMPI "DARSHAN_ENABLE_NONMPI"
 
 /* default path for storing mmap log files is '/tmp' */
 #define DARSHAN_DEF_MMAP_LOG_PATH "/tmp"


=====================================
darshan-runtime/lib/darshan-core-init-finalize.c
=====================================
@@ -93,7 +93,7 @@ DARSHAN_WRAPPER_MAP(PMPI_Finalize, int, (void), MPI_Finalize())
 __attribute__((constructor)) void serial_init(void)
 {
     char *no_mpi;
-    no_mpi = getenv(DARSHAN_NO_MPI);
+    no_mpi = getenv(DARSHAN_ENABLE_NONMPI);
     if (no_mpi)
         darshan_core_initialize(0, NULL);
     return;
@@ -102,7 +102,7 @@ __attribute__((constructor)) void serial_init(void)
 __attribute__((destructor)) void serial_finalize(void)
 {
     char *no_mpi;
-    no_mpi = getenv(DARSHAN_NO_MPI);
+    no_mpi = getenv(DARSHAN_ENABLE_NONMPI);
     if (no_mpi)
         darshan_core_shutdown();
     return;


=====================================
darshan-runtime/lib/darshan-core.c
=====================================
@@ -156,14 +156,6 @@ static void darshan_sig_handler(int sig);
 
 /* *********************************** */
 
-#ifdef __DARSHAN_ATEXIT_HANDLER
-void darshan_atexit_handler(void)
-{
-    darshan_core_shutdown();
-    return;
-}
-#endif
-
 void darshan_core_initialize(int argc, char **argv)
 {
     struct darshan_core_runtime *init_core = NULL;
@@ -341,29 +333,6 @@ void darshan_core_initialize(int argc, char **argv)
                 i++;
             }
         }
-#ifdef __DARSHAN_ATEXIT_HANDLER
-        /* if we've made it this far, go ahead and install the exit handlers
-        */
-        if (!using_mpi)
-        {
-            ret = atexit(darshan_atexit_handler);
-            if (ret != 0)
-                fprintf(stderr, "atexit handler could not be installed\n");
-            else
-                fprintf(stderr, "atexit handler is installed\n");
-        }
-#endif
-
-#ifdef __DARSHAN_SIGNAL_HANDLER
-        /* install signal handlers to produce something on a soft abort
-         * may be risky business though--if the core is locked when a signal is
-         * trapped, we rely on recursive mutexes sorting themselves out to
-         * prevent a deadlock.  not necessarily worth biting off at this point.
-         */
-        signal(SIGXCPU, darshan_sig_handler);
-        signal(SIGTERM, darshan_sig_handler);
-        signal(SIGABRT, darshan_sig_handler);
-#endif
     }
 
     if(internal_timing_flag)
@@ -1905,15 +1874,6 @@ static void darshan_core_cleanup(struct darshan_core_runtime* core)
     return;
 }
 
-#ifdef __DARSHAN_SIGNAL_HANDLER
-static void darshan_sig_handler(int sig)
-{
-    if (sig == SIGTERM || sig == SIGXCPU || sig == SIGABRT)
-        darshan_core_shutdown();
-    return;
-}
-#endif
-
 /* crude benchmarking hook into darshan-core to benchmark Darshan
  * shutdown overhead using a variety of application I/O workloads
  */



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/df9d5388f806275b7f51b5f2f60e2298c5262c63...480799bdf252d1693d3b165bc92bb16c28b87b5d

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/df9d5388f806275b7f51b5f2f60e2298c5262c63...480799bdf252d1693d3b165bc92bb16c28b87b5d
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/20181128/6a6ba995/attachment-0001.html>


More information about the Darshan-commits mailing list