CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Error in running shape_optimization in parallel (https://www.cfd-online.com/Forums/su2/145206-error-running-shape_optimization-parallel.html)

zylanboluo December 1, 2014 02:22

Error in running shape_optimization in parallel
 
Hello,everyone!
I have some problems in running shape_optimization in parallel.I running SU2 on Ubuntu.
When I enter "python shape_optimization.py -f pitching_ONERAM6.cfg",it runs all right.But when I enter "python shape_optimization.py -f pitching_ONERAM6.cfg -n 4",it shows an error like below,

Traceback (most recent call last):
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/shape_optimization.py", line 130, in <module>
main()
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/shape_optimization.py", line 75, in main
options.step )
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/shape_optimization.py", line 113, in shape_optimization
SU2.opt.SLSQP(project,x0,xb,its)
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/SU2/opt/scipy_tools.py", line 102, in scipy_slsqp
epsilon = 1.0e-06 )
File "/home/gentai/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/scipy/optimize/slsqp.py", line 206, in fmin_slsqp
constraints=cons, **opts)
File "/home/gentai/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/scipy/optimize/slsqp.py", line 308, in _minimize_slsqp
mieq = sum(map(len, [atleast_1d(c['fun'](x, *c['args'])) for c in cons['ineq']]))
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/SU2/opt/scipy_tools.py", line 185, in con_cieq
cons = project.con_cieq(x)
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/SU2/opt/project.py", line 223, in con_cieq
return self._eval(konfig, func,dvs)
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/SU2/opt/project.py", line 172, in _eval
vals = design._eval(func,*args)
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/SU2/eval/design.py", line 132, in _eval
vals = eval_func(*inputs)
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/SU2/eval/design.py", line 422, in con_cieq
func = su2func(this_con,config,state)
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/SU2/eval/functions.py", line 75, in function
aerodynamics( config, state )
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/SU2/eval/functions.py", line 152, in aerodynamics
info = update_mesh(config,state)
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/SU2/eval/functions.py", line 548, in update_mesh
push.extend( names )
File "/home/gentai/Workzone/ZhuYing/SU2/SU2/bin/SU2/io/redirect.py", line 234, in __exit__
shutil.move(old_name,new_name)
File "/opt/software/Canopy/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/shutil.py", line 301, in move
copy2(src, real_dst)
File "/opt/software/Canopy/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/opt/software/Canopy/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/gentai/Workzone/ZhuYing/SU2/test_20141126/test_para/DESIGNS/DSN_001/DECOMP/mesh_ONERAM6_inv_1.su2'

Can someone help me?

best wishes!:)

Zen December 4, 2014 07:20

Quote:

IOError: [Errno 2] No such file or directory: '/home/gentai/Workzone/ZhuYing/SU2/test_20141126/test_para/DESIGNS/DSN_001/DECOMP/mesh_ONERAM6_inv_1.su2'
It seems that it doesn't decompose the mesh.

Does the command below work for you?

mpirun -n 4 SU2_PRT pitching_ONERAM6.cfg

zylanboluo December 7, 2014 21:31

Quote:

Originally Posted by Zen (Post 522458)
It seems that it doesn't decompose the mesh.

Does the command below work for you?

mpirun -n 4 SU2_PRT pitching_ONERAM6.cfg

Thank you very much, Zen!
I have tried "mpirun -n 4 SU2_PRT pitching_ONERAM6.cfg" ahead and after the commond "python shape_optimization.py -f pitching_ONERAM6.cfg" , it showed the same error!
I also just run "mpirun -n 4 SU2_PRT pitching_ONERAM6.cfg", no new mesh was generated!

Zen December 8, 2014 18:10

Quote:

Originally Posted by zylanboluo (Post 522847)
I also just run "mpirun -n 4 SU2_PRT pitching_ONERAM6.cfg", no new mesh was generated!

Is openmpi installed on your pc? did you get an error message if you run mpirun -n 4 SU2_PRT pitching_ONERAM6.cfg? or does it simply tun without partitioning the mesh?

zylanboluo December 9, 2014 04:37

Hi, Zen!
I have already installed mpich2.
if I run mpirun -n 4 SU2_PRT pitching_ONERAM6.cfg, it just read the grid without partitioning the mesh.

Zen December 9, 2014 04:52

mmm, maybe you did not configure SU2 for parallel computations? Other than that, I wouldn't know where else to look.

zylanboluo December 9, 2014 21:14

Thank you very much!
I will try to install SU2 again!


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