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

My experience Installing Elmer (Open Source Multi physics programme) on Linux

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 5, 2009, 11:47
Default My experience Installing Elmer (Open Source Multi physics programme) on Linux
  #1
Senior Member
 
Ahmed
Join Date: Mar 2009
Location: NY
Posts: 250
Rep Power: 9
Ahmed is on a distinguished road
Weeks ago, I posted about Elmer and how easy it was, installing it on Windows but not on Linux (The most preferred Operating system for scientific simulations).
Well, I have managed to finally install it on my Debian partition. During that process I received very good help from Mikko Lyly (Elmer forum administrator), discovered the bug that was causing all that trouble and Finally having the programme running as healthy as you could imagine.
When I install software on my linux box, I normally write down the steps and any observations in a note book. In the case of Elmer, I thought of documenting my experience, it might be useful to others, and of course it can be improved.
I have divided the process of installing Elmer on a linux box, in two steps, the reason will be clear to the reader at the end of this post.
First step:
In this first step, you install the solver, the libraries etc. This I have automated using the following script (It is based on code snippets from the Elmer forum and the book, "Shell Programming" available freely from the Linux.org web portal). Copy the following script to your home directory, run it as root (make install needs root )

#!/bin/sh -f
echo
echo
echo "Hello "$USER
echo
echo "Your current directory is:- "$PWD
echo
echo "Are We updating an existing Elmer Installation or Starting a new one"
if test -e elmerfem
then
echo
echo "There is an old elmerfem folder, Updating source files"
echo
cd elmerfem
cd trunk
svn update
cd ..
cd ..
echo "Finished DownLoading The Updates"
echo
else
echo "No elmerfem folder found, starting a new Installation"
echo
#
# DownLoad, Compile Elmer modules and install them
#
# Installing in /usr/local Run as root so make install will not complain
#
# First grab the source code from the svn repository
# this command will download a snap shot to a local folder, elmerfem
echo
echo
echo "Starting to DownLoad and create the elmerfem folder"
echo
svn co https://elmerfem.svn.sourceforge.net/svnroot/elmerfem elmerfem
echo
echo "Finished creating a new elmerfem folder"
fi

echo "Now the Update/download has finished, going to install the Elmer programme"
cd elmerfem
cd trunk
echo "Your current directory is:- "$PWD
#
# replace these with your compilers:
#

export CC=gcc
export CXX=g++
export FC=gfortran
export F77=gfortran

# modules have to be compiled in the following order

modules="matc umfpack mathlibs elmergrid meshgen2d eio hutiter front post"

#
# To compile on 64 bits OS, change the no flag to yes
#

for m in $modules; do
cd $m
./configure --prefix=/usr/local --with-64bits=no
make
make install
cd ..
done
#
#
# This is my modification to install module fem
#
SRC=http://www.nic.funet.fi/pub/sci/physics/elmer/src
wget $SRC/fem-5.4.0.tar.gz
if test -e fem-5.4.0.tar.gz
then
echo "Succesfully downloaded: fem-5.4.0.tar.gz "
else
echo "Unable to download: fem-5.4.0.tar.gz"
return
fi

tar xvzf fem-5.4.0.tar.gz
#
# to compile on 64 bits OS, change the no flag to yes
#
cd fem-5.4.0
./configure --prefix=/usr/local --with-64bits=no
make
make install
make check
cd ..
cd ..
echo
echo "The Documentation is being DownLoaded"
echo
URL=http://voxel.dl.sourceforge.net/project/elmerfem/ElmerDocumentation/ElmerDocumentation.tar.gz
wget $URL
tar xvzf ElmerDocumentation.tar.gz
echo
cd ..
echo "Now The Installation is complete, you need to add the following env variables definitions to your .bashrc file "
echo
echo " Add the following block to your .bashrc"
echo
echo "export ELMER_HOME=/usr/local"
echo "export ELMERGUI_HOME=$ELMER_HOME/bin"
echo "export ELMER_POST_HOME=/usr/local/share/elmerpost"
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ELMER_HOME/lib"
echo "export PATH=$PATH:$ELMER_HOME/bin"
echo
emacs .bashrc
echo
echo "Now you can try the programme, open a new terminal window, type the following "
echo " ElmerGUI"
echo "Have fun"
echo " Keep smiling"
echo " and Enjoy Computing"
echo
echo " That is all Folks "
echo
echo " Be positive and helpful towards the others, Share your Elmer experience "

