Skip to content
Snippets Groups Projects
Commit ec8defbc authored by Loïc Le Guyader's avatar Loïc Le Guyader
Browse files

Adds max_fraction_memory to change the fraction of memory used for multiprocessing

parent 61e4a8d5
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@ class DSSC:
self.aspect = self.px_pitch_v/self.px_pitch_h # aspect ratio of the DSSC images
self.geom = None
self.mask = None
self.max_fraction_memory = 0.8
print('DSSC configuration')
print(f'Topic: {self.topic}')
......@@ -288,7 +289,7 @@ class DSSC:
print(f'max available memory: {max_GB} GB')
# max_GB / (8byte * 16modules * 128px * 512px * N_pulses)
self.chunksize = int(0.8*max_GB * 1024**3 // (8 * 16 * 128 * 512 * self.fpt))
self.chunksize = int(self.max_fraction_memory*max_GB * 1024**3 // (8 * 16 * 128 * 512 * self.fpt))
print('processing', self.chunksize, 'trains per chunk')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment