[Darshan-commits] [Git][darshan/darshan][master] 2 commits: change all memory size variables to long ints

Philip Carns xgitlab at cels.anl.gov
Mon Feb 22 09:37:27 CST 2021



Philip Carns pushed to branch master at darshan / darshan


Commits:
3ca3e621 by Glenn K. Lockwood at 2021-02-11T15:33:26-08:00
change all memory size variables to long ints

- - - - -
4493b4ab by Philip Carns at 2021-02-22T09:37:23-06:00
Merge branch 'feature/BIGmodules' into 'master'

change all memory size variables to long ints

See merge request darshan/darshan!76
- - - - -


3 changed files:

- darshan-runtime/darshan-core.h
- darshan-runtime/lib/darshan-core.c
- darshan-runtime/lib/darshan-dxt.c


Changes:

=====================================
darshan-runtime/darshan-core.h
=====================================
@@ -50,7 +50,7 @@
 
 /* Maximum amount of memory per instrumentation module in MiB */
 #ifdef __DARSHAN_MOD_MEM_MAX
-#define DARSHAN_MOD_MEM_MAX (__DARSHAN_MOD_MEM_MAX * 1024 * 1024)
+#define DARSHAN_MOD_MEM_MAX (__DARSHAN_MOD_MEM_MAX * 1024L * 1024L)
 #else
 #define DARSHAN_MOD_MEM_MAX (2 * 1024 * 1024) /* 2 MiB default */
 #endif
@@ -82,7 +82,7 @@ struct darshan_core_module
 {
     void *rec_buf_start;
     void *rec_buf_p;
-    int rec_mem_avail;
+    long rec_mem_avail;
     darshan_module_funcs mod_funcs;
 };
 
@@ -107,9 +107,9 @@ struct darshan_core_runtime
 
     /* darshan-core internal data structures */
     struct darshan_core_module* mod_array[DARSHAN_MAX_MODS];
-    int mod_mem_used;
+    long mod_mem_used;
     struct darshan_core_name_record_ref *name_hash;
-    int name_mem_used; 
+    long name_mem_used;
     double wtime_offset;
     char *comp_buf;
 #ifdef __DARSHAN_ENABLE_MMAP_LOGS


=====================================
darshan-runtime/lib/darshan-core.c
=====================================
@@ -2152,8 +2152,8 @@ void darshan_core_register_module(
     int *sys_mem_alignment)
 {
     struct darshan_core_module* mod;
-    int mod_mem_req = *inout_mod_buf_size;
-    int mod_mem_avail;
+    long mod_mem_req = *inout_mod_buf_size;
+    long mod_mem_avail;
 
     *inout_mod_buf_size = 0;
 


=====================================
darshan-runtime/lib/darshan-dxt.c
=====================================
@@ -38,7 +38,7 @@ typedef int64_t off64_t;
 
 /* maximum amount of memory to use for storing DXT records */
 #ifdef __DARSHAN_MOD_MEM_MAX
-#define DXT_IO_TRACE_MEM_MAX (__DARSHAN_MOD_MEM_MAX * 1024 * 1024)
+#define DXT_IO_TRACE_MEM_MAX (__DARSHAN_MOD_MEM_MAX * 1024L * 1024L)
 #else
 #define DXT_IO_TRACE_MEM_MAX (4 * 1024 * 1024) /* 4 MiB default */
 #endif
@@ -166,8 +166,8 @@ static pthread_mutex_t dxt_runtime_mutex =
             PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
 
 static int dxt_my_rank = -1;
-static int dxt_total_mem = DXT_IO_TRACE_MEM_MAX;
-static int dxt_mem_remaining = 0;
+static long dxt_total_mem = DXT_IO_TRACE_MEM_MAX;
+static long dxt_mem_remaining = 0;
 
 #define MAX_DXT_TRIGGERS 20
 static int num_dxt_triggers = 0;



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/30e9514ca873843c2c8bdc7502c31aa9e63aa89f...4493b4abc03048f1938e7b99eeb17f9b0fadec36

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/30e9514ca873843c2c8bdc7502c31aa9e63aa89f...4493b4abc03048f1938e7b99eeb17f9b0fadec36
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/20210222/551b2eb0/attachment-0001.html>


More information about the Darshan-commits mailing list