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

Parallel Build for SU2 on Ubuntu

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2017, 19:36
Default Parallel Build for SU2 on Ubuntu
  #1
Member
 
MM
Join Date: Aug 2017
Posts: 30
Rep Power: 8
McAero is on a distinguished road
Hello All,
Excuse me, I am quite new to ubuntu and su2
I have installed SU2 4.0.0 " Cardinal " it`s supposed to be a parallel release but when I run a test case only single core is running, how can I use su2 for parallel computations
I read about some python scripts but I don`t understand how to make these processes.
I'd be very glad for your help
thanks very much for your help
McAero is offline   Reply With Quote

Old   November 9, 2017, 02:09
Default
  #2
New Member
 
Amir A. Abdelqodus
Join Date: Nov 2017
Posts: 7
Rep Power: 8
Amir Adib is on a distinguished road
Hi

Firstly,it's better to install the latest version of SU2. You can find the installation instructions on their website. Get it using git client.

secondly, did you compile it with mpi support? and added the environmental variables to the bash file?

if so you can run it in parallel using: mpirun -n j SU2_CFD ./file-name.cfg
[j is the number of cores]
Then SU2_SOL ./file-name.cfg after the simulation is solved, to generate the post processing files.

Or better use " parallel_computation.py -n j -f file-name.cfg " which is a python script to automate this whole process.
Amir Adib is offline   Reply With Quote

Old   November 9, 2017, 02:33
Default
  #3
New Member
 
Amir A. Abdelqodus
Join Date: Nov 2017
Posts: 7
Rep Power: 8
Amir Adib is on a distinguished road
You will need to install [python, mpi4py, numpy, scipy] in order for the python scripts to work.

https://github.com/su2code/SU2/wiki/Installation

you can use:
sudo apt-get install swig
sudo apt-get install python-pip
sudo pip install mpi4py numpy scipy
Amir Adib is offline   Reply With Quote

Old   November 9, 2017, 06:50
Default
  #4
Member
 
MM
Join Date: Aug 2017
Posts: 30
Rep Power: 8
McAero is on a distinguished road
Thanks very Much Amiradib for your reply it was very helpful
I am very grateful
i hope you can help me in another small inquiry related to the BC naming in the cfg file
I have a problem with running SU2 for a CGNS file ,
I have 2D mesh extruded - made by ICEM
I have Boundraies :
WALL
OPEN
OUT
FLUID
FLUID_2
when I run the code it give me this error

"The configuration file doesn't have any definition for marker FLUID_2D!!"

but when I use the 2D mesh only without two sym boundaries it worked ok


Loading CGNS data into SU2 data structures.
Three dimensional problem.
94548 interior elements.
127440 grid points.
5 surface markers.
717 boundary elements in index 0 (Marker = OPEN).
831 boundary elements in index 1 (Marker = OUT).
31516 boundary elements in index 2 (Marker = FLUID_2D).
The configuration file doesn't have any definition for marker FLUID_2D!!


I`d really appreciate your help

Thanks a lot )
McAero is offline   Reply With Quote

Old   November 9, 2017, 10:13
Default
  #5
New Member
 
Amir A. Abdelqodus
Join Date: Nov 2017
Posts: 7
Rep Power: 8
Amir Adib is on a distinguished road
You are welcome, I am glad I was able to help!

I am not sure if I understand your problem correctly, but as I understand you have 2 symmetry planes (FLUID & FLUID_2). If this is the case, try this in the BCs in the config file:

MARKER_SYM= ( FLUID, FLUID_2 )

and check these tutorials, maybe they will help:
https://github.com/su2code/SU2/wiki/Inviscid-ONERA-M6
or
https://github.com/su2code/SU2/wiki/Turbulent-ONERA-M6

If this doesn't work, paste your cfg. Maybe me or others can help.

Good luck!
Amir Adib is offline   Reply With Quote

Old   November 9, 2017, 13:03
Default
  #6
Member
 
MM
Join Date: Aug 2017
Posts: 30
Rep Power: 8
McAero is on a distinguished road
Thanks very much for your reply
the problem is in something called FLUID_2D in the CGNS file, I don`t have any part named FLUID_2D when I made it on ICEM and even the cfg file doesn`t have this word .

What do you recommend?
McAero is offline   Reply With Quote

Old   November 14, 2017, 13:28
Default
  #7
New Member
 
Amir A. Abdelqodus
Join Date: Nov 2017
Posts: 7
Rep Power: 8
Amir Adib is on a distinguished road
Hi!
I don't know the reason of this problem. Maybe try to generate the mesh from the beginning, and be careful with the part names. Hope this helps
Amir Adib is offline   Reply With Quote

Old   November 15, 2017, 06:56
Default
  #8
Member
 
MM
Join Date: Aug 2017
Posts: 30
Rep Power: 8
McAero is on a distinguished road
Thanks a lot
About the building up of parallel setup,
i discovered that i after adding the scipy numpy and mpi that the iterations are just repeated 4 times !
how to compile the code for parallel computations, as you said adding some variables to the bash file.
Excuse me, I am a very beginner user of Linux and tried to understand from github page of SU2 but couldn`t make it
can you give me the command lines for the compiling and how to use it
Thanks very much for your support
McAero is offline   Reply With Quote

