aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-02-15 14:10:29 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-02-15 14:22:04 +0100
commitf9de1124b675b2cfd09e9ad75aeda45ecea7319a (patch)
treea83fe1129e9ac5a641f15c57bd1ce7a1d795ec66 /reproduce
parente45ac9f074a62a0dab26e4de86e4c97458384d18 (diff)
Gnuastro's memory mapping is now a local variable
As described in the commens above `MINMAPSIZE' of `LOCAL.mk.in', the amount of memory to map to HDD/SSD or keep in RAM is a local issue and not relevant to the pipeline's results. So it is now defined in a `gnuastro-local.conf' file. To keep the Makefiles clean, this file is created by the `./configure' script. To do this cleanly, the `./configure' script was also almost fully re-written with better functionality now.
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/config/gnuastro/gnuastro.conf10
-rw-r--r--reproduce/config/pipeline/LOCAL.mk.in20
-rw-r--r--reproduce/src/make/initialize.mk4
3 files changed, 28 insertions, 6 deletions
diff --git a/reproduce/config/gnuastro/gnuastro.conf b/reproduce/config/gnuastro/gnuastro.conf
index 49f9906..a2a44cf 100644
--- a/reproduce/config/gnuastro/gnuastro.conf
+++ b/reproduce/config/gnuastro/gnuastro.conf
@@ -12,9 +12,10 @@
# pipeline is taken from the default Gnuastro configuration from its
# source (`bin/gnuastro.conf').
-# Reproduction pipeline
+# Reproduction pipeline (`./config' has to be before `lastconfig').
+ config .gnuastro/gnuastro-local.conf
+ # onlyversion X.X
lastconfig 1
-# onlyversion X.X
# Input:
hdu 1
@@ -30,7 +31,4 @@
interponlyblank 0
# Output:
- tableformat fits-binary
-
-# Operating mode
- minmapsize 1000000000 \ No newline at end of file
+ tableformat fits-binary \ No newline at end of file
diff --git a/reproduce/config/pipeline/LOCAL.mk.in b/reproduce/config/pipeline/LOCAL.mk.in
index 896df2f..ac8e10e 100644
--- a/reproduce/config/pipeline/LOCAL.mk.in
+++ b/reproduce/config/pipeline/LOCAL.mk.in
@@ -48,3 +48,23 @@ SURVEY = reproduce/SURVEY
# more easy: the contents of the build directory do not need to be backed
# up since they can be reproduced and they can be large.
BDIR = reproduce/BDIR
+
+
+
+
+
+# Memory mapping minimum size
+# ---------------------------
+#
+# Some programs (for example Gnuastro) can deal with cases where the local
+# system doesn't have enough memory (RAM) to keep large files there. For
+# example, they will create memory-mapped (`mmap' for short) files on the
+# HDD or SSD and read/write to them instead of RAM. This will ofcourse,
+# slow down the processing, but atleast the program won't crash.
+#
+# Since the memory requirements of different systems are different and it
+# has no effect on the software's final result, the minimum size of an
+# allocated array to warrant a mapping to HDD/SSD instead of RAM must also
+# be defined here. This value will be used in the programs that support
+# this feature.
+MINMAPSIZE = 1000000000
diff --git a/reproduce/src/make/initialize.mk b/reproduce/src/make/initialize.mk
index 3125399..7854c2f 100644
--- a/reproduce/src/make/initialize.mk
+++ b/reproduce/src/make/initialize.mk
@@ -129,7 +129,9 @@ reproduce/build: | $(BDIR)
# want it to be rebuilt every time.
.PHONY: all clean distclean clean-mmap $(mtexdir)/initialize.tex
distclean: clean; rm -f $(pconfdir)/LOCAL.mk
+# --------- Delete for no Gnuastro ---------
clean-mmap:; rm -f reproduce/config/gnuastro/mmap*
+# ------------------------------------------
clean: clean-mmap
ifeq ($(configure-run),yes)
rm -rf $(BDIR)
@@ -153,9 +155,11 @@ $(mtexdir)/initialize.tex: | $(mtexdir)
@v=$$(git describe --dirty --always); \
echo "\newcommand{\pipelineversion}{$$v}" > $@
+# --------- Delete for no Gnuastro ---------
# Version of Gnuastro.
@v=$$(astnoisechisel --version | awk 'NR==1{print $$NF}'); \
echo "\newcommand{\gnuastroversion}{$$v}" >> $@
+# ------------------------------------------
# Location of the build directory (for LaTeX inputs).
@echo "\newcommand{\bdir}{$(BDIR)}" >> $@