You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configuration: OSACA 0.4.13 running on macOS Ventura 13.2 using the system Python 3.9.6. Also happens on the Homebrew-installed Python 3.10.9 and 3.11.1.
Just create any large (> 50 instructions) kernel and try to run OSACA. The following error is output:
Traceback (most recent call last):
File "/usr/local/bin/osaca", line 8, in <module>
sys.exit(main())
File "/Library/Python/3.9/site-packages/osaca/osaca.py", line 431, in main
run(args, output_file=args.out)
File "/Library/Python/3.9/site-packages/osaca/osaca.py", line 380, in run
inspect(args, output_file=output_file)
File "/Library/Python/3.9/site-packages/osaca/osaca.py", line 336, in inspect
kernel_graph = KernelDG(kernel, parser, machine_model, semantics, args.lcd_timeout)
File "/Library/Python/3.9/site-packages/osaca/semantics/kernel_dg.py", line 32, in __init__
self.loopcarried_deps = self.check_for_loopcarried_dep(self.kernel, timeout)
File "/Library/Python/3.9/site-packages/osaca/semantics/kernel_dg.py", line 133, in check_for_loopcarried_dep
p.start()
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object '_trim_arity.<locals>.wrapper'
On the other hand, the issue does not happen with OSACA 0.4.13 on a Raspberry Pi 4 running Ubuntu Linux 22.04, with Python 3.10.6.
My understanding is that it is related to the parallel LCD computation feature. Some research appears to indicate that _trim_arity comes from the pyparsing package.
The text was updated successfully, but these errors were encountered:
Upon further research, this appears to be an issue involving macOS, the multiprocessing package, and supposedly the pyparsing package. My understanding is that the default mode for multiprocessing was changed from fork to something else (possibly spawn), due to a macOS bug. This change probably ended up requiring that a certain variable from pyparsing be picklable, which it isn't.
I see three possibilities to make OSACA work on macOS:
Fully disable parallelization on macOS;
Add this code somewhere before running parallel code, although it may trigger other macOS bugs:
multiprocessing.set_start_method("fork")
Restrict the use of pyparsing to serial code, so it doesn't have to be pickled.
Configuration: OSACA 0.4.13 running on macOS Ventura 13.2 using the system Python 3.9.6. Also happens on the Homebrew-installed Python 3.10.9 and 3.11.1.
Just create any large (> 50 instructions) kernel and try to run OSACA. The following error is output:
On the other hand, the issue does not happen with OSACA 0.4.13 on a Raspberry Pi 4 running Ubuntu Linux 22.04, with Python 3.10.6.
My understanding is that it is related to the parallel LCD computation feature. Some research appears to indicate that
_trim_arity
comes from thepyparsing
package.The text was updated successfully, but these errors were encountered: