Multiprocessing fork changes has broken sinograms/properties
jadball opened this issue · comments
James Ball commented
I believe issue #216 is to blame for the following bug when calling ImageD11.sinograms.properties.main()
:
read ds ds_name
Nscans 1001 NPROC 63
Options {'algorithm': 'lmlabel', 'wtmax': 70000, 'save_overlaps': False}
0%| | 0/1063 [00:00<?, ?it/s]Process ForkServerPoolWorker-10:
Traceback (most recent call last):
File ".../python3.11/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File ".../python3.11/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File ".../python3.11/multiprocessing/pool.py", line 109, in worker
initializer(*initargs)
File ".../ImageD11/sinograms/properties.py", line 709, in process
scan.motors['omega'] = omega[i]
^^^^^
NameError: name 'omega' is not defined
I feel that the changes to multiprocessing logic caused the global variable omega
defined in main()
to not be in scope inside process()
Jon Wright commented
Indeed - so this is a bug that needs to be fixed without relying on fork.
James Ball commented
Fixed by 6ab3ff8