[Darshan-commits] [Darshan] branch, dev-modular, updated. darshan-2.3.1-58-g5e00d1c

Service Account git at mcs.anl.gov
Mon Mar 23 12:45:33 CDT 2015


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, dev-modular has been updated
       via  5e00d1cff81afd94d1705df7bb3a8d8effc4e368 (commit)
      from  2a6ab02671323b9911f910ca3b257b2fc300fe94 (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 5e00d1cff81afd94d1705df7bb3a8d8effc4e368
Author: Shane Snyder <ssnyder at mcs.anl.gov>
Date:   Mon Mar 23 12:45:08 2015 -0500

    bug in darshan init for fortran programs

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

Summary of changes:
 darshan-runtime/lib/darshan-core.c |   30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)


Diff of changes:
diff --git a/darshan-runtime/lib/darshan-core.c b/darshan-runtime/lib/darshan-core.c
index ac1d94a..a415882 100644
--- a/darshan-runtime/lib/darshan-core.c
+++ b/darshan-runtime/lib/darshan-core.c
@@ -54,7 +54,7 @@ static int mnt_data_count = 0;
 
 /* prototypes for internal helper functions */
 static void darshan_core_initialize(
-    int *argc, char ***argv);
+    int argc, char **argv);
 static void darshan_core_shutdown(
     void);
 static void darshan_core_cleanup(
@@ -93,7 +93,15 @@ int MPI_Init(int *argc, char ***argv)
         return(ret);
     }
 
-    darshan_core_initialize(argc, argv);
+    if(argc && argv)
+    {
+        darshan_core_initialize(*argc, *argv);
+    }
+    else
+    {
+        /* we don't see argc and argv here in fortran */
+        darshan_core_initialize(0, NULL);
+    }
 
     return(ret);
 }
@@ -108,7 +116,15 @@ int MPI_Init_thread(int *argc, char ***argv, int required, int *provided)
         return(ret);
     }
 
-    darshan_core_initialize(argc, argv);
+    if(argc && argv)
+    {
+        darshan_core_initialize(*argc, *argv);
+    }
+    else
+    {
+        /* we don't see argc and argv here in fortran */
+        darshan_core_initialize(0, NULL);
+    }
 
     return(ret);
 }
@@ -125,7 +141,7 @@ int MPI_Finalize(void)
 
 /* *********************************** */
 
-static void darshan_core_initialize(int *argc, char ***argv)
+static void darshan_core_initialize(int argc, char **argv)
 {
     int i;
     int internal_timing_flag = 0;
@@ -160,11 +176,11 @@ static void darshan_core_initialize(int *argc, char ***argv)
             darshan_core->wtime_offset = DARSHAN_MPI_CALL(PMPI_Wtime)();
 
             /* record exe and arguments */
-            for(i=0; i<(*argc); i++)
+            for(i=0; i<argc; i++)
             {
                 chars_left = DARSHAN_EXE_LEN-strlen(darshan_core->exe);
-                strncat(darshan_core->exe, (*argv)[i], chars_left);
-                if(i < ((*argc)-1))
+                strncat(darshan_core->exe, argv[i], chars_left);
+                if(i < (argc-1))
                 {
                     chars_left = DARSHAN_EXE_LEN-strlen(darshan_core->exe);
                     strncat(darshan_core->exe, " ", chars_left);


hooks/post-receive
--



More information about the Darshan-commits mailing list