CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2 > SU2 Installation

problem with running shape_optimization modul

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By rktchip

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2013, 12:20
Default problem with running shape_optimization modul
  #1
New Member
 
Edris
Join Date: May 2012
Posts: 6
Rep Power: 13
Edris is on a distinguished road
Hi every one.
I was trying to run one of the test-cases of shape optimization but I don't understand why when I used "shape_optimization.py module" the following errors appeared.


G:\naca0012>shape_optimization.py -f rot_NACA0012.cfg


-------------------------------------------------------------------------
| SU2 Suite (Shape Optimization Script) |
-------------------------------------------------------------------------


DRAG objective function with a scale factor of 1.0

NIT FC OBJFUN GNORM
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "C:\Program Files\Stanford ADL\SU2\bin\shape_optimization.py", line 678,
in <module>
acc=1e-12, iprint=2, full_output=1, epsilon=1.0e-10)
File "C:\Python27\lib\site-packages\scipy\optimize\slsqp.py", line 198, in fmi
n_slsqp
constraints=cons, **opts)
File "C:\Python27\lib\site-packages\scipy\optimize\slsqp.py", line 354, in _mi
nimize_slsqp
fx = func(x)
File "C:\Python27\lib\site-packages\scipy\optimize\optimize.py", line 261, in
function_wrapper
return function(x, *args)
File "C:\Program Files\Stanford ADL\SU2\bin\shape_optimization.py", line 246,
in f
logfile = 'SU2_CFD.out' )
File "C:\Program Files\Stanford ADL\SU2\bin\continuous_adjoint.py", line 205,
in continuous_adjoint
ObjFun_Dict = libSU2.get_ObjFunVals( History_filename_CFD+plotfile_ext , spe
cial_cases )
File "C:\Program Files\Stanford ADL\SU2\bin\libSU2.py", line 495, in get_ObjFu
nVals
history_data = read_History(History_filename)
File "C:\Program Files\Stanford ADL\SU2\bin\libSU2.py", line 404, in read_Hist
ory
history_file = open(History_filename)
IOError: [Errno 2] No such file or directory: 'history_opt_rot_NACA0012_cfd.plt'

How can I fix this problem?
please help me.
THANKs.
Edris is offline   Reply With Quote

Old   November 5, 2013, 19:34
Default
  #2
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
It looks like you are running this in windows, and SU2 is installed under Program Files. The command line call to the SU2 solver is failing because there is a space in the file path (Program Files). Try installing SU2 in a filepath with no spaces.
- Trent
Edris likes this.
rktchip is offline   Reply With Quote

Old   November 8, 2013, 11:36
Default
  #3
New Member
 
Edris
Join Date: May 2012
Posts: 6
Rep Power: 13
Edris is on a distinguished road
Quote:
Originally Posted by rktchip View Post
It looks like you are running this in windows, and SU2 is installed under Program Files. The command line call to the SU2 solver is failing because there is a space in the file path (Program Files). Try installing SU2 in a filepath with no spaces.
- Trent
Hi Trent.
Thank you. After installing SU2 in another location, It did worked, but I faced another errors.
First of all two warnings appeared at the beginning of the program, and after that the magnitude of res(Rho) started to increase (Is this increase of res(Rho) rational?). and after 327 iterations another errors appeared and the program stopped.

Please help me.
Thank you.

------------------------- Exit Success (SU2_MDC) ------------------------

WARNING: unrecognized option in the config. file: MG_RESTART_CYCLE.
WARNING: unrecognized option in the config. file: GRID_DEFORM_SOLVER.


-------------------------------------------------------------------------
| SU2 Suite (Computational Fluid Dynamics Code) |
-------------------------------------------------------------------------
.
.
.

------------------------------ Begin solver -----------------------------

Iter Time(s) Res[Rho] Res[RhoE] CLift(Total) CDrag(Total)
1 0.265500 -0.917870 4.515178 0.000003 0.000037
2 0.271000 -0.452282 4.977257 -0.000001 0.000028
3 0.273500 -0.353749 5.108401 -0.000003 0.000029
4 0.272000 -0.232687 5.215336 -0.000004 0.000028
.
.
.
.

325 0.264552 -5.266695 0.215158 -0.000020 0.000002
326 0.264413 -5.288482 0.192382 -0.000020 0.000002
327 0.264320 -5.312114 0.167788 -0.000020 0.000002

------------------------- Exit Success (SU2_CFD) ------------------------

