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

A smooth installation of foam-3.0-extend on OpenSUSE 13.1 64-bits

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 12, 2014, 13:32
Thumbs up A smooth installation of foam-3.0-extend on OpenSUSE 13.1 64-bits
  #1
New Member
 
Shanggui Cai
Join Date: Jan 2012
Location: compiègne, France
Posts: 4
Rep Power: 6
cookcaptain is on a distinguished road
A smooth installation of foam-3.0-extend on OpenSUSE 13.1 64-bits.
--------------------------------------------------------------------------------
Happy new year, FOAMers:

Here is how I compile "foam-3.0-extend" (released on 18 December 2013, and in the release note, it claims that foam-extend-3.0 can be compiled and runs on any linux system and Apple Mac OS X.) from its source packages on OpenSUSE 13.1 64-bits, which is just released on November, 2013.
--------------------------------------------------------------------------------
# 1. install additional system packages.

sudo zypper install git
sudo zypper install openmpi-devel
sudo zypper install gnuplot
sudo zypper install -t pattern devel_qt4

--------------------------------------------------------------------------------
# 2. check the packages' version.

git --version
# output:
# git version 1.8.4

gnuplot --version
# output:
# gnuplot 4.6 patchlevel 3

qmake --version
# output:
# QMake version 2.01a
# Using Qt version 4.8.5 in /usr/lib64

mpirun --version
# output:
# mpirun (Open MPI) 1.7.2

gcc --version
# output:
# gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]

--------------------------------------------------------------------------------
# 3. create the installation folder and download source packages.

# The default installation folder has changed since foam-3.0-extend
# from "OpenFOAM" to "foam", but you can still install it under any
# of your favorite folder. Here I install it under "foam" by default.

cd ~
mkdir foam
cd foam
git clone git://git.code.sf.net/p/openfoam-extend/OpenFOAM-1.6-ext foam-extend-3.0

# if you want to change the installation folder, then follow this

cd foam-extend-3.0
gedit etc/bashrc

# here is the default installation directory.

export WM_PROJECT=foam

foamInstall=$HOME/$WM_PROJECT

# and you can make a change as you want, like
foamInstall=$HOME/OpenFOAM
# and then
cd ~
mv foam OpenFOAM

--------------------------------------------------------------------------------
# 4. set the running environment.

gedit ~/.bashrc

# add the following command to the end of file.
source $HOME/foam/foam-extend-3.0/etc/bashrc

# then source it by the following command, or simply open a new terminal.
. ~/.bashrc

--------------------------------------------------------------------------------
# 5. choose the right compilation tools.

cd $WM_PROJECT_DIR

cp etc/prefs.sh-EXAMPLE etc/prefs.sh

gedit etc/prefs.sh

# 5.1 use the system installed gcc

compilerInstall=System
WM_COMPILER=Gcc48

# close and save prefs.sh file and then type commands

cp -r /wmake/rules/linux64Gcc46 wmake/rules/linux64Gcc48

gedit /wmake/rules/linux64Gcc48/c++

# change the depth "40" to "80" and add "-fpermissive" as following:

ptFLAGS = -DNoRepository -ftemplate-depth-80

c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -fpermissive

# close and save the file and type hotfix command

git branch hotfix/gcc48

git checkout hotfix/gcc48

# 5.2 use the system installed openmpi

gedit etc/prefs.sh

# modify the settings of openmpi
export WM_MPLIB=SYSTEMOPENMPI
export OPENMPI_DIR=/usr/lib64/mpi/gcc/openmpi
export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin

# 5.3 use the system installed Qt

#export QT_THIRD_PARTY=1
export QT_DIR=/usr
export QT_BIN_DIR=$QT_DIR/bin

# close and save prefs.sh file and then
. etc/bashrc

--------------------------------------------------------------------------------
# 6. compile the third packages

cd Thirdparty

# 6.1 stage1
# for cmake-2.8.12

./AllMake.stage1
# and do it twice and you can see the compilation result more briefly.
./AllMake.stage1

# 6.2 stage3
# for metis-5.1.0, ParMGridGen-1.0, libccmio-2.6.1, mesquite-2.1.2,
# scotch-6.0.0, parmetis-4.0.3, PyFoam-0.6.1, hwloc-1.7.2

./AllMake.stage3
# and do it twice and you can see the compilation result more briefly.
./AllMake.stage3

# 6.3 stage4
# for ParaView-4.0.1

./AllMake.stage4
# and do it twice and you can see the compilation result more briefly.
./AllMake.stage4

If there is no mores errors, then we can move forward to the next step.

--------------------------------------------------------------------------------
# 7. compile foam-extend-3.0

. ~/foam/foam-extend-3.0/etc/bashrc
cd $WM_PROJECT_DIR

./Allwmake.firstInstall >& log.Allwmake.firstInstall &
tail -f log.Allwmake.firstInstall

# It's very important to check the log file when errors exist, and to find out the first error.
# I have encountered the first error when I didn't change the c++ file at the depth of "40", and the error comes:
lnInclude/VectorSpaceM.H:13:31: error: template instantiation depth exceeds maximum of 40 (use -ftemplate-depth= to increase the maximum)
# but after I change the depth into 80, and compile it a second time, then no more errors exist.
--------------------------------------------------------------------------------
# 8. installation check

icoFoam -help
# output:
# Usage: icoFoam [-parallel] [-case dir] [-noFunctionObjects] [-help] [-doc] [-srcDoc]

It's done. Hope it will be useful to you.

--------------------------------------------------------------------------------
Notes:

1. "foam-3.0-extend" has been also installed and tested on OpenSUSE 12.2 64-bits, but minor settings related to gcc should be modified from 48 to 47, as I use gcc version 4.7 on OpenSUSE 12.2 64-bits.

