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

QVM does not release memory after large qubit simulations #198

Closed
jmackeyrigetti opened this issue Oct 24, 2019 · 1 comment
Closed

QVM does not release memory after large qubit simulations #198

jmackeyrigetti opened this issue Oct 24, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jmackeyrigetti
Copy link
Contributor

After running a 32 qubit simulation, the full 64G of RAM was used but upon completion, not released:

free -h total used free shared buff/cache available Mem: 124G 64G 55G 932K 4.5G 58G Swap: 0B 0B 0B

Subsequent simulations to the QVM fail to release the RAM and cannot allocate enough for the next simulation:
<135>1 2019-10-24T18:06:31Z a3ae8eac44b3 qvm 1 - - [172.17.0.1 Session:2] Got "multishot" request from API key/User ID: NIL / NIL <135>1 2019-10-24T18:06:31Z a3ae8eac44b3 qvm 1 - - [172.17.0.1 Session:2] Making qvm of 32 qubits <131>1 2019-10-24T18:06:31Z a3ae8eac44b3 qvm 1 - - [2019-10-24 18:06:31 [ERROR]] Error while processing connection: The condition The condition Cannot allocate memory: malloc() of 68719476752 bytes failed. occurred with errno: 0. occurred with errno: 0.

@jmbr
Copy link
Contributor

jmbr commented Oct 24, 2019

The Lisp image has no idea how taxing the foreign memory allocation is and, consequently, it does not collect garbage often enough. The patch #199 "fixes" the issue by triggering a full garbage collection after each request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants