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

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

Register Blogs Community New Posts Updated Threads Search

Rate this Entry

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

Posted July 27, 2014 at 21:15 by pdp.aero
Updated October 4, 2015 at 12:28 by pdp.aero (Updating to recent version)

For the past

In this section, we are going to install the SU2 2.0.2, pretty old version comparing to current version 3.2.0, and then SU2 2.0.10, after we will finally install the SU2 3.0.0. Again, download the tar file, put the source in a right place, and unpack it. Before building these versions we will need the stands-alone metis.

Metis 4.0.3

Download the tar file from here, put it in your SU2 2.0.2 trunk, then unpack the tar file and direct there. Edit the Makefile.in accordingly.

Code:
# Which compiler to use
CC = gcc
After editing the makefile, and saving it, enter the make in your terminal to build. After this, we will going to configure the SU2 2.0.2 with Metis 4.0.3 flag.


SU2 2.0.2

This version does not support running in parallel with the CGNS, conversely the 3.2.0 does, so we will configure it without using the CGNS library. Direct to your SU2 2.0.2 directory, and do the following.

Code:
./configure --prefix=/usr/local/ --with-Metis-lib=/path/to/your/metis-4.0.3/in/SU2/directory/trunk/metis-4.0.3 --with-Metis-include=/path/to/your/metis-4.0.3/in/SU2/directory/trunk/metis-4.0.3/Lib --with-Metis-version=4 --with-MPI=/usr/local/bin/mpicxx
make 
sudo make install
You also need to set the environment variables.

Code:
export SU2_RUN="/usr/local/bin"
export SU2_HOME="/path/to/your/SU2/directory/trunk/trunk"
export PATH=$PATH:$SU2_RUN
You can remove the package by using the make clean and make uninstall.

SU2 2.0.10

This version supports running in parallel with the CGNS, so download the tar file from the github, put it in a appropriate directory, unpack the source. Again, you need to build the stand-alone Metis 4.0.3, so put the unpacked metis folder in your SU2 directory, and follow the aforementioned instruction in the Metis section. Then, do the following.

Code:
./configure --prefix=/usr/local/ --with-CGNS-lib=/usr/local/lib --with-CGNS-include=/usr/local/include --with-Metis-lib=/path/to/your/metis-4.0.3/in/SU2/directory/metis-4.0.3 --with-Metis-include=/path/to/your/metis-4.0.3/in/SU2/directory/metis-4.0.3/Lib --with-Metis-version=4 --with-MPI=/usr/local/bin/mpicxx
make 
sudo make install
Again, you also need to set the environment variables.

Code:
export SU2_RUN="/usr/local/bin"
export SU2_HOME="/path/to/your/SU2/directory"
export PATH=$PATH:$SU2_RUN

SU2 3.0.0

This version also supports running in parallel with CGNS, download, unpack, and put it in a right place. Like the previous one, you will need the metis, so copy the unpacked metis folder in your SU2 directory, follow the instruction provided already in the metis section. Then, do the following.

Code:
./configure --prefix=/usr/local/ --with-CGNS-lib=/usr/local/lib --with-CGNS-include=/usr/local/include --with-Metis-lib=/path/to/your/metis-4.0.3/in/SU2/directory/metis-4.0.3 --with-Metis-include=/path/to/your/metis-4.0.3/in/SU2/directory/metis-4.0.3/Lib --with-Metis-version=4 --with-MPI=/usr/local/bin/mpicxx
make
sudo make install
Finally, setting the environment variable according to the following.

Code:
export SU2_RUN="/usr/local/bin"
export SU2_HOME="/path/to/your/SU2/directory"
export PATH=$PATH:$SU2_RUN
SU2 3.2.0

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/ --with-CGNS-lib=/usr/local/lib --with-CGNS-include=/usr/local/include --with-Jsoncpp-lib=/path/to/your/unpack/jsoncpp-src-0.5.0/libs/linux-gcc-4.8 --with-Jsoncpp-include=/path/to/your/unpack/jsoncpp-src-0.5.0/include --with-MPI=/usr/local/bin/mpicxx
make
sudo make install
sudo make installcheck
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.0"
export PATH=$PATH:$SU2_RUN
export PYTHONPATH=$PYTHONPATH:$SU2_RUN
For the future