2. "foam-3.0-extend" is the new version of OpenFOAM-1.6-ext and is also compatible to the previous version. Installation of OpenFOAM-1.6-ext on OpenSUSE 12.2 64-bits has been also proved to be successful according to the above instructions.
--------------------------------------------------------------------------------

Last edited by cookcaptain; January 13, 2014 at 19:55.
cookcaptain is offline   Reply With Quote

Old   January 12, 2014, 13:52
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,531
Blog Entries: 36
Rep Power: 97
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings John and welcome (back?) to the forum!

And many thanks for sharing!
Is there any way I can convince you to add your instructions to the (unofficial) wiki at openfoamwiki.net? Namely on this page: http://openfoamwiki.net/index.php/In...#openSUSE_13.1 - in the dedicated section for it, which I've already added a link to this thread.

Best regards,
Bruno
__________________
___
I'll be at OFW11 in Portugal
wyldckat is offline   Reply With Quote

Old   January 13, 2014, 20:11
Default
  #3
New Member
 
Shanggui Cai
Join Date: Jan 2012
Location: compiègne, France
Posts: 4
Rep Power: 6
cookcaptain is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings John and welcome (back?) to the forum!

And many thanks for sharing!
Is there any way I can convince you to add your instructions to the (unofficial) wiki at openfoamwiki.net? Namely on this page: http://openfoamwiki.net/index.php/In...#openSUSE_13.1 - in the dedicated section for it, which I've already added a link to this thread.

Best regards,
Bruno
Greetings Bruno, it could be my pleasure to share the instructions on the OpenFOAM wiki page, and I have seen the link already added to this thread. Please feel free to contact me by shangguicai@gmail.com about what I can do here.

Regards,
Shanggui CAI (John)
cookcaptain is offline   Reply With Quote

Old   January 26, 2014, 15:09
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,531
Blog Entries: 36
Rep Power: 97
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Shanggui CAI,

Sorry, I usually prefer to keep OpenFOAM+forum related issues here on the forum, otherwise I loose track of what, who or where I still have to answer to

The steps for you to help with the wiki, should very simple:
  1. Register on the wiki: http://openfoamwiki.net/index.php/Sp...RequestAccount
  2. If no link is provided upon the registration is confirmed by the admin, on where to start reading on how to help, then have a look here: http://openfoamwiki.net/index.php/FAQ/Wiki
  3. Go to the section "openSUSE 13.1" on the wiki page mentioned before and click on the "edit" link to the right: http://openfoamwiki.net/index.php/In...#openSUSE_13.1
  4. Do the same on this section: http://openfoamwiki.net/index.php/In...u#Ubuntu_13.10 - which you can use as a structure template and adjust accordingly. Once in edit mode, you can simply select the whole or parts of the wiki-text and copy-paste onto the page currently being edited at openSUSE 13.1.
Best regards,
Bruno
__________________
___
I'll be at OFW11 in Portugal
wyldckat is offline   Reply With Quote

Old   February 7, 2014, 13:54
Default
  #5
New Member
 
Alex Chan
Join Date: Jan 2014
Location: Amherst, MA
Posts: 10
Rep Power: 4
AlexC is on a distinguished road
Hello! I'm having trouble installing foam-extend-3.0 on my system (OpenSUSE-13.1). I saw you skip the stage 2 of the ThirdParty compilation. Is there any reason? I believe I'm having issues with OPENMPI and that is the step that the MPI libraries are compiled.

Basically during compilation, it gives errors such as "cannof find -lPstream" or "cannot find -lfoam".

Thanks!
AlexC is offline   Reply With Quote

Old   February 12, 2014, 09:01
Default
  #6
New Member
 
Shanggui Cai
Join Date: Jan 2012
Location: compiègne, France
Posts: 4
Rep Power: 6
cookcaptain is on a distinguished road
Hi Alex, because OpenMPI is pre-installed at the step 1-"sudo zypper install openmpi-devel", and we use the system installed OpenMPI, therefore, stage 2 is not necessary. Could you please paste your first error of your installation here?
cookcaptain is offline   Reply With Quote

Old   March 12, 2014, 00:05
Default
  #7
New Member
 
Alex Chan
Join Date: Jan 2014
Location: Amherst, MA
Posts: 10
Rep Power: 4
AlexC is on a distinguished road
Sorry for the late reply! So I actually was able to compile correctly by simply changing the OPENMPI to SYSTEMOPENMPI like so:

Quote:
# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI
: ${WM_MPLIB:=SYSTEMOPENMPI}; export WM_MPLIB
AlexC is offline   Reply With Quote

Old   May 26, 2015, 11:22
Default installation of foam-1.6-extend on OS 13.1 64-bits
  #8
New Member
 
Join Date: May 2015
Posts: 1
Rep Power: 0
vonkarman is on a distinguished road
Hello captain,

I received some tutorials dealing with poroelasticity/deformation which were compiled under OF-1.6x and I would like to run.
I am not a Linux-guru and unfortunately I could not find any hints on the installation of OF-1.6xunder OpenSuse 13.1 64-bits.
Do you think I can go along the smooth installation for foam-3.0-extend hints you kindly provided and get a smooth installation of foam-1.6-extend ?

Best regards from Germany

vonkarman
vonkarman is offline   Reply With Quote

Reply

Tags
foam-extend-3.0, openfoam-1.6-ext, opensuse 12.2 64-bits, opensuse 13.1 64-bits

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Native Meshers: blockMesh 2 March 14, 2012 10:56
mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 12 December 12, 2011 05:16
BlockMesh FOAM warning gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14:11
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19


All times are GMT -4. The time now is 09:00.