You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The smbuf1b variable is never used. It looks like it should be passed as an argument to _find_pivot, after smbuf1, per the signature below (variable names in the signature are just buf1 and buf1b):
As a consequence of smbuf1b not being passed to _find_pivot, we're calling _find_pivot with only 15 positional arguments when it requires 16.
The appearance of this bug is uncommon because there's a dedicated code path for handling linear solves with matrices of order < 10,000 (below) that gets triggered in our testing and even in most large GST runs:
err=_scipy.linalg.LinAlgError("Linear solver fail on root proc!") # just in case...
comm.Bcast(ok_buf, root=0)
ifok_buf[0] ==0:
_smt.cleanup_shared_ndarray(a_shm)
_smt.cleanup_shared_ndarray(b_shm)
raiseerr# all procs must raise in sync
ari.scatter_x(global_x, x)
_smt.cleanup_shared_ndarray(a_shm)
_smt.cleanup_shared_ndarray(b_shm)
return
Possible ways to move forward:
Temporary. Just change the dimension threshold to 100,000 instead of 10,000. Storing one double-precision matrix of this size requires ~80GB. The overhead of the Python call means this will require 160 GB of "free" RAM to run. That's a reasonable amount for modern compute servers.
Try and fix the bug in the custom Gaussian elimination code. Have the branch on matrix size check a user-modifiable constant instead of a hard coded value. Some of our tests can run this code where that matrix size threshold is quite small.
I've gone ahead with the second of my possible ways to move forward:
Try and fix the bug in the custom Gaussian elimination code. Have the branch on matrix size check a user-modifiable constant instead of a hard coded value. Some of our tests can run this code where that matrix size threshold is quite small.
The changes, which were quite simple, are currently on the xfgst-riley branch. We can port them to develop when needed.
Here's a code snippet in pygsti/optimize/customsolve.py on the head of master.
pyGSTi/pygsti/optimize/customsolve.py
Lines 157 to 168 in c74fcb2
The smbuf1b variable is never used. It looks like it should be passed as an argument to _find_pivot, after smbuf1, per the signature below (variable names in the signature are just
buf1
andbuf1b
):pyGSTi/pygsti/optimize/customsolve.py
Lines 213 to 214 in c74fcb2
As a consequence of smbuf1b not being passed to _find_pivot, we're calling _find_pivot with only 15 positional arguments when it requires 16.
The appearance of this bug is uncommon because there's a dedicated code path for handling linear solves with matrices of order < 10,000 (below) that gets triggered in our testing and even in most large GST runs:
pyGSTi/pygsti/optimize/customsolve.py
Lines 98 to 126 in c74fcb2
Possible ways to move forward:
The text was updated successfully, but these errors were encountered: