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

Step-by-step SU2 clean parallel Installation (Part 2/3)

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

Rating: 2 votes, 5.00 average.

Step-by-step SU2 clean parallel Installation (Part 2/3)

Posted July 27, 2014 at 21:12 by pdp.aero
Updated October 3, 2015 at 04:51 by pdp.aero (Updating to recent version 3.2.9)

Step 4: Scipy 0.11.0

First, we need be sure about the f2py, which is a requirement. Enter the below command and make sure you have it. You might find it in /usr/local/bin/f2py.
Code:
whereis f2py
In previous step, we checked that numpy is added to python 2.6.6 site package. Now we can go forward and build scipy. Download the source from here, unpack and follow the below commands in your desired directory.

Code:
sudo python setup.py build
sudo python setup.py install --prefix=/usr/local
In order to check the installationa and be sure that scipy is in python 2.6.6 site package, follow the below instruction.

Code:
python
help()
scipy
You must see the below description. Press q to exit the help and enter exit() to exit the python.

Code:
NAME
    scipy

FILE
    /usr/local/lib/python2.6/site-packages/scipy/__init__.py
Step 5: OpenMPI 1.6.3

We will installing both, OpenMPI and the MPICH in this step. First, for installing the OpenMPI, download the tar file from here, put it into you desired directory, unpack the tar file and direct there, then follow the commands accordingly.

Code:
mkdir openmpi_Linux
cd openmpi_Linux
../configure --prefix=/usr/local LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include
sudo make all install
MPICH 3.0.4

Download the tar file from here, and unpack the tar file into your desired place. Then, direct there, and follow the instructions.

Code:
./configure --prefix=/usr/local LDFLAGS=-L/usr/local/lib 2>&1 | tee c.txt
sudo make 2>&1 | tee m.txt
sudo make install 2>&1 | tee mi.txt
Add the below line to your .bashrc for setting path.

Code:
# MPICH
PATH=/usr/local/bin:$PATH ; export PATH
Make sure that you've got mpich and run a provided example.

Code:
which mpicc
which mpiexec
Code:
mpiexec -n 4 ./examples/cpi
you will get similar results:

Code:
Process 0 of 4 is on <computer name>
Process 1 of 4 is on <computer name>
Process 2 of 4 is on <computer name>
Process 3 of 4 is on <computer name>
pi is approximately 3.1415926544231239, Error is 0.0000000008333307
wall clock time = 0.000186
Step 6: Tcl 8.6.0

Download the tar file from here, put it in you desired directory, direct there, and follow the commands.

Code:
cd unix
./configure --prefix=/usr/local --enable-64bit LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include
sudo make
sudo make test
sudo make install
Step 7: Tk 8.6.0

Download the tar file from here, put it in you desired directory, direct there, and follow the commands.

Code:
cd unix
./configure --prefix=/usr/local --with-tcl=/usr/local/lib --enable-64bit LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include
sudo make
sudo make test
sudo make install
In the next step, we will building the CGNS library which needs cmake, X11, Xmu, OpenGL library, and Gawk, so before that, we continue installing the requirements.

Cmake

Code:
sudo apt-get install cmake cmake-curses-gui
X11, Xmu and OpenGL

Code:
sudo apt-get install mesa-utils mesa-common-dev freeglut3 freeglut3-dev binutils-gold
Then, download the libxmu 1.1.0 from here, put it in a right place, unpack the tar file, direct there, and follow the commands accordingly.

Code:
./configure --prefix=/usr/local LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include
sudo make
sudo make check
sudo make install
whereis libXmu will show you the library directory.

Gawk 4.0.1

Download the package from here, put it in a right place, unpack the tar file, go there and do the following.

Code:
./configure --prefix=/usr/local LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include
sudo make
sudo make install
Step 8: CGNS library 1.3.14

Download the tar file form here, put it in a directory, unpack the tar file, direct there, and do the following.

Code:
mkdir cgns_Linux
cd cgns_Linux
cmake /path/to/your/unpack/cgnslib-3.1.4
ccmake .
You will see a chart which illustrates options you have for configuring the CGNS, select them accordingly, and make sure to set shared off.

BUILD_CGNSTOOLS ON
CGNS_BUILD_SHARED OFF
CGNS_USE_SHARED ON
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/local
ENABLE_64BIT ON
ENABLE_FORTRAN ON
ENABLE_HDF5 OFF
ENABLE_SCOPING OFF
ENABLE_TESTS OFF
FORTRAN_NAMING LOWERCASE_

After setting the configuration, press c, and then g to generate the configure, and then do the following.

Code:
sudo make
sudo make install
Step 9: Jsoncpp 0.5.0

Download the package from here, unpack the source in your desired directory, direct there, and follow the commands.

Code:
sudo apt-get install scons
scons platform=linux-gcc
Step 10: LAPACK 3.5.0

You can download the last version from here. Then, unpack the tar file where you want to install the package, direct there, use the provided example makefile in the root, and remove the example from the file extension.

Code:
sudo make
sudo make lapackelib

Step 11: SU2 3.2.9

In this version, you don't need to specify the metis flags, it is added to the code as an external library, and it will be built automatically. After downloading the SU2 tar file from its Github link here, unpack the tar file in a proper directory, direct there, and configure it accordingly.

Code:
./configure --prefix=/usr/local/ --enable-tecio --enable-mpi --with-cc=/usr/local/bin/mpicc --with-cxx=/usr/local/bin/mpicxx CXXFLAGS="-O3" --with-CGNS-lib=/usr/local/lib --with-CGNS-include=/usr/local/include --with-Jsoncpp-lib=/path/to/jsoncpp-src-0.5.0/libs/linux-gcc-4.8 --with-Jsoncpp-include=/path/to/jsoncpp-src-0.5.0/include --with-LAPACK-lib=/path/to/lapack-3.5.0 --with-LAPACK-include=/path/to/lapack-3.5.0/lapacke/include
sudo make
sudo make check
sudo make install
Then, you need to set the environment variables according to your installation directory.

Code:
export SU2_RUN="/usr/local/bin"
export SU2_HOME="/path/to/your/unpack/SU2-3.2.9"
export PATH=$PATH:$SU2_RUN
export PYTHONPATH=$PYTHONPATH:$SU2_RUN
you can also add the above lines to your bashrc for not setting them every time.

Code:
sudo gedit ~/.bashrc
For cleaning the suite you can use the following commands in your SU2 directory.

Code:
sudo make clean
sudo make uninstall
Note: Due to the character limitation, I am dividing this blog into 3 parts. The second part has been finished here, so please follow the rest in the Part 3/3. Also, the backward link to the previous section is Part 1/3.
Posted in Uncategorized
Views 2374 Comments 3 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 3

Comments

  1. Old Comment
    Hi pdp.aero!

    Thank you very much for this tutorial, it's well detailed and looks complete.

    But I don't understand why installing 2 MPI implementations at a time?

    I can understand that it's preferable to install one of them depending on the OS (MPICH is Linux friendly and Open MPI is alot easier to setup on Mac OSX), but why both?

    Best regards,
    Ouissem
    permalink
    Posted October 29, 2015 at 07:54 by B_Ouissem B_Ouissem is offline
  2. Old Comment
    Hi Quissem,

    You are welcome.

    That's right. It depends on your prefer. I just included them both for users with different tastes. I didn't mean you have to have them both to make it works. I installed them both to compare the performance. Besides, I also was interested in trying OpenMP on that time. At the current time, SU2 supports MPI.

    Regards,
    Payam
    permalink
    Posted October 29, 2015 at 08:32 by pdp.aero pdp.aero is offline
  3. Old Comment
    Hi pdp.aero!

    Thank you very much for the detailed steps. Can you give the steps for parallel installation of SU2 in Windows?
    I managed to compile it in Visual Studio and it is running successfully in serial in Windows. However, I could not make it run in parallel. Please guide me.
    permalink
    Posted March 23, 2016 at 02:49 by Oshin Oshin is offline
 

All times are GMT -4. The time now is 14:34.