Skip to content
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

Faulty source code of SLSQP.py - airfoil_opt.py #137

Closed
Hokage7940 opened this issue Dec 29, 2023 · 1 comment
Closed

Faulty source code of SLSQP.py - airfoil_opt.py #137

Hokage7940 opened this issue Dec 29, 2023 · 1 comment

Comments

@Hokage7940
Copy link

Description

The problem is related to the Airfoil optimization MACH Aero framework of MDO Lab. While running the airfoil_opt.py code, it gives an error indicating that there is an error in the SLSQP.py

Steps to reproduce issue

Run Bash in windows. Enter the docker through bash and run the following,

  1. Run genMesh.py
  2. Run genFFD.py
  3. Run airfoil_opt.py

Current behavior

When I run "mpirun -np 4 python airfoil_opt.py | tee output.txt" in bash, the program runs properly till the following:

+-------------------------------------------------------------------------------+
|                   Sparsity structure of constraint Jacobian                   |               |
+-------------------------------------------------------------------------------+

Then it displays the following error:

ValueError: failed to initialize intent(inout) array -- expected elsize=8 but got 16 -- input 'D' not compatible to 'd'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/mdolabuser/mount/mach-aero/SA7038/airfoil_opt.py", line 270, in <module>
    sol = opt(optProb, MP.sens, storeHistory=os.path.join(args.output, "opt.hst"))
  File "/home/mdolabuser/.pyenv/versions/3.9.16/lib/python3.9/site-packages/pyoptsparse/pySLSQP/pySLSQP.py", line 218, in __call__
    slsqp.slsqp(m, meq, la, n, xs, blx, bux, ff, gg, df, dg, acc, maxit,
ValueError: failed in converting 5th argument `x' of slsqp.slsqp to C/Fortran array

Expected behavior

it should produce results similar to the results provided in the following:
https://mdolab-mach-aero.readthedocs-hosted.com/en/latest/machAeroTutorials/airfoilopt_singlepoint.html

Note:
You can excess the pySLSQP.py at:
https://github.com/mdolab/pyoptsparse/tree/main/pyoptsparse/pySLSQP

@ewu63
Copy link
Collaborator

ewu63 commented Jan 5, 2024

Duplicate of #96.

@ewu63 ewu63 closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants