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

OpenFOAM Debian packaging current status problems and TODOs

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 10, 2006, 08:50
Default Hi, everyonehttp://www.cfd-onl
  #1
New Member
 
Liu XB
Join Date: Mar 2009
Posts: 4
Rep Power: 17
oseen is on a distinguished road
Hi, everyone
I am a Ph.D. candidate of fluid dynamics from China, I'd been using OpenFOAM for more than half a year. The OpenFOAM libraries and solvers, developed and made public by Hrvoje Jasak and other staffs, are very helpful to my research, I really appreciate it.

The installation of OpenFOAM-1.3 is almost distribution-independent in various Linux distributions, people download the source codes and binary files for sf.net or other places, then put these files in the right place in $HOME and finally set the necessary environmental variables. Easy as the installation is, it's more convenient to manage the OpenFOAM package by the system-wide package management mechanism, like apt in Debian, portage in Gentoo, or rpm in Fedora. The benefits are: easy upgrading to new versions, bug tracking support and etc.

There is already a Debian OpenFOAM packaging project in http://alioth.debian.org/projects/pkg-openfoam/, but not active, no file releases, no bug reports and no forum posts, seems dead. I tried packaging OpenFOAM and ParaView in recent a few weeks. ParaView packaging is easy but OpenFOAM is not. I'd like to share my experiences and ideas here .

1. We need to split the OpenFOAM tarballs into several packages.
openfoam - solvers, utilities, and scripts.
libopenfoam13 - libraries
libopenfoam13-dev - development headers.
libopenfoam13-doc - Class references generated by Doxygen
openfoam-doc - General documents such as UserGuide.pdf, ProgammingGuide.pdf
openfoam-data - thermal data (Is this package necessary?)

2. We need to arrange the file locations to satisfy both Debian's packaging policy and OpenFOAM.
In Debian, arch-dependent files like libraries must be put into /usr/lib, arch-independent files, like docs and data, are put into usr/share, so we need some symbol links, such as:
WM_PROJECT_INST_DIR=/usr/share/$WM_PROJECT
WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
link $WM_PROJECT_INST_DIR/linux/j2sdk1.4.2_05 -> /usr/lib/jvm/java-1.5.0-sun
link $WM_PROJECT_INST_DIR/jobControl -> /var/run/openfoam/jobControl
link $WM_PROJECT_DIR/lib -> /usr/lib/openfoam/lib
link $WM_PROJECT_DIR/applications -> /usr/lib/openfoam/applications
link $WM_PROJECT_DIR/.OpenFOAM-1.3 -> /etc/OpenFOAM

3. We need to patch some files to compile the source correctly.
A. Several patches that replace 'gmake' with 'make'.
B. Add the missing demangle.h header file.
C. A patch to use the system-wide zlib and mpi library provided by Debian.
D. Add '-source 1.4' option to compile FoamX with java 1.5
E. Compiling libPVFoamReader need additional files (vtkWrapClientServer.cxx.in) from ParaView's source tree, however, could we drop the PVFoamReader since there is a native reader in the ParaView CVS?
F. ...

4. Miscellaneous
A. The solvers and utilities are put into /usr/lib/openfoam/, only two simple scripts should be put in /usr/bin, one is /usr/bin/openfoam, the other is /usr/bin/FoamX. /usr/bin/openfoam invokes bash with --rcfile argument: 'bash --rcfile /etc/OpenFOAM/bashrc', when /usr/bin/FoamX is a symbol link to the real FoamX binary in /usr/lib, just like the /usr/bin/firefox is a symbol link to /usr/lib/firefox/firefox.
B. Two desktop entries in /usr/share/applications/: openfoam.desktop and FoamX.desktop

