Hello APBS users:

I'm trying to use mergedx to merge some .dx files into a very large one, and I'm running into this error:

mergedx -o gridmerge.dx 1340 1340 1340 pot*.dx
WARNING: mergedx is deprecated. Please consider using mergedx2
# main:   Reading Headers...
# main:   Dimensions of the merged grid
# main:   nx = 1340, ny = 1340, nz = 1340
# main:   hx = 0.970874, hy = 0.970874, hz = 0.970874
# main:   xmin = -658.791, ymin = -660.971, zmin = -645.295
# main:   xmax = 641.209, ymax = 639.029, zmax = 654.705
Unable to allocate memory!
(This often means you don't have enough memory available for this calculation.)
FATAL ERROR: Unable to allocate enough memory for problem size.
FATAL ERROR: You requested 2068962816 bytes of RAM.
FATAL ERROR: Check that your system has that much memory.
VASSERT: ASSERTION FAILURE!  filename /home/lvotapka/Downloads/apbs/contrib/maloc/src/vsys/vmem.c, line 252, (ram != ((void *)0))
Aborted

My system has far more than 2 Gb of memory, so I believe that this problem is because I've compiled APBS (by default) with -mcmodel=small.

Does anyone know how to change the Makefile or CMake files in order to compile mergedx and other tools with the -mcmodel=medium or -mcmodel=large option?

Best,
-Lane Votapka