mdolab / pygeo

pyGeo provides geometric design variables and constraints suitable for gradient-based optimization.
https://mdolab-pygeo.readthedocs-hosted.com/en/latest/?badge=latest
Apache License 2.0
124 stars 55 forks source link

Tests fail due to skipped tests #178

Closed eirikurj closed 1 year ago

eirikurj commented 1 year ago

Description

PR https://github.com/mdolab/pygeo/pull/170 added tests that are skipped if run in parallel. This breaks the tests and the docker nightly integration tests as the EXTRA_FLAGS='--disallow_skipped' is set.

The tests have parallel tests defined, e.g.,

test_params = [
    # # Tutorial scalar JST
    {"N_PROCS": 1, "name": "serial"},
    {"N_PROCS": 4, "name": "parallel_4procs"},
]

but they also have,

# we skip parallel tests for now
if not train and self.N_PROCS > 1:
    self.skipTest("Skipping the parallel test for now.")

Steps to reproduce issue

Run tests with testflo -v -n 1 --disallow_skipped

Current behavior

The tests that are skipped are the following:

The following tests were skipped:
test_DVGeometryESP.py:TestPyGeoESP_BasicCube_1_parallel_4procs.test_composite
test_DVGeometryVSP.py:RegTestPyGeoVSP_1_parallel_4procs.test_2
test_DVGeometryVSP.py:RegTestPyGeoVSP_1_parallel_4procs.test_3

Expected behavior

No tests should be skipped

Code versions

Current mdolab/private:u20-gcc-ompi-stable docker image

Possible solution

Two options

  1. If there is no need for a parallel run, then remove test_params and define N_PROCS = 1
  2. Remove the if check and allow running in parallel.