Skip to content

Intermitent SNOPT inform test failure #477

@A-CGray

Description

@A-CGray

Description

We are seeing TestTP109.test_snopt_informs fail intermitently on our ARM docker image builds. This test sets a time limit of 1e-15 on an optimization and then checks that SNOPT exits with a 30-34 "time limit reached" exit code. However, for some reason the test occasionally fails with SNOPT returning a 0-1 exit code. Seems like SNOPT is ignoring the time limit and successfully solving the problem. The only explanation I could think of for this is that the time limit option key used in the test is "Time Limit", while the correct key is "Time limit", but I can't tell why this would be non-deterministic though.

Steps to reproduce issue

Current behavior

     about to run test_tp109.py:TestTP109.test_snopt_informs (isolated) /home/***/repos/pyoptsparse/tests/test_tp109.py:TestTP109.test_snopt_informs  ... FAIL (00:00:0.10, 133 MB)
Traceback (most recent call last):
  File "/home/***/repos/pyoptsparse/tests/test_tp109.py", line 180, in test_snopt_informs
    self.assert_inform_equal(sol, 34)
  File "/home/***/.pyenv/versions/3.9.16/lib/python3.9/site-packages/pyoptsparse/testing/pyOpt_testing.py", line 165, in assert_inform_equal
    self.assertEqual(sol.optInform.value, optInform)
AssertionError: 1 != 34

Expected behavior

SNOPT should return exit code 34 and test should pass.

Code versions

  • Operating System: Ubuntu 24.04
  • Python: 3.9.16
  • OpenMPI: 4.1.6
  • PETSc:
  • Compiler: gcc
  • This repository: main (6cc1756)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions