mdolab / MACH-Aero

MACH: MDO of Aircraft Configurations with High fidelity
114 stars 53 forks source link

aero_opt.py killed during "Solving ADjoint Transpose with PETSc..." #103

Closed aozuzun closed 1 year ago

aozuzun commented 1 year ago

During the aerodynamic optimization tutorial, I encountered issue #96 which I resolved by replacing the pyoptsparse version with 2.10.0. However, I am now facing a new problem while using docker u22-gcc-ompi-stable. Optimization cannot proceed the following step (Solving ADjoint Transpose with PETSc...) and it is kiiled. I have increased swap memory but it did not solve the issue.

#
# Writing grid file(s):
#    output/wing_000_vol.cgns
# Grid file(s) written
#
#
# Writing volume solution file(s):
#    output/wing_000_vol.cgns
# Volume solution file(s) written
#
#
# Writing surface solution file(s):
#    output/wing_000_surf.cgns
# Surface solution file(s) written
#
#
# Writing slices file(s): 
#    output/wing_000_slices.dat
# Slices file(s) written
#
#
# Writing lift distribution file(s):
#    output/wing_000_lift.dat
# Lift distribution file(s) written
#
#
# Writing tecplot surface file(s):
#    output/wing_000_surf.plt
# Tecplot surface file(s) written
#
+-------------------------------------------------+
|
| Solution Timings:
|
| Set AeroProblem Time          :      2.515 sec
| Solution Time                 :      8.461 sec
| Write Solution Time           :      0.407 sec
| Stability Parameter Time      :      0.000 sec
|
| Total Call Time               :     11.383 sec
+--------------------------------------------------+
-> Alpha... 1.500000 
+---------------------------------------------------+
|
| Function Timings:
|
| Function AeroProblem Time     :      0.006 sec
| Function Evaluation Time      :      0.001 sec
| User Function Evaluation Time :      0.000 sec
|
| Total Function Evaluation Time:      0.007 sec
+--------------------------------------------------+
-> Alpha... 1.500000 
{'DVCon1_volume_constraint_0': 1.0000000000000275, 'DVCon1_thickness_constraints_0': array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
       1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
       1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
       1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
       1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
       1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]), 'wing_cd': 0.2013076110438874, 'wing_cl': 0.06794804493091523, 'fail': True}
funcs in obj: {'wing_cd': 0.2013076110438874, 'wing_cl': 0.06794804493091523, 'obj': 0.2013076110438874, 'cl_con_wing': -0.4320519550690848}
-> Alpha... 1.500000 
Solving adjoint: cd
-> Alpha... 1.500000 
Solving ADjoint Transpose with PETSc...
   0 KSP Residual norm 9.9073502558E-03
  10 KSP Residual norm 9.4374506920E-03
  20 KSP Residual norm 7.2158250155E-03
  30 KSP Residual norm 1.0992693836E-03
Killed
mdolabuser@1a792facbb13:~/mount/MACH-Aero-main/mytuto/opt/aero$ 
hntter commented 1 year ago

I also encountered the same problem. Then I changed another PC with larger RAM and it can run again. Maybe you can try to run it on another higer performance PC.

aozuzun commented 1 year ago

I followed exactly what you did, and the issue was resolved. However, it's interesting that increasing swap memory didn't make it work.

sseraj commented 1 year ago

Closing as resolved