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

Another shape optimization tutorial error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 3, 2013, 11:08
Default Another shape optimization tutorial error
  #1
New Member
 
Greg Power
Join Date: Jan 2013
Posts: 9
Rep Power: 13
grjmpower is on a distinguished road
I have run the Tutorial 9 case on two different Linux systems: my personal 2 core OpenSUSE system (gnu compilers) and a large CRAY HPC system (PGI compilers). I am following the new tutorial instructions, except that I do not copy the files into the SU2Py directory, but rely on the fact that the executables and Python scripts are in my path.

I made sure I had the most recent version of the code and test cases. The SU2_MDC code ran successfully and I made the changes to the input file to point to the new mesh file.

I can run shape_optimization.py with -p 1 and the CFD solution part runs successfully.

If I run shape_optimization.py with the -p option, then the mesh files do not exist. Apparently the SU2_DDC code is not being called in this case since multiple mesh files do not exist. If I run SU2_DDC first, then the mesh files are there and the first CFD solution is run successfully.

I can also run parallel_computation.py to get the initial solution and change the input to RESTART = YES

However, when running the shape_optimization.py the following error occurs after successfully running the CFD portion whether running with 1 or multiple processors:

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

Application 5022852 resources: utime ~4593s, stime ~82s


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


DRAG objective function with a scale factor of 100.0

Traceback (most recent call last):
File "/lustre/scratch/grjmpower/local/bin/shape_optimization.py", line 676, in <module>
acc=1e-12, iprint=2, full_output=1, epsilon=1.0e-10)
File "/sw/xt/python/2.7.1/sles11.1_gnu4.3.2/lib/python2.7/site-packages/scipy/optimize/slsqp.py", line 237, in fmin_slsqp
mieq = len(f_ieqcons(x))
File "/sw/xt/python/2.7.1/sles11.1_gnu4.3.2/lib/python2.7/site-packages/scipy/optimize/optimize.py", line 176, in function_wrapper
return function(x, *args)
File "/lustre/scratch/grjmpower/local/bin/shape_optimization.py", line 463, in ieqcons
logfile = 'SU2_CFD.out' )
File "/lustre/scratch/grjmpower/local/bin/continuous_adjoint.py", line 203, in continuous_adjoint
ObjFun_Dict = libSU2.get_ObjFunVals( History_filename_CFD+plotfile_ext , special_cases )
File "/lustre/scratch/grjmpower/local/bin/libSU2.py", line 495, in get_ObjFunVals
history_data = read_History(History_filename)
File "/lustre/scratch/grjmpower/local/bin/libSU2.py", line 411, in read_History
line = line.split("=")[1].strip().split(",")
IndexError: list index out of range

The Python version is 2.6.8 on both platforms.
grjmpower is offline   Reply With Quote

Old   February 5, 2013, 01:42
Default
  #2
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
would you mind posting the full console output (including the command line call) that generates this, as well as the config file? thanks!
rktchip is offline   Reply With Quote

Old   February 5, 2013, 19:05
Default
  #3
New Member
 
Greg Power
Join Date: Jan 2013
Posts: 9
Rep Power: 13
grjmpower is on a distinguished road
The commands, configuration file and output from the MDC and shape_optimization.py are attached.

Thanks!
Attached Files
File Type: txt commands.txt (263 Bytes, 9 views)
File Type: txt FFD.txt (26.9 KB, 7 views)
File Type: txt inv_ONERAM6.cfg_FFD.txt (13.2 KB, 6 views)
File Type: txt inv_ONERAM6.cfg_orig.txt (13.2 KB, 2 views)
File Type: txt MDC.txt (2.7 KB, 2 views)
grjmpower is offline   Reply With Quote

Old   February 5, 2013, 19:10
Default
  #4
Member
 
Eduardo Molina
Join Date: Sep 2010
Location: Brazil
Posts: 35
Rep Power: 16
EMolina is on a distinguished road
Hi all,

I am facing almost the same problem running the inviscid Onera Optimization Test case. I installed Numpy and Scipy from "apt-get install" and I got the following error. After I removed the old Numpy and Scipy and install the updated version of both softwares from source forge and the same error persists. I am running Ubuntu 12.04 LTS, Python 2.7.3, numpy 1.6.2 and Scipy 0.11.0.

One intersting thing is that the version 1.1 had run ok on the same tutorial. Just a question, I remember seeing someone using Ubuntu in the SU2 V2.2 workshop last month, which version he was using? It was you, Trent?

I'm breaking my head in the last three days and I do not understand what is happening. I have attached the prompt output with the error and the config file.

Any help is welcome.

Thank you in advance.

Eduardo



molina@Desktop-Molina:~/Documentos/Programas/SU2v2.0/TestCases/cont_adj_euler/oneram6$ python shape_optimization.py -f inv_ONERAM6.cfg -p 1 >> log.txt
Traceback (most recent call last):
File "shape_optimization.py", line 676, in <module>
acc=1e-12, iprint=2, full_output=1, epsilon=1.0e-10)
File "/usr/local/lib/python2.7/dist-packages/scipy/optimize/slsqp.py", line 196, in fmin_slsqp
constraints=cons, **opts)
File "/usr/local/lib/python2.7/dist-packages/scipy/optimize/slsqp.py", line 351, in _minimize_slsqp
fx = func(x)
File "/usr/local/lib/python2.7/dist-packages/scipy/optimize/optimize.py", line 268, in function_wrapper
return function(x, *args)
File "shape_optimization.py", line 245, in f
logfile = 'SU2_CFD.out' )
File "/home/molina/Documentos/Programas/SU2v2.0/TestCases/cont_adj_euler/oneram6/continuous_adjoint.py", line 203, in continuous_adjoint
ObjFun_Dict = libSU2.get_ObjFunVals( History_filename_CFD+plotfile_ext , special_cases )
File "/home/molina/Documentos/Programas/SU2v2.0/TestCases/cont_adj_euler/oneram6/libSU2.py", line 495, in get_ObjFunVals
history_data = read_History(History_filename)
File "/home/molina/Documentos/Programas/SU2v2.0/TestCases/cont_adj_euler/oneram6/libSU2.py", line 411, in read_History
line = line.split("=")[1].strip().split(",")
IndexError: list index out of range
Attached Files
File Type: gz Files_SU2_error.tar.gz (13.3 KB, 2 views)
EMolina is offline   Reply With Quote

Old   February 6, 2013, 08:02
Default
  #5
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
Thanks alot for posting your files, they were very helpful.

It looks like we missed the paraview plot format in the read_history() function in libSU2.py. Would you please try replacing the file with this? <libSU2.zip>

Best,
- Trent
rktchip is offline   Reply With Quote

Old   February 6, 2013, 20:25
Default
  #6
Member
 
Eduardo Molina
Join Date: Sep 2010
Location: Brazil
Posts: 35
Rep Power: 16
EMolina is on a distinguished road
Thanks a lot....

It is working now...
EMolina is offline   Reply With Quote

Old   February 7, 2013, 04:12
Default
  #7
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
Great! Sorry that caused so much headache...
rktchip is offline   Reply With Quote

Reply

Tags
optimization, testcases


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
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 46 March 6, 2022 14:21
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 19:00
UDF: DEFINE_CG_MOTION for vertical jump motion of an electrode! alban Fluent UDF and Scheme Programming 2 June 8, 2010 19:54
user defined function cfduser CFX 0 April 29, 2006 11:58
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


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