Review allocation for up-scaled stacking
I have encountered two different out-of-memory events, during stacking:
- with up-scaling activated on a shift-registered sequence, the up-scaling function will use NBCORES * the size of up-scaled images in memory. If the program goes out of available memory, the OS kills it (depending on the OS). I don't really understand why working on two 8192x8192 images goes of out memory with 1.5 GB of free memory however.
- after up-scaling and at the beginning of rejection stacking, free memory is distributed to threads. On my 1.5GB free memory system, the message that no more than XXXX MB of memory will be used for stacking was displayed before the up-scaling, then this happened at the beginning of stacking:
log: We have 14 parallel blocks of size 585 (+2) for stacking.
Block 0: channel 0, from 0 to 585 (h = 586)
...
Block 13: channel 0, from 7607 to 8191 (h = 585)
allocating data for 1 threads (each 2884 MB)
Memory allocation error on rejection stacking data pools.
CHANGE MEMORY SETTINGS if stacking takes too much.
free and close (-1)
Segmentation fault
There are two problems here: allocating 2884MB per thread on a 2GB system, and not handling the stacking error properly.
Edited by Vincent Hourdin