diff --git a/openaerostruct/__init__.py b/openaerostruct/__init__.py index 2614ce9d9..7a38ae062 100644 --- a/openaerostruct/__init__.py +++ b/openaerostruct/__init__.py @@ -1 +1 @@ -__version__ = "2.7.0" +__version__ = "2.7.1" diff --git a/openaerostruct/tests/test_multipoint_parallel.py b/openaerostruct/tests/test_multipoint_parallel.py index 2dff4ed53..99ee9d6fe 100644 --- a/openaerostruct/tests/test_multipoint_parallel.py +++ b/openaerostruct/tests/test_multipoint_parallel.py @@ -387,10 +387,17 @@ def test_multipoint_MPI(self): print("Analysis runtime: ", run_model_time, "[s]") print("Derivatives runtime: ", derivs_time, "[s]") + # OpenMDAO versions before 3.31 use absolute names as dictionary keys, but versions after + # use user facing (promoted) names. Handle both cases here. + try: + deriv_fuel_sum_spar_thickness = totals[("fuel_sum.fuel_sum", "wing.spar_thickness_cp")] + except KeyError: + deriv_fuel_sum_spar_thickness = totals[("fuel_sum", "wing.spar_thickness_cp")] + assert_near_equal(MPI.COMM_WORLD.size, 2, 1e-8) - assert_near_equal(prob.get_val("fuel_sum.fuel_sum", units="kg"), 5649.1290836, 1e-5) + assert_near_equal(prob.get_val("fuel_sum", units="kg"), 5649.1290836, 1e-5) assert_near_equal( - totals[("fuel_sum.fuel_sum", "wing.spar_thickness_cp")], + deriv_fuel_sum_spar_thickness, np.array([[1712.12137573, 2237.99650867, 3036.45032547, 5065.16727605]]), 1e-5, )