Finally I built the following packages, not all of the issues mentioned above were done, however most of solvers and utilities work well with the except of FoamX.
ls -l
-rw-r--r-- 1 oseen oseen 12M 2006-11-22 10:04 libopenfoam13_1.3-1_i386.deb
-rw-r--r-- 1 oseen oseen 560K 2006-11-22 10:05 libopenfoam13-dev_1.3-1_all.deb
-rw-r--r-- 1 oseen oseen 19M 2006-11-22 10:05 libopenfoam13-doc_1.3-1_i386.deb
-rw-r--r-- 1 oseen oseen 18M 2006-11-22 10:04 openfoam_1.3-1_i386.deb
-rw-r--r-- 1 oseen oseen 79M 2006-11-18 10:13 openfoam_1.3.orig.tar.gz
-rw-r--r-- 1 oseen oseen 258K 2006-11-22 10:04 openfoam-data_1.3-1_i386.deb
-rw-r--r-- 1 oseen oseen 21M 2006-11-22 10:05 openfoam-doc_1.3-1_all.deb
-rw-r--r-- 1 oseen oseen 5.1M 2006-11-22 10:05 openfoam-tutorial_1.3-1_all.deb

I am not sure whether you are interested in Debian packaging of OpenFOAM, could you help me? or should I create a Wiki page first?

Some refs.
[1] 'How to compile OpenFOAM' wiki page
[2] Gentoo openfoam-bin ebuild: http://bugs.gentoo.org/show_bug.cgi?id=104257
[3] FreeBSD OpenFOAM ports: http://www.freshports.org/science/openfoam
[4] OpenFOAM RPM package: various sources, just google "OpenFOAM rpm" and you will find them.
oseen is offline   Reply With Quote

Old   December 16, 2006, 08:50
Default Hi, for now no one have replie
  #2
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20
7islands is on a distinguished road
Hi, for now no one have replied but I think this is a valuable and well thought out project. OpenFOAM users will be able to get great benefits once a unified packaging standard is established across main distributions (not only Debian but also Gentoo, openSUSE and Fedora etc.), especially considering system-wide installation of OpenFOAM is a frequently discussed issue.

As I still am not an OpenFOAM expert, all what I can do is cheering for you but as for file locations I hope you just take what I noticed with a grain of salt:
a. Usually it would be OK with just setting the JAVA_HOME variable to the system JDK directory instead of linking $WM_PROJECT_INST_DIR/linux/j2sdk1.4.2_05 to the JDK directory.
b. It might be better to put the jobControl directory under user home directory as each user might want to control their own jobs.
c. The FoamX, runFoamX, killFoamX scripts should be modified to make ns.ref put under user home directory (~/.OpenFOAM-1.3 or somewhere, rather than /etc/OpenFOAM) so that each user can run
FoamX.
d. What's the problem in running FoamX? I'm not sure but might be able to offer some help.
7islands is offline   Reply With Quote

Old   December 18, 2006, 12:19
Default Hi Liu, I for one would be v
  #3
Senior Member
 
Rasmus Hemph
Join Date: Mar 2009
Location: Sweden
Posts: 108
Rep Power: 17
hemph is on a distinguished road
Hi Liu,
I for one would be very happy to see OpenFOAM as a debian package! I'd be glad to do some trial installs, once you get a working set of debs. I have not run FoamX in a long while, so I can not help you there. I suggest that it should be an optional part of the OF-installation. I am not sure that the OFreader in Paraview CVS is mature enough to rely on at the moment, but hopefully soon. At least with the latest CVS I get crashes using the reader.
hemph is offline   Reply With Quote

Old   January 7, 2007, 11:54
Default This is the .diff.gz file for
  #4
New Member
 
Liu XB
Join Date: Mar 2009
Posts: 4
Rep Power: 17
oseen is on a distinguished road
This is the .diff.gz file for paraview 2.4.4 & openfoam 1.3, experienced Debian users can create paraview & openfoam packages following the very brief (probably incomplete for a Debian beginner) steps below:




tar -zxf paraview-2.4.4.tar.gz
gzip -d paraview_2.4.4-1.diff.gz
cd paraview-2.4.4 && patch -p1 < ../paraview_2.4.4-1.diff
dpkg-buildpackage -rfakeroot


Once the paraview packages are generated and installed, we can make the openfoam packages:

