jfowkes / pycutest

Python interface to CUTEst
https://jfowkes.github.io/pycutest/
GNU General Public License v3.0
27 stars 10 forks source link

[macOS] Bizarre CUTEst u/creport() bug #86

Closed jfowkes closed 1 month ago

jfowkes commented 1 month ago

Further investigation of the failing macOS CI tests has revealed what appears a genuine CUTEst bug in u/creport():

 >>> import pycutest
>>> p = pycutest.import_problem('BOX2')
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 >>> 
>>> p.report()
{'f': 0, 'g': 5, 'H': 0, 'Hprod': 0, 'tsetup': 0.0, 'trun': 0.0, 'c': None, 'cg': None, 'cH': None}
0.000000 5.125000 0.000000 0.000000 0.000000 0.000000 0.000000 >>> p.report()
{'f': 0, 'g': 6, 'H': 0, 'Hprod': 0, 'tsetup': 0.0, 'trun': 0.0, 'c': None, 'cg': None, 'cH': None}
0.000000 6.812500 0.000000 0.000000 0.000000 0.000000 0.000000 >>> p.report()
{'f': 0, 'g': 7, 'H': 0, 'Hprod': 0, 'tsetup': 0.0, 'trun': 0.0, 'c': None, 'cg': None, 'cH': None}
0.000000 7.812500 0.000000 0.000000 0.000000 0.000000 0.000000 >>> p.report()
{'f': 0, 'g': 8, 'H': 0, 'Hprod': 0, 'tsetup': 0.0, 'trun': 0.0, 'c': None, 'cg': None, 'cH': None}
0.000000 8.500000 0.000000 0.000000 0.000000 0.000000 0.000000 >>> 

The intermediate prints are the actual values of calls as returned by the C interface.

It turns out the issue is due to the time array passed in to u/creport() being too small in the C interface.