Old   November 21, 2017, 12:30
Default
  #9
Member
 
Akshay Koodly
Join Date: Aug 2017
Location: The Netherlands
Posts: 43
Rep Power: 8
akoodlyr is on a distinguished road
Hi,

The instructions to install SU2 in parallel are specified here (https://github.com/su2code/SU2/wiki/Parallel-Build).

You have to use the enable mpi flag and specify the path to the location where mpicxx and mpicc (the parallel C++ and C compilers) are installed in your system.

The difference between building SU2 in parallel and serial is in the configure command -
To build in serial you have probably used

./configure --prefix=/path/to/install/SU2

For parallel you have to add extra flags to the configure command.The new command will be

./configure --prefix=/path/to/install/SU2 --enable-mpi --with-cc=/path/to/mpicc --with-cxx=/path/to/mpicxx

path/to/mpicc and /path/to/mpicxx must point to the local directories where mpicc and mpicxx are located in your machine.

After this you just do make install as before.

Re error when running SU2, it looks like there is some typo when specifying the boundary conditions. From the output you have posted, there is a marker named FLUID_2D in the mesh file but the cfg file contains definition for FLUID_2 and not FLUID_2D. Make sure the marker definitions in the cfg file and mesh file are same.

Cheers.
akoodlyr is offline   Reply With Quote

Old   October 26, 2018, 19:07
Default
  #10
Senior Member
 
Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9
PeterShi is on a distinguished road
Quote:
Originally Posted by Amir Adib View Post
Hi

Firstly,it's better to install the latest version of SU2. You can find the installation instructions on their website. Get it using git client.

secondly, did you compile it with mpi support? and added the environmental variables to the bash file?

if so you can run it in parallel using: mpirun -n j SU2_CFD ./file-name.cfg
[j is the number of cores]
Then SU2_SOL ./file-name.cfg after the simulation is solved, to generate the post processing files.

Or better use " parallel_computation.py -n j -f file-name.cfg " which is a python script to automate this whole process.
Hi Amir,

Do you know what is the difference using mpi and python scripts to run SU2 in parallel? Will the simulation time differ using two methods?

Thank you.

Best,
Peter
PeterShi is offline   Reply With Quote

Old   October 28, 2018, 12:30
Default
  #11
New Member
 
Amir A. Abdelqodus
Join Date: Nov 2017
Posts: 7
Rep Power: 8
Amir Adib is on a distinguished road
Hi Peter,

There is virtually no difference between using these two methods to run SU2, since the rule of the python scripts is to automate executing both the analysis and post processing. So, there is no difference in simulation time, but it is just more convenient to use the python script.

Hope this helps.
Amir Adib is offline   Reply With Quote

Old   October 28, 2018, 17:53
Default
  #12
Senior Member
 
Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9
PeterShi is on a distinguished road
Quote:
Originally Posted by Amir Adib View Post
Hi Peter,

There is virtually no difference between using these two methods to run SU2, since the rule of the python scripts is to automate executing both the analysis and post processing. So, there is no difference in simulation time, but it is just more convenient to use the python script.

Hope this helps.
Hi Amir,

Thank you for your reply.

But yesterday, I tested one case (500,000 cells) by running SU2 in serial and parallel with MPI, and parallel simulation was even slower than the serial case, which made me think MPI is probably not the right way to run SU2 in parallel.

Python parallel simulation does not work in my machine for now, I expect it will be faster than MPI.

Best regards,
Peter
PeterShi is offline   Reply With Quote

Reply


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
Error running simpleFoam in parallel Yuby OpenFOAM Running, Solving & CFD 14 October 7, 2021 04:38
chtMultiRegionSimpleFoam: crash on parallel run student666 OpenFOAM Running, Solving & CFD 3 April 20, 2017 11:05
Some questions about a multi region case run in parallel zfaraday OpenFOAM Running, Solving & CFD 5 February 23, 2017 10:25
[OpenFOAM.com] Error build a custom version of Qt 4.6.4 on ubuntu 12.04 makayasa OpenFOAM Installation 5 April 2, 2016 18:22
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 Amitava Majumdar Main CFD Forum 0 January 5, 1999 12:00


All times are GMT -4. The time now is 15:37.