ralna / CUTEst

The Constrained and Unconstrained Testing Environment with safe threads (CUTEst) for optimization software
Other
83 stars 18 forks source link

Fixed bug with cutest_scons in MATLAB interface #10

Closed josyoun closed 4 years ago

josyoun commented 4 years ago

The routine cutest_scons was throwing the following error on all problems:

[ans J] = cutest_scons(prob.x); Error using mcutest ** CUTEst error, status = 2, aborting

Error in cutest_scons (line 7) [varargout{:}] = mcutest('scons',varargin{:});

It appears that CUTEST_ccfsg was being called incorrectly where the parameter CUTEst_nnzj was being passed as both an input and an output in multiple positions. This led to an error where CUTEst thought that there was not enough memory for allocation of the Jacobian.

To fix this, I simply duplicated CUTEst_nnzj before the call. It's a single integer, so it's not that much memory. After the fix, everything seems to work fine.

nimgould commented 4 years ago

Many thanks, Joseph. Well spotted. I suspect that there may be similar errors in other interfaces (e.g., CUTEST_ccifsg), and I will check and correct if necessary.