tar -zxf OpenFOAM-1.3.General.gtgz
gzip -d openfoam_1.3-2.diff.gz
cd OpenFOAM-1.3 && patch -p1 < ../openfoam_1.3-2.diff
dpkg-buildpackage -rfakeroot

Maybe a more detailed wiki page would be better, but I do not have much time now...
oseen is offline   Reply With Quote

Old   January 7, 2007, 12:29
Default Sorry, the upload box did not
  #5
New Member
 
Liu XB
Join Date: Mar 2009
Posts: 4
Rep Power: 17
oseen is on a distinguished road
Sorry, the upload box did not appear.

for paraview
http://blog.newsmth.net/pc/pcdownload.php?fid=37964

for openfoam
http://blog.newsmth.net/pc/pcdownload.php?fid=37963
oseen is offline   Reply With Quote

Old   February 9, 2007, 05:18
Default Hi Liu, The download links y
  #6
Senior Member
 
Rasmus Hemph
Join Date: Mar 2009
Location: Sweden
Posts: 108
Rep Power: 17
hemph is on a distinguished road
Hi Liu,
The download links you provided does not work for me. I just come to a page with chinese text and no way to proceed further. (on Firefox v2.0)

Best
Rasmus H
hemph is offline   Reply With Quote

Old   February 9, 2007, 16:22
Default Hi Liu, At the end of your
  #7
New Member
 
Roland Wilfer
Join Date: Mar 2009
Posts: 1
Rep Power: 0
rwilfer is on a distinguished road
Hi Liu,

At the end of your posting you ask if somebody is interessted in packaging OpenFOAM in a debian package. Well, yes, I am pretty much interessted since I am new in both areas, CFD and Debian (in the flavor of ubuntu) I would really appreciate it to have an easier start.

Can I help? As far as I see just testing ... but isnt it the basics of good stuff? ... ;-)

Kind regards,
Roland
rwilfer is offline   Reply With Quote

Old   February 27, 2007, 22:11
Default Hi Roland Wilfer & Rasmus Hem
  #8
New Member
 
Liu XB
Join Date: Mar 2009
Posts: 4
Rep Power: 17
oseen is on a distinguished road
Hi Roland Wilfer & Rasmus Hemph

I examined the download links, the server changed its setting and the hostname "blog.newsmth.net" should be wrote as "www.newsmth.net" now, the new urls are:

http://www.newsmth.net/pc/pcdownload.php?fid=37964

http://www.newsmth.net/pc/pcdownload.php?fid=37963

Another issue that I forgot to mention in the previous post is that, the
paraview_2.4.4-1.orig.tar.gz is not the same as the one from Kitware's
website, it was created by the following steps:

1. Downloads the one from kitware, say paraview-kit.tar.gz
2. tar -xf paraview-from-kitware.tar.gz
3. mkdir paraview-2.4.4-new && mv paraview-2.4.4 paraview-2.4.4-new
4. mv paraview-2.4.4-new paraview-2.4.4
5. copy a-image.png paraview-2.4.4/paraview_22x22.png
6. tar -zcf paraview_2.4.4-1.orig.tar.gz paraview-2.4.4

I'll create a detailed wiki page as soon as I can.

Best wishes
Liu XB
oseen is offline   Reply With Quote

Old   August 26, 2007, 13:46
Default Hi, I would like to encourage
  #9
New Member
 
Ben Postma
Join Date: Mar 2009
Posts: 4
Rep Power: 17
benofm is on a distinguished road
Hi, I would like to encourage the Debain OpenFOAM package project because for some of us getting OpenFOAM compiled on Debian remains elusive. I pretty much seem to be stuck in a loop of repeatedly compiling and trying to fix the errors I get.

First round I did not have the OPENGL stuff installed so it complained about gl.h and glut.h not being found.

Then I had to install lex++ after finally figuring out what it was.

Then I had to install the X windows development headers.

Then I had to install the SSL development package.

And now libFoamX.so is complaining about an undefined reference to std::basic_ostream.... Havent figured that one out yet. sigh.

And I am using the latest stable Debian release.

