From 2e161072d42ebf1dec8d3216413c8329bda2272a Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 29 Oct 2019 13:38:44 +0000 Subject: Minor edits to suggestion on using shared memory The edits help it be more clear, and remind the reader to delete any remaining file in the RAM in the end. --- README-hacking.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'README-hacking.md') diff --git a/README-hacking.md b/README-hacking.md index 9ecda33..c5415cd 100644 --- a/README-hacking.md +++ b/README-hacking.md @@ -971,8 +971,10 @@ for the benefit of others. aststatistics $$input.fits --mean --std > $@ rm $$input.fits $$input ``` - The important point here is that the template has no suffix. So you - can add the suffix corresponding to your desired format. But more + + The important point here is that the temporary name template + (`shm-template`) has no suffix. So you can add the suffix + corresponding to your desired format afterwards. But more importantly, when `mktemp` sets the random name, it also checks if no file exists with that name and creates a file with that exact name at that moment. So at the end of each recipe above, you'll have two @@ -987,7 +989,11 @@ for the benefit of others. time between deleting two files of a single `rm` command). When using this template, you can put the definition of `shm-template` in `reproduce/analysis/make/initialize.mk` to be usable in all the - different Makefiles of your analysis. + different Makefiles of your analysis. *Finally, BE RESPONSIBLE: * + after you are finished, be sure to clean up any possibly remaining + files (due to crashes in the processing while you are working), + otherwise your RAM may fill up very fast. You can do it easily with a + command like this: `rm -f /dev/shm/$(shell whoami)-*`. - **Software tarballs and raw inputs**: It is critically important to -- cgit v1.2.1