Traceback (most recent call last):
File "C:\SU2\bin\shape_optimization.py", line 678, in <module>
acc=1e-12, iprint=2, full_output=1, epsilon=1.0e-10)
File "C:\Python27\lib\site-packages\scipy\optimize\slsqp.py", line 198, in fmi
n_slsqp
constraints=cons, **opts)
File "C:\Python27\lib\site-packages\scipy\optimize\slsqp.py", line 354, in _mi
nimize_slsqp
fx = func(x)
File "C:\Python27\lib\site-packages\scipy\optimize\optimize.py", line 261, in
function_wrapper
return function(x, *args)
File "C:\SU2\bin\shape_optimization.py", line 256, in f
rename_data()
File "C:\SU2\bin\shape_optimization.py", line 613, in rename_data
add_tecplot_iter( output_names[key][1] , counter )
File "C:\SU2\bin\shape_optimization.py", line 638, in add_tecplot_iter
os.rename("temp_file.plt",filename)
WindowsError: [Error 183] Cannot create a file when that file already exists
Edris is offline   Reply With Quote

Old   February 12, 2014, 14:52
Default
  #4
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
You can ignore the warnings, they are referring to extra config options that the C++ side doesn't know about. Your log shows that the solution converged (it is reporting an exponent of 10 - i.e 10^-5.3 - so you want to see the residuals go to larger negative numbers)

The python error is a bit strange, it looks windows is having trouble renaming a file. Could you try deleting the DESIGNS folder, and any .plt files in your working directory for this problem, and try again? If you still get an error, please post the full log, and your version of windows and python.

- trent
rktchip is offline   Reply With Quote

Old   October 23, 2014, 10:08
Default
  #5
Member
 
Lukasz Miroslaw
Join Date: Dec 2009
Location: Poland
Posts: 66
Rep Power: 16
Lukasz is on a distinguished road
Send a message via Skype™ to Lukasz
Quote:
Originally Posted by Edris View Post
Hi every one.
I was trying to run one of the test-cases of shape optimization but I don't understand why when I used "shape_optimization.py module" the following errors appeared.


G:\naca0012>shape_optimization.py -f rot_NACA0012.cfg


Congrats! I did not get that far

when starting shape_optimization.py -f rot_NACA0012.cfg

on original SU2 download on Windows I had to :
1. add ..\SU2\SU2_PY\SU2 directory from the sources to SU2 installation directory as described here. Otherwise I get "No module named SU2" error.

2. add additional line to __init__.py in C:\SU2\SU2\run\__init__.py

--> from . import interface
from interface import \ build command , ...

Otherwise
No module named 'interface' error is triggered.

When fixed I get similar errors for other submodules, e.g. io (no module named 'tools')

Maybe I should use Python 2.x instead of 3.x ?
Lukasz is offline   Reply With Quote

Old   October 23, 2014, 10:38
Default
  #6
Member
 
Lukasz Miroslaw
Join Date: Dec 2009
Location: Poland
Posts: 66
Rep Power: 16
Lukasz is on a distinguished road
Send a message via Skype™ to Lukasz
I reinstalled python to 2.7.x and it worked.

Now I am getting the following error:

PS C:\cygwin64\home\lmir\su2\optimization_euler\rotat ing_naca0012> python.exe c:\SU2\shape_optimization.py -f .\rot
ating_NACA0012.cfg
found: mesh_NACA0012_rot.su2
New Project: ./
Warning, removing old designs... now
New Design: DESIGNS/DSN_001
./DESIGNS/DSN_001
./DESIGNS/DSN_001
Evaluate Inequality Constraints
Max_Thickness... SU2 process was terminated by signal '125'
--------------------------------------------------------------------------
Sorry! You were supposed to get help about:
orterun:exe-not-accessible
But I couldn't open the help file:
C:\DBD\pvs-x64\install\share\openmpi\help-orterun.txt: No such file or directory. Sorry!
------

Any hint how to tackle this?

Last edited by Lukasz; October 24, 2014 at 01:17.
Lukasz is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parallel running of 3D multiphase turbulence model (unknown problem!!) MOHAMMAD67 OpenFOAM Running, Solving & CFD 7 November 23, 2015 10:53
Problem while running in Highperformance computing environment Phanipavan STAR-CD 1 September 11, 2013 06:42
running FLUENT on cluster problem cth_yao FLUENT 2 December 2, 2011 06:05
problem with running in parallel dhruv OpenFOAM 3 November 25, 2011 05:06
Kubuntu uses dash breaks All scripts in tutorials platopus OpenFOAM Bugs 8 April 15, 2008 07:52


All times are GMT -4. The time now is 07:56.