summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2016-01-09 10:47:31 -0500
committerErik Schnetter <schnetter@gmail.com>2016-01-09 10:47:31 -0500
commit79a1de2f17094e7e5592bed8cd9040bff9f43cf5 (patch)
tree9ca0364ce5bbb1cc8a976908e3b1c011c5832c2c
parentb18732173a22aa431165fa321abac7924f66b1e1 (diff)
downloadspack-79a1de2f17094e7e5592bed8cd9040bff9f43cf5.tar.gz
spack-79a1de2f17094e7e5592bed8cd9040bff9f43cf5.tar.bz2
spack-79a1de2f17094e7e5592bed8cd9040bff9f43cf5.tar.xz
spack-79a1de2f17094e7e5592bed8cd9040bff9f43cf5.zip
Add a patch to prevent Julia running out of virtual memory
-rw-r--r--var/spack/packages/julia/gc.patch11
-rw-r--r--var/spack/packages/julia/package.py2
2 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/packages/julia/gc.patch b/var/spack/packages/julia/gc.patch
new file mode 100644
index 0000000000..6db69c6c1b
--- /dev/null
+++ b/var/spack/packages/julia/gc.patch
@@ -0,0 +1,11 @@
+--- julia/src/gc.c
++++ julia/src/gc.c
+@@ -162,7 +162,7 @@
+ // A region is contiguous storage for up to REGION_PG_COUNT naturally aligned GC_PAGE_SZ pages
+ // It uses a very naive allocator (see malloc_page & free_page)
+ #if defined(_P64) && !defined(_COMPILER_MICROSOFT_)
+-#define REGION_PG_COUNT 16*8*4096 // 8G because virtual memory is cheap
++#define REGION_PG_COUNT 8*4096 // 512M
+ #else
+ #define REGION_PG_COUNT 8*4096 // 512M
+ #endif
diff --git a/var/spack/packages/julia/package.py b/var/spack/packages/julia/package.py
index 80a58ab745..d978842d9c 100644
--- a/var/spack/packages/julia/package.py
+++ b/var/spack/packages/julia/package.py
@@ -8,6 +8,8 @@ class Julia(Package):
version('0.4.2', 'ccfeb4f4090c8b31083f5e1ccb03eb06')
+ patch('gc.patch')
+
# Build-time dependencies
depends_on("cmake @2.8:")
# depends_on("awk")