qutip / qutip-benchmark

Tools for continuously bench-marking qutip's development branch
BSD 3-Clause "New" or "Revised" License
5 stars 8 forks source link

adding solver benchmarks #9

Closed xspronken closed 2 years ago

xspronken commented 2 years ago

Adding the solver benchmark file

xspronken commented 2 years ago

I looked up why the benchmark fails on size = 256. The liouvillian calculated from the H and C_ops produces matrix of size 256², which is to large to handle for the memory and produces this error:

/usr/share/miniconda3/envs/actions-bench/lib/python3.10/site-packages/qutip/solve/steadystate.py:357: in steadystate
    A_np = np.abs(A.full())
/usr/share/miniconda3/envs/actions-bench/lib/python3.10/site-packages/qutip/core/qobj.py:822: in full
    out = np.asarray(self.data.to_array(), order=order)
qutip/core/data/csr.pyx:169: in qutip.core.data.csr.CSR.to_array
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   numpy.core._exceptions._ArrayMemoryError: Unable to allocate 64.0 GiB for an array with shape (65536, 65536) and data type complex128

The maximum size that can be used with 16GB of ram is 185, so I think I will just limit size for solvers to 128.

Ericgig commented 2 years ago

There is still a failure:

=========================== short test summary info ============================
FAILED benchmarks/tests/test_solvers.py::test_steadystate[Cavity-128] - Excep...
================== 1 failed, 317 passed in 3125.47s (0:52:05) ==================