Installation/Linux/foam-extend-4.0/openSUSE
1 Introduction
This page is dedicated to preparing an openSUSE system for installing the foam-extend project .
2 openSUSE versions
2.1 openSUSE 42.1
Follow these steps:
- Switch to root mode (administrator), to install the necessary packages:
sudo -s
- If the 'sudo' command tells you're not in the sudoers list, then run:
su -
- If the 'sudo' command tells you're not in the sudoers list, then run:
- Install the necessary packages:
zypper install -t pattern devel_C_C++ zypper install cmake libqt4-devel qt4-x11-tools qt4-assistant-adp-devel gnuplot openmpi-devel boost-devel cgal-devel gmp-devel mpfr-devel libQtWebKit-devel python-devel git mercurial rpm-build
- Now exit from the root mode:
exit
- Note: In order for Open-MPI to be properly accessible, you will need to either logout and then log back in or run the following command in each terminal in the meantime:
source /etc/profile.d/mpi-selector.sh
Then continue following the instructions on the previous page, subsection Get the source code, although keep in mind to run the following commands before you run source etc/bashrc:
echo unset WM_THIRD_PARTY_USE_CMAKE_322 >> etc/prefs.sh echo export WM_MPLIB=SYSTEMOPENMPI >> etc/prefs.sh
More specifically, the commands should be executed something like this:
cd ~/foam/foam-extend-4.0 echo unset WM_THIRD_PARTY_USE_CMAKE_322 >> etc/prefs.sh echo export WM_MPLIB=SYSTEMOPENMPI >> etc/prefs.sh source etc/bashrc
And then, in order for the library parMetisDecomp to build properly, you need to run once the following command:
sed -i -e 's=\-L$(OPENMPI.*=$(PLIBS)=' $FOAM_SRC/decompositionMethods/parMetisDecomp/Make/options
Note: Using the openSUSE's own Metis system installation did not work at the time of this writing (23:09, 19 December 2015 (CET)).
2.2 openSUSE 15.0
Follow these steps:
- Switch to root mode (administrator), to install the necessary packages:
sudo -s
- If the 'sudo' command tells you're not in the sudoers list, then run:
su -
- If the 'sudo' command tells you're not in the sudoers list, then run:
- Install the necessary packages:
zypper install -t pattern devel_C_C++ zypper install cmake libqt4-devel qt4-x11-tools qt4-assistant-adp-devel gnuplot openmpi-devel boost-devel cgal-devel gmp-devel mpfr-devel python-devel git mercurial rpm-build
- In order to build ParaView 4.4, you will need to use an older GCC versions. To do so, the easiest is to use the GCC 4.8 from the openSUSE 42.3 repository, by running the following commands:
zypper ar -f http://download.opensuse.org/distribution/leap/42.3/repo/oss/suse/ standard423 zypper ar -f http://download.opensuse.org/repositories/devel:/gcc/openSUSE_Leap_42.3/ devel423 zypper install gcc48 gcc48-c++
- Now exit from the root mode:
exit
- Note: In order for Open-MPI to be properly accessible, you will need to either logout and then log back in or run the following command in each terminal in the meantime:
mpi-selector --set openmpi source /etc/profile.d/mpi-selector.sh
Then continue following the instructions on the previous page, subsection Get the source code, although keep in mind to run the following commands before you run source etc/bashrc:
echo unset WM_THIRD_PARTY_USE_CMAKE_322 >> etc/prefs.sh echo export WM_MPLIB=SYSTEMOPENMPI >> etc/prefs.sh echo export WM_THIRD_PARTY_USE_BISON_27=true >> etc/prefs.sh echo "export WM_CC='gcc-4.8'" >> etc/prefs.sh echo "export WM_CXX='g++-4.8'" >> etc/prefs.sh
More specifically, the commands should be executed something like this:
cd ~/foam/foam-extend-4.0 echo unset WM_THIRD_PARTY_USE_CMAKE_322 >> etc/prefs.sh echo export WM_MPLIB=SYSTEMOPENMPI >> etc/prefs.sh echo export WM_THIRD_PARTY_USE_BISON_27=true >> etc/prefs.sh echo "export WM_CC='gcc-4.8'" >> etc/prefs.sh echo "export WM_CXX='g++-4.8'" >> etc/prefs.sh echo "export QT_BIN_DIR=/usr/bin/" >> etc/prefs.sh source etc/bashrc
And then, in order for the library parMetisDecomp to build properly, you need to run once the following command:
sed -i -e 's=\-L$(OPENMPI.*=$(PLIBS)=' $FOAM_SRC/decompositionMethods/parMetisDecomp/Make/options
And also need to enforce that GCC 4.8 is to be used for building foam-extend:
sed -i -e 's/gcc/\$(WM_CC)/' wmake/rules/linux64Gcc/c sed -i -e 's/g++/\$(WM_CXX)/' wmake/rules/linux64Gcc/c++
Note: Using the openSUSE's own Metis system installation requires building with 64-bit labels.