Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOPT tests failing on stable images #369

Closed
eirikurj opened this issue Dec 5, 2023 · 2 comments · Fixed by #370
Closed

SNOPT tests failing on stable images #369

eirikurj opened this issue Dec 5, 2023 · 2 comments · Fixed by #370

Comments

@eirikurj
Copy link
Contributor

eirikurj commented Dec 5, 2023

Description

With changes from PR #364, SNOPT tests are failing on stable images during nightly tests with fStar reported as 0 (see for example here).

Steps to reproduce issue

Any stable image with changes from #364 will generate similar errors as below

Traceback (most recent call last):
  File "/home/mdolabuser/repos/pyoptsparse/tests/test_tp109.py", line 205, in test_autorefine
    self.assert_solution_allclose(sol2, 1e-2)
  File "/home/mdolabuser/repos/pyoptsparse/tests/testing_utils.py", line 123, in assert_solution_allclose
    assert_allclose(sol.fStar, self.fStar[self.sol_index], atol=tol, rtol=tol)
  File "/home/mdolabuser/.pyenv/versions/3.9.16/lib/python3.9/site-packages/numpy/testing/_private/utils.py", line 1530, in assert_allclose
    assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
  File "/home/mdolabuser/.pyenv/versions/3.9.16/lib/python3.9/site-packages/numpy/testing/_private/utils.py", line 844, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=0.01, atol=0.01

Mismatched elements: 1 / 1 (100%)
Max absolute difference: 5362.06927538
Max relative difference: 1.
 x: array(0.)
 y: array(5362.069275)

Current behavior

SNOPT tests on stable images are failing

Expected behavior

All tests should pass

Code versions

Any stable image with changes from #364

@eirikurj
Copy link
Contributor Author

eirikurj commented Dec 5, 2023

Had a very brief look, and it seems like SNOPT is just returning 0 for obj. Using v7.7.7 on stable works, passing all tests, but v7.7.1 and v7.7.5, fail the tests. Not sure if we want to drop support for SNOPT < v7.7.7 with this version and onwards. In any case, we need to resolve this quickly, as latest and stable images are now inconsistent.

@ewu63
Copy link
Collaborator

ewu63 commented Dec 5, 2023

Oh right, I forgot we were checking older SNOPT versions too. We should probably revert this and only check obj on 7.7.7. I can do this later today if nobody else volunteers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants