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

SU2 Parallel Computation problem

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2013, 16:52
Default SU2 Parallel Computation problem
  #1
New Member
 
Joe Gramanzini
Join Date: Jul 2012
Posts: 3
Rep Power: 10
Gramanzini is on a distinguished road
I am trying to get the parallel computation working for Windows 7, I and using a Structured grid to model an RAE 2822 airfoil, that works with the SU2 serial. When I try to use the parallel processing it gives me a Keyerror, I am not familiar with python, my command prompt show the following:

C:\ Program Files (x86)\Standford ADL\SU2\trunk\bin\windows\64-bit\Parallel> python parallel_computation.py -f turb_RAE.cfg -p 3

file "parallel_computation.py" line 27, in <module>
SU2_RUN = os.environ['SU2_RUN']
file "C:\Program Files (x86)\Standford ADL\SU2\trunk\bin\windows\64-bit\Parallel\os.py",line 423, in_getitem_ return self.data[key.upper()]
KeyError: 'SU2_RUN'

Any help would be greatly appreciated.
Gramanzini is offline   Reply With Quote

Old   June 28, 2013, 20:21
Default
  #2
New Member
 
Michael Colonno
Join Date: Jan 2013
Location: Stanford, CA
Posts: 28
Rep Power: 9
mcolonno is on a distinguished road
Please note that the Python scripts are not yet fully supported in Windows. You need to define the SU2_RUN environment variable in Windows for the parallel_computation.py script to work.
mcolonno is offline   Reply With Quote

Old   September 27, 2018, 15:52
Default SU2 windows 10 parallel computing
  #3
New Member
 
Join Date: Sep 2018
Location: Brazil (temporarily)
Posts: 2
Rep Power: 0
JMvanDijk is on a distinguished road
I am afraid that I won't be helping the TS anymore, since this thread is quite old. However I hope I can help some other SU2 users with the same problem. I downloaded 6.0.0 "Falcon" for windows from the download page of the SU2 website. I assume here that the reader managed to use sequential computing in windows CMD.

- Set python.exe as your standard program for ‘.py’ files (just press right mouse button on a ‘.py’ file and select open with -> choose another app -> make sure ‘always use this app for .py files’ is checked -> click python.exe -> click ok). If the program is not installed on you computer: download it from python.com and get+install the latest python 3 release. Let python add itself to your windows environment path (if it asks you to disable the maximum length for paths, please click yes).

- In my version there was an error in SU2/run/interface.py. At line 237, you should change {the_Command = 'SU2_SOL ' + tempname} to {the_Command = 'SU2_SOL%s %s' % (quote, tempname)} (both without the curly brackets).

- Open cmd and make the location where your simulation file is the current directory (cd).

- Then try to run your cfg-file in cmd by entering: ‘parallel_computation.py -f YOURSIMULATION.cfg -n 4’ if you have a 4-core computer (change the 4 if yours is different).

- The first time it probably gives one or more errors on missing modules. Numpy was missing in my case, so I entered ‘pip3 install numpy’ in cmd (doesn’t matter at which directory you are). If other modules are missing, some google searches will help you installing them.

- Make sure you are in your cfg-file's directory again and enter ‘parallel_computation.py -f YOURSIMULATION.cfg -n 4’ again.


Edit:
You can even make it yourself more comfortable by saving a file called SU2_PAR.bat in the same directory as for example SU2_CFD, with the following code in it: parallel_computation.py -f %~f1 -n 4
(again the four can be changed for a different number of cores). In this way you can just call any cfg file like you did with SU2_CFD, but now for the parallel version with SU2_PAR YOURSIMULATION.cfg, in the cmd-window.

Last edited by JMvanDijk; September 28, 2018 at 13:51.
JMvanDijk is offline   Reply With Quote

Old   September 27, 2018, 22:19
Default
  #4
New Member
 
Join Date: May 2018
Posts: 19
Rep Power: 4
lejonetfrannorden is on a distinguished road
Quote:
Originally Posted by JMvanDijk View Post
I am afraid that I won't be helping the TS anymore, since this thread is quite old. However I hope I can help some other SU2 users with the same problem. I downloaded 6.0.0 "Falcon" for windows from the download page of the SU2 website. I assume here that the reader managed to use sequential computing in windows CMD.

