CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   SU2 Shape Design (http://www.cfd-online.com/Forums/su2-shape-design/)
-   -   problem in shape optimization test (http://www.cfd-online.com/Forums/su2-shape-design/129907-problem-shape-optimization-test.html)

adam_annie February 15, 2014 23:48

problem in shape optimization test
 
hello

I also have problem in runing shape_optimization(tutorial 7 in su2 website). I install the SU2-3.0.000-32-bit-Single-threaded.exe, python 2.6.6,scipy 0.11.0 and numpy 1.6.2 with windows 7 os.

When I tried to run the test case of rotating airfoil at command prompt:

python "D:\Program Files\SU2\shape_optimization.py" -f rot_NACA0012.cfg

Follwing error displayed:

found: mesh_NACA0012_rot.su2
New Project: ./
Warning, removing old designs... now
New Design: DESIGNS/DSN_001
./DESIGNS/DSN_001
./DESIGNS/DSN_001
NIT FC OBJFUN GNORM
./DESIGNS/DSN_001
Evaluate Objectives
Drag... Traceback (most recent call last):
File "D:\Program Files\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\Program Files\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\Program Files\SU2\shape_optimization.py", line 107, in shape_optimization
SU2.opt.SLSQP(project,x0,xb,its)
File "D:\Program Files\SU2\SU2\opt\scipy_tools.py", line 102, in scipy_slsqp
epsilon = 1.0e-06 )
File "D:\Python26\lib\site-packages\scipy\optimize\slsqp.py", line 196, in fmi
n_slsqp
constraints=cons, **opts)
File "D:\Python26\lib\site-packages\scipy\optimize\slsqp.py", line 351, in _mi
nimize_slsqp
fx = func(x)
File "D:\Python26\lib\site-packages\scipy\optimize\optimize.py", line 268, in
function_wrapper
return function(x, *args)
File "D:\Program Files\SU2\SU2\opt\scipy_tools.py", line 120, in obj_f
obj = project.obj_f(x)
File "D:\Program Files\SU2\SU2\opt\project.py", line 203, in obj_f
return self._eval(konfig, func,dvs)
File "D:\Program Files\SU2\SU2\opt\project.py", line 172, in _eval
vals = design._eval(func,*args)
File "D:\Program Files\SU2\SU2\eval\design.py", line 132, in _eval
vals = eval_func(*inputs)
File "D:\Program Files\SU2\SU2\eval\design.py", line 230, in obj_f
func = su2func(this_obj,config,state)
File "D:\Program Files\SU2\SU2\eval\functions.py", line 75, in function
aerodynamics( config, state )
File "D:\Program Files\SU2\SU2\eval\functions.py", line 200, in aerodynamics
info = su2run.direct(config)
File "D:\Program Files\SU2\SU2\run\direct.py", line 75, in direct
SU2_CFD(konfig)
File "D:\Program Files\SU2\SU2\run\interface.py", line 92, in CFD
the_Command = build_command( the_Command , processes )
File "D:\Program Files\SU2\SU2\run\interface.py", line 255, in build_command
raise RuntimeError , 'could not find an mpi interface'
RuntimeError: could not find an mpi interface
E:\su2\case\naca0012>

///////////////////////////////////////////////////////////////////////////////
if I use following command
python "D:\Program Files\SU2\shape_optimization.py" f rot_NACA0012.cfg
Follwing error displayed:

Traceback (most recent call last):
File "D:\Program Files\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\Program Files\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\Program Files\SU2\shape_optimization.py", line 85, in shape_optimization
config = SU2.io.Config(filename)
File "D:\Program Files\SU2\SU2\io\config.py", line 84, in __init__
super(Config,self).__init__(*args,**kwarg)
File "D:\Program Files\SU2\SU2\util\ordered_bunch.py", line 83, in __init__
super(OrderedBunch,self).__init__(*args,**kwarg)
File "D:\Program Files\SU2\SU2\util\ordered_dict.py", line 44, in __init__
self.__update(*args, **kwds)
File "D:\Program Files\SU2\SU2\util\ordered_dict.py", line 170, in update
for key, value in other:
TypeError: 'NoneType' object is not iterable

I have set PYTHONPATH enviroment variable including "D:\Program Files\SU2"; can you give me some help?

Best wish

adam_annie February 15, 2014 23:50

