memory error

50 views
Skip to first unread message

ta95....@gmail.com

unread,
Dec 22, 2016, 5:44:50 AM12/22/16
to QuTiP: Quantum Toolbox in Python
Hi, I want to solve steady state master equation for a optomechanical system with two mechanical oscillators and one cavity. I run a qutip code for this system on a cluster then I get this error:

Traceback (most recent call last):
  File "code.py", line 9, in <module>
    a= tensor(destroy(Nc), qeye(Nm1),qeye(Nm2))
  File "/usr/local/lib/python2.7/dist-packages/qutip/tensor.py", line 110, in tensor
    out.data = sp.kron(out.data, q.data, format='csr')
  File "/usr/lib/python2.7/dist-packages/scipy/sparse/construct.py", line 335, in kron
    data = A.data.repeat(B.nnz)
MemoryError

 why this error occurred? for me :Nm1=100,Nm2=100;Nc=500;

Paul Nation

unread,
Dec 22, 2016, 9:12:32 AM12/22/16
to QuTiP Group
It is because your system is too large for the amount of memory you have.  Your current matrix is 25E12*25e12 in size.

--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ta95....@gmail.com

unread,
Dec 22, 2016, 12:13:46 PM12/22/16
to QuTiP: Quantum Toolbox in Python, ta95....@gmail.com
do you know how many memory is needed to run this code? How to calculate the dimensions of the matrix?

ta95....@gmail.com

unread,
Dec 22, 2016, 4:33:26 PM12/22/16
to QuTiP: Quantum Toolbox in Python
how I can solve steady state master equation for large hilbert space?
the sparse=true command could help me?is direct method suitable or other methods must be chosen?
Reply all
Reply to author
Forward
Message has been deleted
0 new messages