We build the several versions of the SU2 with parallel support, but in this section we are about to install the CGNS 3.1.14 library with hdf5 in parallel with szip support. The current version, 4.0.1, supports hdf5, SZIP and ZLIB. You can build this version with these options. Still I am not sure about the support of parallel CGNS with hdf5. Therefore, you can follow the below instructions and build the parallel CGNS with hdf5, then add the CGNS flags like previous cases and see what happens.

SZIP 2.1

Download the tar file from here, put it in an appropriate place, and unpack the file. Then, direct there, and build it accordingly.

Code:
./configure
sudo make
sudo make check
sudo make install
Then we need to add a link to LD, so follow the provided commands.

Code:
sudo touch /etc/ld.so.conf.d/szip-2.1.conf
sudo chmod 777 /etc/ld.so.conf.d/szip-2.1.conf
vi /etc/ld.so.conf.d/szip-2.1.conf
Press 'a' for enabling type setting, the type the below line in you terminal. After, press Esc, the enter ':wq' to save and exit.

Code:
/path/to/your/szip-2.1/directory/szip/lib
Enter the below command into the terminal for updating the LD.

Code:
sudo ldconfig
HDF5 1.8.13

Download the tar file from here, put it in a right place, unpack the tar file, and direct there. Follow the provided commands.

Code:
CC='/usr/local/bin/mpicc -m64' ./configure --prefix=/usr/local --enable-parallel --with-zlib=/usr/include,/usr/lib --with-szlib=/path/to/your/szip-2.1/szip
sudo make
sudo make check
sudo make install
sudo make check-install
CGNS 3.1.14 with HDF5

The CGNS 3.1.14 tar file has been downloaded already, if you didn't, download it from the above CGNS 3.1.14 section. You also need cmake, X11, Xmu, OpenGL library before building the CGNS. If you didn't have these, go back to their above sections, and install them. After unpacking the cgns tar file in an appropriate directory, direct there, and follow the provided instructions.

Code:
mkdir cgns_Linux
cd cgns_Linux
cmake /path/to/your/unpack/cgnslib-3.1.4
ccmake .
Set the options according to the following, then press c, and then g to generate the configure.

BUILD_CGNSTOOLS ON
BUILD_PCGNS ON
CGNS_BUILD_SHARED ON
CGNS_USE_SHARED ON
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/local
ENABLE_64BIT ON
ENABLE_FORTRAN ON
ENABLE_HDF5 ON
ENABLE_SCOPING OFF
ENABLE_TESTS OFF
FORTRAN_NAMING LOWERCASE_
HDF5_INCLUDE_PATH /usr/local/include
HDF5_LIBRARY /usr/local/lib/libhdf5.so
HDF5_NEED_MPI ON
HDF5_NEED_SZIP ON
HDF5_NEED_ZLIB ON
MPI_C_COMPILER /usr/local/bin/mpicc
MPI_C_INCLUDE_PATH /usr/local/include
MPI_C_LIBRARIES /usr/local/lib/libmpich.a;/usr/local/lib/libopa.a;
SZIP_LIBRARY /path/to/your/szip-2.1/szip/lib/libsz.so.2
ZLIB_LIBRARY /usr/lib/x86_64-linux-gnu/libz.so

After generating the configure, do the following.

Code:
make
sudo make install
The final part has been finished here, I hope you found it useful. The backward links to the previous sections are Part 1, Part 2.

Happy high-fidelity optimizing,
PDP
Posted in Uncategorized
Views 3893 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0

Comments

 

All times are GMT -4. The time now is 05:08.