Skip to content

fix a couple bugs with supersonic panel case #213

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

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5fc0df8
fix a couple bugs with supersonic panel case
Asthelen Apr 17, 2025
e4c4588
change as_opt_remote_serial so that only rank 0 write result
Asthelen Apr 21, 2025
bbf9ab3
format
Asthelen Apr 21, 2025
5ef1eb7
Merge branch 'OpenMDAO:main' into supersonic_panel_fix
Asthelen May 14, 2025
b3b00b7
update petsc4py version to what OM uses
Asthelen Jun 2, 2025
3da7e3f
change petsc4py version in one other place
Asthelen Jun 2, 2025
d3cfc0c
bump python version since 3.9 is now too old for openmdao
Asthelen Jun 16, 2025
74e1257
try tweaking versions based on OM's
Asthelen Jun 16, 2025
4577cd6
revert back to python 3.10
Asthelen Jun 16, 2025
2332fbc
quotes around 3.10?
Asthelen Jun 16, 2025
15be00f
tweak versions more for workflows
Asthelen Jun 24, 2025
90a784f
another version tweak
Asthelen Jun 24, 2025
6bf9d65
try python 3.12 because 3.13 conflicts with mamba 1.5.1?
Asthelen Jun 24, 2025
eed7f6a
try newer mamba
Asthelen Jun 24, 2025
7b19124
revert to python 3.12
Asthelen Jun 25, 2025
340123a
more version tweaks
Asthelen Jun 25, 2025
593055b
tweak versions again
Asthelen Jun 25, 2025
19b3b42
try conda installation of mpi4py/petsc4py instead of mamba
Asthelen Jun 25, 2025
9db235d
add conda-forge channel
Asthelen Jun 25, 2025
f767ce5
add conda-forge as channel above
Asthelen Jun 25, 2025
d8834e8
use conda-forge channel differently, and add to numpy/scipy install
Asthelen Jun 25, 2025
50f65ed
forgot to add conda-forge back to unit_tests_and_docs
Asthelen Jun 25, 2025
d4063e8
revert back to numpy 1.26
Asthelen Jun 25, 2025
70c6c82
try adding petsc4py test from OM
Asthelen Jun 25, 2025
1287060
try conda install of funtofem/tacs
Asthelen Jun 25, 2025
f6d4493
add numpy test farther up
Asthelen Jun 25, 2025
d6cea4d
downgrade mpi4py; put mpi4py/petsc4py/numpy tests after funtofem/tacs…
Asthelen Jun 25, 2025
cffdd86
put quick tests before funtofem/tacs install again, this time with do…
Asthelen Jun 25, 2025
7b58573
try removing funtofem/tacs install for now
Asthelen Jun 25, 2025
85f2c63
add lapack install
Asthelen Jun 25, 2025
de76d35
revert back some of the changes
Asthelen Jun 25, 2025
fb54c96
add conda-forge
Asthelen Jun 25, 2025
d8f5a97
revert back to numpy 1.26 due to TACS; remove mpi4py/petsc4py/numpy t…
Asthelen Jun 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/host_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: "3.12"

- name: Run unit test
run: |
Expand All @@ -34,14 +34,14 @@ jobs:
echo "=============================================================";
source $CONDA/etc/profile.d/conda.sh;
echo $CONDA/bin >> $GITHUB_PATH;
conda create -n OpenMDAO -c conda-forge python=3.9 mamba=1.5.1 -q -y;
conda create -n OpenMDAO -c conda-forge python=3.12 mamba=2.0.5 -q -y;
conda activate OpenMDAO;
pip install --upgrade pip
conda install numpy=1.26 scipy=1.13 -q -y;
conda install -c conda-forge numpy=1.26 scipy=1.15 lapack -q -y;
echo "=============================================================";
echo "Install PETSc";
echo "=============================================================";
mamba install -c conda-forge mpi4py petsc4py=3.20 -q -y;
mamba install -c conda-forge mpi4py petsc4py=3.21 -q -y;
echo "=============================================================";
echo "Install OpenMDAO";
echo "=============================================================";
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit_tests_and_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: "3.12"

- name: Install, run unit test, build docs
run: |
Expand All @@ -39,14 +39,14 @@ jobs:
echo "=============================================================";
source $CONDA/etc/profile.d/conda.sh;
echo $CONDA/bin >> $GITHUB_PATH;
conda create -n OpenMDAO -c conda-forge python=3.9 mamba=1.5.1 -q -y;
conda create -n OpenMDAO -c conda-forge python=3.12 mamba=2.0.5 -q -y;
conda activate OpenMDAO;
pip install --upgrade pip;
conda install numpy=1.26 scipy=1.13 -q -y;
conda install -c conda-forge numpy=1.26 scipy=1.15 lapack -q -y;
echo "=============================================================";
echo "Install PETSc";
echo "=============================================================";
mamba install -c conda-forge mpi4py petsc4py=3.20 -q -y;
mamba install -c conda-forge mpi4py petsc4py=3.21 -q -y;
echo "=============================================================";
echo "Install OpenMDAO";
echo "=============================================================";
Expand Down
26 changes: 16 additions & 10 deletions examples/aerostructural/supersonic_panel/as_opt_remote_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,20 @@ def run_optimization(prob: om.Problem):
prob.model.remote.stop_server()
prob.cleanup()

write_out_optimization_data(prob, sql_file)
if prob.model.comm.rank == 0:

with open(sql_file, "a") as f:
f.write("run times, function\n")
for i in range(len(prob.model.remote.times_function)):
f.write(f"{prob.model.remote.times_function[i]}\n")
f.write(" " + "\n")
write_out_optimization_data(prob, sql_file)

f.write("run times, gradient\n")
for i in range(len(prob.model.remote.times_gradient)):
f.write(f"{prob.model.remote.times_gradient[i]}\n")
f.write(" " + "\n")
with open(sql_file, "a") as f:
f.write("run times, function\n")
for i in range(len(prob.model.remote.times_function)):
f.write(f"{prob.model.remote.times_function[i]}\n")
f.write(" " + "\n")

f.write("run times, gradient\n")
for i in range(len(prob.model.remote.times_gradient)):
f.write(f"{prob.model.remote.times_gradient[i]}\n")
f.write(" " + "\n")


def main():
Expand All @@ -78,3 +80,7 @@ def main():
run_check_totals(prob)
else:
run_optimization(prob)


if __name__ == "__main__":
main()
7 changes: 6 additions & 1 deletion examples/aerostructural/supersonic_panel/geometry_morph.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ def setup(self):
discipline_builders: List[Builder] = self.options["discipline_builders"]

for geom, builder in zip(self.discipline_geometries, discipline_builders):
self.add_input(geom.COORDINATES_INPUT, distributed=True, shape_by_conn=True)
self.add_input(
geom.COORDINATES_INPUT,
distributed=True,
shape_by_conn=True,
tags=["mphys_coordinates"],
)

self.add_output(
geom.COORDINATES_OUTPUT,
Expand Down