problem in shape optimization test
 
hello

I also have problem in runing shape_optimization(tutorial 7 in su2 website). I install the SU2-3.0.000-32-bit-Single-threaded.exe, python 2.6.6,scipy 0.11.0 and numpy 1.6.2 with windows 7 os.

When I tried to run the test case of rotating airfoil at command prompt:

python "D:\Program Files\SU2\shape_optimization.py" -f rot_NACA0012.cfg

Follwing error displayed:

found: mesh_NACA0012_rot.su2
New Project: ./
Warning, removing old designs... now
New Design: DESIGNS/DSN_001
./DESIGNS/DSN_001
./DESIGNS/DSN_001
NIT FC OBJFUN GNORM
./DESIGNS/DSN_001
Evaluate Objectives
Drag... Traceback (most recent call last):
File "D:\Program Files\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\Program Files\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\Program Files\SU2\shape_optimization.py", line 107, in shape_optimization
SU2.opt.SLSQP(project,x0,xb,its)
File "D:\Program Files\SU2\SU2\opt\scipy_tools.py", line 102, in scipy_slsqp
epsilon = 1.0e-06 )
File "D:\Python26\lib\site-packages\scipy\optimize\slsqp.py", line 196, in fmi
n_slsqp
constraints=cons, **opts)
File "D:\Python26\lib\site-packages\scipy\optimize\slsqp.py", line 351, in _mi
nimize_slsqp
fx = func(x)
File "D:\Python26\lib\site-packages\scipy\optimize\optimize.py", line 268, in
function_wrapper
return function(x, *args)
File "D:\Program Files\SU2\SU2\opt\scipy_tools.py", line 120, in obj_f
obj = project.obj_f(x)
File "D:\Program Files\SU2\SU2\opt\project.py", line 203, in obj_f
return self._eval(konfig, func,dvs)
File "D:\Program Files\SU2\SU2\opt\project.py", line 172, in _eval
vals = design._eval(func,*args)
File "D:\Program Files\SU2\SU2\eval\design.py", line 132, in _eval
vals = eval_func(*inputs)
File "D:\Program Files\SU2\SU2\eval\design.py", line 230, in obj_f
func = su2func(this_obj,config,state)
File "D:\Program Files\SU2\SU2\eval\functions.py", line 75, in function
aerodynamics( config, state )
File "D:\Program Files\SU2\SU2\eval\functions.py", line 200, in aerodynamics
info = su2run.direct(config)
File "D:\Program Files\SU2\SU2\run\direct.py", line 75, in direct
SU2_CFD(konfig)
File "D:\Program Files\SU2\SU2\run\interface.py", line 92, in CFD
the_Command = build_command( the_Command , processes )
File "D:\Program Files\SU2\SU2\run\interface.py", line 255, in build_command
raise RuntimeError , 'could not find an mpi interface'
RuntimeError: could not find an mpi interface
E:\su2\case\naca0012>

///////////////////////////////////////////////////////////////////////////////
if I use following command
python "D:\Program Files\SU2\shape_optimization.py" f rot_NACA0012.cfg
Follwing error displayed:

Traceback (most recent call last):
File "D:\Program Files\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\Program Files\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\Program Files\SU2\shape_optimization.py", line 85, in shape_optimization
config = SU2.io.Config(filename)
File "D:\Program Files\SU2\SU2\io\config.py", line 84, in __init__
super(Config,self).__init__(*args,**kwarg)
File "D:\Program Files\SU2\SU2\util\ordered_bunch.py", line 83, in __init__
super(OrderedBunch,self).__init__(*args,**kwarg)
File "D:\Program Files\SU2\SU2\util\ordered_dict.py", line 44, in __init__
self.__update(*args, **kwds)
File "D:\Program Files\SU2\SU2\util\ordered_dict.py", line 170, in update
for key, value in other:
TypeError: 'NoneType' object is not iterable

I have set PYTHONPATH enviroment variable including "D:\Program Files\SU2"; can you give me some help?

Best wish :)

rktchip February 16, 2014 17:36

Hi Yibin,

Shape optimization defaults to a 1-processor mpi call, which is why you are getting that error message. Please add the option -p 0 to your command call, to run this command in serial mode.

Best,
- rkchip

adam_annie February 18, 2014 09:07

hi rkchip

