Skip to content

Commit

Permalink
Revert "Revert "force-cube with memory limits""
Browse files Browse the repository at this point in the history
This reverts commit e3f8399.
  • Loading branch information
davidfrantz committed May 23, 2024
1 parent ee6d3de commit 39e488b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion bash/force-cube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,13 @@ for i in "$@"; do
debug "Y_TILE_RANGE = $TYMIN $TYMAX"


# check free RAM
MEMORY=$(LANG="C"; free --mega | awk '/^Mem/ { printf("%.0fM\n", $2 * 0.05) }')

# cube the file, spawn multiple jobs for each tile
export WKT ORIGX ORIGY TILESIZE CHUNKSIZE RES
export FINP DOUT COUT INODATA ONODATA RESAMPLE RASTER DATATYPE ATTRIBUTE
$PARALLEL_EXE -j $NJOB cubethis {1} {2} ::: $(seq $TXMIN $TXMAX) ::: $(seq $TYMIN $TYMAX)
$PARALLEL_EXE -j $NJOB --memsuspend "$MEMORY" cubethis {1} {2} ::: $(seq $TXMIN $TXMAX) ::: $(seq $TYMIN $TYMAX)

# remove the temporary file
rm "$FTMP"
Expand Down
2 changes: 1 addition & 1 deletion misc/force-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.12-dev:::2024-05-23_08:51:57
3.7.12-dev:::2024-05-23_13:00:29

0 comments on commit 39e488b

Please sign in to comment.