Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating random Hamiltonian #236

Open
wants to merge 24 commits into
base: development
Choose a base branch
from

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Sep 8, 2023

closes #234

@TreeratKJ TreeratKJ marked this pull request as ready for review September 10, 2023 11:49
@TreeratKJ
Copy link
Collaborator

Cannot run multiprocessing using simulation.run(p=True), while simulation.run(p=False) is working well.
Errors when running multiprocessing:

`Traceback (most recent call last):
File "/home/tsrivipa/Script/QuanGuru/src/quanguru/classes/QSimComp.py", line 66, in getattribute
obj = getattr(self.simulation, __name)
AttributeError: 'Simulation' object has no attribute '_qProtocol__currentState'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/tsrivipa/Script/srivipat_treerat/DQS_script/20240402_multiprocessingTest.py", line 180, in
simulation.run(p=True, coreCount=2)
File "/home/tsrivipa/Script/QuanGuru/src/quanguru/classes/QSim.py", line 354, in run
_poolMemory.run(self, p, coreCount)
File "/home/tsrivipa/Script/QuanGuru/src/quanguru/classes/QSim.py", line 412, in run
runSimulation(qSim, _pool)
File "/home/tsrivipa/Script/QuanGuru/src/quanguru/classes/modularSweep.py", line 49, in runSimulation
paralEvol(qSim, p)
File "/home/tsrivipa/Script/QuanGuru/src/quanguru/classes/modularSweep.py", line 60, in paralEvol
results = p.map(partial(parallelTimeEvol, qSim), range(qSim.Sweep.indMultip), chunksize=1)
File "/usr/lib64/python3.9/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib64/python3.9/multiprocessing/pool.py", line 771, in get
raise self._value
File "/usr/lib64/python3.9/multiprocessing/pool.py", line 537, in _handle_tasks
put(task)
File "/usr/lib64/python3.9/multiprocessing/connection.py", line 215, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/usr/lib64/python3.9/multiprocessing/reduction.py", line 51, in dumps
cls(buf, protocol).dump(obj)
File "/home/tsrivipa/Script/QuanGuru/src/quanguru/classes/base.py", line 357, in getstate
state[k] = getattr(self, k)
File "/home/tsrivipa/Script/QuanGuru/src/quanguru/classes/QSimComp.py", line 68, in getattribute
raise attErr1 from exc
File "/home/tsrivipa/Script/QuanGuru/src/quanguru/classes/QSimComp.py", line 63, in getattribute
obj = super().getattribute(__name)
AttributeError: 'qProtocol' object has no attribute '_qProtocol__currentState'
Exception ignored in: <function Pool.del at 0x14ec80baa310>
Traceback (most recent call last):
File "/usr/lib64/python3.9/multiprocessing/pool.py", line 268, in del
File "/usr/lib64/python3.9/multiprocessing/queues.py", line 378, in put
File "/usr/lib64/python3.9/multiprocessing/connection.py", line 209, in send_bytes
File "/usr/lib64/python3.9/multiprocessing/connection.py", line 420, in _send_bytes
File "/usr/lib64/python3.9/multiprocessing/connection.py", line 377, in _send
OSError: [Errno 9] Bad file descriptor`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants