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

'utf-8' codec problem when using multiple cores in shape_optimization.py

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2021, 06:16
Post 'utf-8' codec problem when using multiple cores in shape_optimization.py
  #1
New Member
 
Andrea Michelotti
Join Date: Mar 2021
Posts: 12
Rep Power: 5
AndreaMichelotti is on a distinguished road
Hello everyone,

I am using the shape_optimization.py python script to complete the Design Features tutorials but when I run the configuration file with -n 4 option:

Code:
python shape_optimization.py -n 4 -g CONTINUOUS_ADJOINT -o SLSQP -f inv_NACA0012_basic.cfg
I also tried DISCRETE_ADJOINT as used in the second tutorial but I receive the same error:

Code:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8a in position 14: invalid start byte
The full log is:

Code:
Traceback (most recent call last):
  File "X:\Programmi\SU2\bin\shape_optimization.py", line 183, in <module>
    main()
  File "X:\Programmi\SU2\bin\shape_optimization.py", line 92, in main
    shape_optimization( options.filename    ,
  File "X:\Programmi\SU2\bin\shape_optimization.py", line 159, in shape_optimization
    SU2.opt.SLSQP(project,x0,xb,its,accu)
  File "X:\Programmi\SU2\bin\SU2\opt\scipy_tools.py", line 120, in scipy_slsqp
    outputs = fmin_slsqp( x0             = x0             ,
  File "C:\Users\andre\AppData\Local\Programs\Python\Python39\lib\site-packages\scipy\optimize\slsqp.py", line 207, in fmin_slsqp
    res = _minimize_slsqp(func, x0, args, jac=fprime, bounds=bounds,
  File "C:\Users\andre\AppData\Local\Programs\Python\Python39\lib\site-packages\scipy\optimize\slsqp.py", line 375, in _minimize_slsqp
    sf = _prepare_scalar_function(func, x, jac=jac, args=args, epsilon=eps,
  File "C:\Users\andre\AppData\Local\Programs\Python\Python39\lib\site-packages\scipy\optimize\optimize.py", line 261, in _prepare_scalar_function
    sf = ScalarFunction(fun, x0, args, grad, hess,
  File "C:\Users\andre\AppData\Local\Programs\Python\Python39\lib\site-packages\scipy\optimize\_differentiable_functions.py", line 140, in __init__
    self._update_fun()
  File "C:\Users\andre\AppData\Local\Programs\Python\Python39\lib\site-packages\scipy\optimize\_differentiable_functions.py", line 233, in _update_fun
    self._update_fun_impl()
  File "C:\Users\andre\AppData\Local\Programs\Python\Python39\lib\site-packages\scipy\optimize\_differentiable_functions.py", line 137, in update_fun
    self.f = fun_wrapped(self.x)
  File "C:\Users\andre\AppData\Local\Programs\Python\Python39\lib\site-packages\scipy\optimize\_differentiable_functions.py", line 134, in fun_wrapped
    return fun(np.copy(x), *args)
  File "X:\Programmi\SU2\bin\SU2\opt\scipy_tools.py", line 383, in obj_f
    obj_list = project.obj_f(x)
  File "X:\Programmi\SU2\bin\SU2\opt\project.py", line 237, in obj_f
    return self._eval(konfig, func,dvs)
  File "X:\Programmi\SU2\bin\SU2\opt\project.py", line 206, in _eval
    vals = design._eval(func,*args)
  File "X:\Programmi\SU2\bin\SU2\eval\design.py", line 147, in _eval
    vals = eval_func(*inputs)
  File "X:\Programmi\SU2\bin\SU2\eval\design.py", line 244, in obj_f
    func += su2func(this_obj,config,state) * sign * scale * global_factor
  File "X:\Programmi\SU2\bin\SU2\eval\functions.py", line 92, in function
    aerodynamics( config, state )
  File "X:\Programmi\SU2\bin\SU2\eval\functions.py", line 274, in aerodynamics
    info = su2run.direct(config)
  File "X:\Programmi\SU2\bin\SU2\run\direct.py", line 77, in direct
    SU2_CFD(konfig)
  File "X:\Programmi\SU2\bin\SU2\run\interface.py", line 112, in CFD
    run_command( the_Command )
  File "X:\Programmi\SU2\bin\SU2\run\interface.py", line 258, in run_command
    message = proc.stderr.read().decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8a in position 14: invalid start byte
I am using the binary executable V.7.2.0 with MPI on Windows 10.

May be that the problem so I have to compile it from source?

Being a python script which automates the procedure, I can re-write it to include mpiexec -n #cores when running the DIRECT and the ADJ problem but I would like to know what I am doing wrong. For the DIRECT problem, I can use mpiexec -n #cores fine.

Thank you for any help
AndreaMichelotti is offline   Reply With Quote

Reply

Tags
design optimization, mpi, shape_optimization


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
Multiple Injection Points CCL problem Whitebear CFX 0 July 25, 2018 01:11
Multiple body cfd problem Panri93 FLUENT 0 November 28, 2016 10:49
Problem to Post New Threads in Forums Solved jola Site News & Announcements 0 November 12, 2016 21:03
problem with multiple water jet impingement simulation Umro mostafa FLUENT 0 September 30, 2016 17:57
Multiple inlets problem Jeff Main CFD Forum 2 August 17, 2005 11:48


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