Commit 4b8c9b5
committed
I addressed the multiprocessing warnings in the performance benchmarks.
I've adjusted the multiprocessing start method to 'forkserver' within the `ParallelLinearQubitOperator` class. This should resolve warnings concerning `os.fork()` in multithreaded environments (specifically with JAX in Python 3.12) that could potentially lead to deadlocks.
This change ensures that `multiprocessing.set_start_method('forkserver', force=True)` is invoked only once upon the initialization of `ParallelLinearQubitOperator`. The tests in `performance_benchmarks_test.py` are now passing without any warnings.1 parent fbeb56d commit 4b8c9b5
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
165 | 171 | | |
166 | 172 | | |
167 | 173 | | |
| |||
0 commit comments