But it seems to me that there is a whole list of packages and unclear dependencies that you need which is not mentioned anywhere or which some version of linux have and some dont. Am I missing something obvious?

Given that Ubuntu/Debian are far more common than SUSE I am not sure why they so poorly support other ports? And would it hurt to include a few more runtime files in their binary package so you dont have to compile it on Debian?

Maybe this is deliberate to get support funds. Id take em up but I would like to tinker with this at home and this point it is looking doubtful.

So, yes, it would be wonderful if I could go "aptitude install OpenFOAM". I would gladly help test or even set it up but I at this stage I have yet to get it compiled... <g>
benofm is offline   Reply With Quote

Old   August 26, 2007, 14:50
Default First round I did not have the
  #10
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
First round I did not have the OPENGL stuff installed so it complained about gl.h and glut.h not being found.

Then I had to install lex++ after finally figuring out what it was.

Then I had to install the X windows development headers.

Then I had to install the SSL development package.

This is commonplace in the GNU/Linux world as you must be well aware. Not everything can be handed in a plate. We all live with it. Granted, some of us on stable enterprise-class distros such as Suse/OpenSuse and RHEL clones (Scientifc Linux, CentOS et al.) have a better experience.

But it seems to me that there is a whole list of packages and unclear dependencies that you need which is not mentioned anywhere or which some version of linux have and some dont.

You are absolutely correct. OpenFOAM is not at the stage where one can say, yes, all done. It never will be. Neither is Fluent, neither is CFX. So as long as it is under constant development, breaking compatiblity with older releases, unclear dependencies etc. will exist. This is for the greater good. With time however, such issues will tend to die out.

Given that Ubuntu/Debian are far more common than SUSE I am not sure why they so poorly support other ports? And would it hurt to include a few more runtime files in their binary package so you dont have to compile it on Debian?

I'm sure the OpenCFD developers are doing the best given the circumstances. Perhaps, if you wait for a bit someone will come up with a Debian specific install/compile tutorial.

"Maybe this is deliberate to get support funds."

I'd be very very careful before making any such statement. Given the commitment these folks have shown, it would be wrong to accuse them for such trivial problems.

Firstly I would like many folks to understand why OpenFOAM isn't installed globally (e.g. /usr/local/OpenFOAM). With the increasing number of bug-fixes and new functionality that comes every 3-6 months it is impractical for a developing code like OpenFOAM to be installed system-wide. Add to this the fact that almost just about every end user has his/her very own modified solver for their use. There are ways to separate the basic libraries from the user-defined ones just as one can build their own solvers wherever they want. However, what is the incentive? Many of us have got used to the home directory installation and find it a very convenient model. Not surprising. It gives us better control and more freedom, esp. when working in university clusters where you simply cannot bug sysadmins every other day telling them that CrankNicolson.C has a bug fix, so you need him to run some commands as root user. Not practical.

Last but not the least, I quite frankly don't see any problems using OpenFOAM on Ubuntu. I use Feisty Fawn 64 bit on my laptop and I have all solvers working just from the binaries provided in the OpenFOAM web page. All I had to compile were my own solvers, Bernhard's utilities et al. Needless to say, it went without any problems. In fact, if I remember correctly, I remember someone posting a good OpenFOAM HOWTO on the scientific ubuntu forum.

Debian is notorious for having its own religion just as Slackware. Since the 90s neither have changed. Ubuntu on the other hand is more friendly and as much as I love Debian, I will still recommend Ubuntu.

msrinath80 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems compiling OpenFOAM15 on Debian Etch geoffjay OpenFOAM Installation 1 February 5, 2009 17:29
Problems in calculating the fluid traction on the current structure frame in 3D models fw407 OpenFOAM Running, Solving & CFD 0 August 6, 2008 13:04
diff. beetwen current time and current time step Tomik FLUENT 0 March 3, 2008 08:00
Need Journal of Electronic packaging papers venugopal Main CFD Forum 0 July 6, 2004 13:50
current status of parallel implementation? George Bergantz Phoenics 5 January 22, 2002 17:13


All times are GMT -4. The time now is 01:56.