CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   SU2 (http://www.cfd-online.com/Forums/su2/)
-   -   Error when parallel (http://www.cfd-online.com/Forums/su2/137456-error-when-parallel.html)

zkdkeen June 17, 2014 04:44

Error when parallel
 
Hello everyone, I am a new SU2 user. After finishing parallel installation on a cluster, I run the m6 example which yields the following error:
$ parallel_computation.py -f inv_ONERAM6.cfg -p 4
Traceback ...
File "usr/local/bin/parallel_computation.py" line27
Import SU2
File "usr/local/bin/SU2/___init___.py" line 3
from . Import run
^
SyntaxError : invalid syntax

And I am sure that I have done the parallel config right. So, is there any other possible reason for this?

Any suggestion will be appreciated.

454514566@qq.com June 17, 2014 22:30

I install the V3.2 in win7,but when paralleling,facing an similar error:
D:\>cd naca0012

D:\naca0012>parallel_computation.py -f inv_NACA0012.cfg -p 2
Traceback (most recent call last):
File "C:\SU2\parallel_computation.py", line 26, in <module>
import SU2
ImportError: No module named SU2

D:\naca0012>


I am looking forward to your rely

Doriris June 18, 2014 05:33

Simply copy the folder "SU2" from the folder "SU2_PY/" from the source files to the folder where the parallel_computation.py is located.

454514566@qq.com June 18, 2014 06:12

Quote:

Originally Posted by Doriris (Post 497535)
Simply copy the folder "SU2" from the folder "SU2_PY/" from the source files to the folder where the parallel_computation.py is located.

it is thesame as the before,I look the code,in the"parallel_computation.py"file:

.......
import os, sys, shutil, copy
from optparse import OptionParser
sys.path.append(os.environ['SU2_RUN'])
import SU2

# -------------------------------------------------------------------
# Main
# -------------------------------------------------------------------
......

The error is coming the "import SU2",I want to know why the "import SU2" is here and why the error is ImportError: No module named SU2
After I install the SU2 V3.2,I set the "SU2_CFD" and "SU2_RUN" as the "path" in environment variable like V3.1,Do I need do something else?
Look forward to your reply.

Doriris June 18, 2014 07:49

When I installed the 3.2 version, I went to C:\SU2 and it did not have any folders. The python script tries to import a folder called SU2, but it does not exist, nor are the require files present. What I did, was simply download the source code, and within that source code there is a folder called "SU2_PY". In that folder, there is a folder called "SU2", which is the folder that is missing in the windows installer. Copy that folder into your C:\SU2, such that there is a folder called SU2, including the file contents in folder C:\SU2.

To summarize:

Download the source code here:
https://github.com/su2code/SU2/archive/v3.2.0.zip

Copy the folder /SU2_PY/SU2 to C:\SU2

The folder C:\SU2 looks like:

Code:

2DChannel.py
3DChannel.py
change_version_number.py
compute_polar.py
compute_stability.py
config_gui.py
continuous_adjoint.py
documentation.txt
filter_adjoint.py
finite_differences.py
hdf5.dll
libiomp5md.dll
merge_solution.py
mesh_adaptation.py
mesh_deformation.py
package_structure.txt
package_tests.py
parallel_computation.py
parse_config.py
patient_designspace.py
set_ffd_design_var.py
shape_optimization.py
SU2/
SU2_CFD.exe
SU2_DEF.exe
SU2_DOT.exe
SU2_GEO.exe
SU2_MSH.exe
SU2_PRT.exe
SU2_SOL.exe
szip.dll
tecio.dll
zlib.dll

Good luck!


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