- Set python.exe as your standard program for ‘.py’ files (just press right mouse button on a ‘.py’ file and select open with -> choose another app -> make sure ‘always use this app for .py files’ is checked -> click python.exe -> click ok). If the program is not installed on you computer: download it from python.com and get+install the latest python 3 release. Let python add itself to your windows environment path (if it asks you to disable the maximum length for paths, please click yes).

- In my version there was an error in SU2/run/interface.py. At line 237, you should change {the_Command = 'SU2_SOL ' + tempname} to {the_Command = 'SU2_SOL%s %s' % (quote, tempname)} (both without the curly brackets).

- Open cmd and make the location where your simulation file is the current directory (cd).

- Then try to run your cfg-file in cmd by entering: ‘parallel_computation.py -f YOURSIMULATION.cfg -n 4’ if you have a 4-core computer (change the 4 if yours is different).

- The first time it probably gives one or more errors on missing modules. Numpy was missing in my case, so I entered ‘pip3 install numpy’ in cmd (doesn’t matter at which directory you are). If other modules are missing, some google searches will help you installing them.

- Make sure you are in your cfg-file's directory again and enter ‘parallel_computation.py -f YOURSIMULATION.cfg -n 4’ again.
Hello,

Thanks for sharing this! How did you exactly compile the parallel version in Windows? When I try the steps you have provided I get n number of separate serial jobs.
lejonetfrannorden is offline   Reply With Quote

Old   September 28, 2018, 08:19
Default
  #5
New Member
 
Join Date: Sep 2018
Location: Brazil (temporarily)
Posts: 2
Rep Power: 0
JMvanDijk is on a distinguished road
Quote:
Originally Posted by lejonetfrannorden View Post
Hello,

Thanks for sharing this! How did you exactly compile the parallel version in Windows? When I try the steps you have provided I get n number of separate serial jobs.
I do not recognize your situation, but let me explain how I run my simulations now (after the initalization of my previous post).

The only thing I now have to do to start a parallel computation is entering 'parallel_computation.py -f YOURSIMULATION.cfg -n 4' without the quotes in cmd. So when I want to run the quick start of SU2 (https://su2code.github.io/docs/Quick-Start/) in parallel, I do (so you should change the file directories to yours):
  • Start cmd.exe
  • Enter the directory of my .cfg file: cd C:\Program1\SU2\Quickstart\ in the cmd terminal.
  • then I enter parallel_computation.py -f Inv_NACA0012.cfg -n 4 in the cmd terminal.
  • Now it runs the whole simulation for me on 4 cores (the simulation time is reduced with almost a factor of 4 as expected), showing every iteration.
I cannot drop the file on top of the python file to run it, neither did I manage to do it in any other way, but this works for me. Please make sure that your windows path is (still) directing to the folder where SU2_CFD, SU2_SOL and parallel_computation.py are located.

Last edited by JMvanDijk; September 28, 2018 at 10:03.
JMvanDijk is offline   Reply With Quote

Old   September 29, 2018, 13:32
Default
  #6
hlk
Senior Member
 
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 10
hlk is on a distinguished road
Thanks for your interest in SU2.


What you describe is a common symptom of the parallel installation not succeeding in finding all the needed mpi libraries etc. Some of the things you can do to troubleshoot this are:
- remove or rename previous installations to ensure that you aren't accidentally calling them
- read through the config.log and look for any points where it was not able to find the mpi compilers (for example, mpicxx and mpicc) or any other errors



For reference (both for you and others who find this post), the parallel build directions are now here:
https://su2code.github.io/docs/Parallel-Build/



Quote:
Originally Posted by lejonetfrannorden View Post
Hello,

Thanks for sharing this! How did you exactly compile the parallel version in Windows? When I try the steps you have provided I get n number of separate serial jobs.
hlk is offline   Reply With Quote

Reply

Tags
key error, su2 parallel

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
problem of running parallel Fluent on linux cluster ivanbuz FLUENT 15 September 23, 2017 20:12
CFX parallel hp MPI problem fluidmechanics CFX 5 June 19, 2013 20:05
SU2 Parallel Computation pdp.aero SU2 Installation 5 June 19, 2013 15:02
problem in the CFX12.1 parallel computation BalanceChen ANSYS 2 July 7, 2011 11:26
Fluent parallel license problem brothershuai Main CFD Forum 0 July 1, 2009 16:41


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