Second Step:
Installing the GUI, before trying this step, make sure the following libraries are installed on your computer, on my Debian box, I used the following command:-
apt-get install build-essential libqt4-dev libqwt5-qt4-dev libvtk5-qt4-dev libopencascade-dev

that confirmed, do the following

cd ~/elmerfem/trunk/ElmerGUI
qmake
make
make install

detailed instructions are given in the README and INSTALL files in the folder ~/elmerfem/trunk/ElmerGUI so please read them.

Thank you for reading my post and good luck to all.

I really hope that modifications and improvemnts are introduced in this script.
Thanks again

Last edited by Ahmed; October 9, 2009 at 08:50. Reason: changed the script, it can be used either for a new installation or update an existing one
Ahmed is offline   Reply With Quote

Old   October 7, 2009, 15:26
Default a missing env variable added
  #2
Senior Member
 
Ahmed
Join Date: Mar 2009
Location: NY
Posts: 250
Rep Power: 9
Ahmed is on a distinguished road
Sorry mates, the following line was missing from my script, I have already added it
export ELMER_POST_HOME=/usr/local/share/elmerpost

It has no effect on the number crunching, it affected the ElmerPost
here it is
export ELMER_POST_HOME=/usr/local/share/elmerpost

Enjoy your day, and Good Luck to all
Ahmed is offline   Reply With Quote

Old   July 31, 2010, 12:27
Default help on installing ELMER on UBUNTU 9.04
  #3
New Member
 
Jorge Garcia
Join Date: Mar 2009
Posts: 3
Rep Power: 8
jgarcia177 is on a distinguished road
Dear Sir

I try to use your script in mi ubuntu 9.04 installation and have many problems.

First with tcl.h and tk.h that the installation don't find. So with synaptic I install tcl8.5-dev and tk8.5-dev

When I try again I get many errors again.

root@ubuntu:/home/jgarcia# ./configure: line 2371: test: !=: unary operator expected
root@ubuntu:/home/jgarcia# ./configure: line 2382: test: !=: unary operator expected
./configure: line 2328: test: !=: unary operator expected
./configure: line 5736: test: !=: unary operator expected

I can send you a file with the full messages

Can you help me?

Thanks
jgarcia177 is offline   Reply With Quote

Old   August 10, 2010, 13:42
Default
  #4
Senior Member
 
Ahmed
Join Date: Mar 2009
Location: NY
Posts: 250
Rep Power: 9
Ahmed is on a distinguished road
Quote:
Originally Posted by jgarcia177 View Post
Dear Sir

I try to use your script in mi ubuntu 9.04 installation and have many problems.

First with tcl.h and tk.h that the installation don't find. So with synaptic I install tcl8.5-dev and tk8.5-dev

When I try again I get many errors again.

root@ubuntu:/home/jgarcia# ./configure: line 2371: test: !=: unary operator expected
root@ubuntu:/home/jgarcia# ./configure: line 2382: test: !=: unary operator expected
./configure: line 2328: test: !=: unary operator expected
./configure: line 5736: test: !=: unary operator expected

I can send you a file with the full messages

Can you help me?

Thanks
Sorry for the delay, I am at least 2000 miles away from my computer, post your query on the Elmer forum
Good luck
Ahmed is offline   Reply With Quote

Reply

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
A new open source CFD tool Juha Vierinen Main CFD Forum 11 June 13, 2009 07:29
Open Source CFD International Conference icon_event OpenFOAM 1 December 1, 2008 03:49
Open Source, Linux, Visit, Code-Saturne,openFOAM.. Ahmed Main CFD Forum 9 October 18, 2008 10:20
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
Could the CFD community benefit from Open Source? JF Main CFD Forum 13 December 18, 2006 00:06


All times are GMT -4. The time now is 07:32.