Thanks for your help. Following your suggestion and I reinstall the su2 in C:\SU2 path, then everything is ok!

thank you

best wish:)

Quote:

Originally Posted by rktchip (Post 475239)
Hi Yibin,

Shape optimization defaults to a 1-processor mpi call, which is why you are getting that error message. Please add the option -p 0 to your command call, to run this command in serial mode.

Best,
- rkchip


Bachduong April 15, 2014 03:27

3 Attachment(s)
Dear sirs :)
I also have problem while trying to run shape_optimization.py (tutorial 7 in test case). I install SU2-3.0.000-64-bit-parallel-threaded.exe, python 2.7.6, scipy 0.13.0-py27 and numpy MKL 1.8 –py27
I set my SU2_HOME=C:\SU2;SU2_RUN=C:\SU2;C:\SU2\SU2;PYTHONPA TH=C:\SU2;
I also add C:\SU2 in path environment.
What is wrong?

Thanks for your answers.
Attachment 30161

Attachment 30162

Tsiolkovsky April 23, 2014 14:32

I have the same problem, but since I am a complete novice in python I haven't been able to understand the reason.

I'm trying to run the rotating NACA 0012 tutorial and I'm getting this error:

TypeError: 'NoneType' object is not iterable

Thanks in advance for your help!

wangjl May 3, 2014 00:41

add -p 0, still error
 
C:\work\su2\naca0012>shape_optimization.py f rot_NACA0012.cfg -p 0

Traceback (most recent call last):
File "D:\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\SU2\shape_optimization.py", line 85, in shape_optimization
config = SU2.io.Config(filename)
File "D:\SU2\SU2\io\config.py", line 84, in __init__
super(Config,self).__init__(*args,**kwarg)
File "D:\SU2\SU2\util\ordered_bunch.py", line 83, in __init__
super(OrderedBunch,self).__init__(*args,**kwarg)
File "D:\SU2\SU2\util\ordered_dict.py", line 44, in __init__
self.__update(*args, **kwds)
File "D:\SU2\SU2\util\ordered_dict.py", line 170, in update
for key, value in other:
TypeError: 'NoneType' object is not iterable


Quote:

Originally Posted by rktchip (Post 475239)
Hi Yibin,

Shape optimization defaults to a 1-processor mpi call, which is why you are getting that error message. Please add the option -p 0 to your command call, to run this command in serial mode.

Best,
- rkchip


Bachduong May 7, 2014 03:08

Quote:

Originally Posted by wangjl (Post 489554)
C:\work\su2\naca0012>shape_optimization.py f rot_NACA0012.cfg -p 0

Traceback (most recent call last):
File "D:\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\SU2\shape_optimization.py", line 85, in shape_optimization
config = SU2.io.Config(filename)
File "D:\SU2\SU2\io\config.py", line 84, in __init__
super(Config,self).__init__(*args,**kwarg)
File "D:\SU2\SU2\util\ordered_bunch.py", line 83, in __init__
super(OrderedBunch,self).__init__(*args,**kwarg)
File "D:\SU2\SU2\util\ordered_dict.py", line 44, in __init__
self.__update(*args, **kwds)
File "D:\SU2\SU2\util\ordered_dict.py", line 170, in update
for key, value in other:
TypeError: 'NoneType' object is not iterable

Hi
You need write
C:\work\su2\naca0012>shape_optimization.py -f rot_NACA0012.cfg -p 0
rather than
C:\work\su2\naca0012>shape_optimization.py f rot_NACA0012.cfg -p 0

alljoyland May 7, 2014 03:32

yes you are right
 
Thank you very much, the tutorial manual was error miss the "-" before the f
and if is on windows, earlier version python have the NodeType error, should to change the __ini__ file

Thanks

Quote:

Originally Posted by Bachduong (Post 490259)
Hi
You need write
C:\work\su2\naca0012>shape_optimization.py -f rot_NACA0012.cfg -p 0
rather than
C:\work\su2\naca0012>shape_optimization.py f rot_NACA0012.cfg -p 0


rktchip June 5, 2014 14:56

Thanks everyone, we fixed the tutorial

novedevon October 14, 2014 18:41

I had the same problem with the inv_oneram6_adv.cfg (Optimized_euler/steady_oneram6). I noted that you said you fixed the tutorial and wanted to make sure that this one also got fixed.


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