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
/rmtb_issue.py master ◼
___________________________________________________________________________
RMTB
___________________________________________________________________________
Problem size
# training points. : 10
___________________________________________________________________________
Training
Training ...
Pre-computing matrices ...
Computing dof2coeff ...
Computing dof2coeff - done. Time (sec): 0.0000021
Initializing Hessian ...
Initializing Hessian - done. Time (sec): 0.0004039
Computing energy terms ...
Traceback (most recent call last):
File "~/smt/./rmtb_issue.py", line 33, in <module>
model.train()
File "~/smt/smt/surrogate_models/surrogate_model.py", line 275, in train
self._train()
File "~/smt/smt/surrogate_models/rmts.py", line 443, in _train
self._new_train()
File "~/smt/smt/surrogate_models/rmts.py", line 406, in _new_train
self._compute_energy_terms() * self.options["energy_weight"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/smt/smt/surrogate_models/rmts.py", line 202, in _compute_energy_terms
self.rmtsc.compute_quadrature_points(
File "smt/src/rmts/rmtsclib.pyx", line 40, in smt.surrogate_models.rmtsclib.PyRMTB.compute_quadrature_points
self.thisptr.compute_quadrature_points(n, &nelem_list[0], &x[0])
IndexError: Out of bounds on buffer access (axis 0)
Tracing this down a bit, I found that x is an empty list, which does indeed make &x[0] a out-of-bounds access.
As an aside, if you specify the order as anything > 16, you get the following error message:
Traceback (most recent call last):
File "~/smt/./rmtb_issue.py", line 33, in <module>
model.train()
File "~/smt/smt/surrogate_models/surrogate_model.py", line 275, in train
self._train()
File "~/smt/smt/surrogate_models/rmts.py", line 443, in _train
self._new_train()
File "~/smt/smt/surrogate_models/rmts.py", line 406, in _new_train
self._compute_energy_terms() * self.options["energy_weight"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/smt/smt/surrogate_models/rmts.py", line 209, in _compute_energy_terms
mtx = self._compute_jac(kx + 1, kx + 1, x)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/smt/smt/surrogate_models/rmts.py", line 142, in _compute_jac
full_jac = scipy.sparse.csc_matrix(
^^^^^^^^^^^^^^^^^^^^^^^^
File "~/smt/venv_smt/lib/python3.12/site-packages/scipy/sparse/_compressed.py", line 54, in __init__
self._coo_container(arg1, shape=shape, dtype=dtype)
File "~/smt/venv_smt/lib/python3.12/site-packages/scipy/sparse/_coo.py", line 99, in __init__
self._check()
File "~/smt/venv_smt/lib/python3.12/site-packages/scipy/sparse/_coo.py", line 190, in _check
raise ValueError('column index exceeds matrix dimensions')
ValueError: column index exceeds matrix dimensions
The text was updated successfully, but these errors were encountered:
To reproduce:
Error:
Tracing this down a bit, I found that
x
is an empty list, which does indeed make&x[0]
a out-of-bounds access.As an aside, if you specify the order as anything
> 16
, you get the following error message:The text was updated successfully, but these errors were encountered: