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

Installing 2.1.x (Repository Release) on RHEL 6.2

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 16, 2012, 11:09
Default Installing 2.1.x (Repository Release) on RHEL 6.2
  #1
New Member
 
Shaun
Join Date: May 2012
Posts: 14
Rep Power: 5
socon009 is on a distinguished road
Hello,

I am installing OpenFOAM-2.1.x (Repository Release) in the following directory:

/opt/OpenFOAM

Following insructions per the OpenFOAM website:

http://www.openfoam.org/download/git.php

First, I make sure that I obtain the repository:

Code:
yum install git
git clone git://github.com/OpenFOAM/OpenFOAM-2.1.x.git
Download ThirdParty-2.1.0.tgz to /opt/OpenFOAM from the following website:

https://sourceforge.net/projects/foam/files/foam/2.1.0/

Code:
cd /opt/OpenFOAM
tar xzf ThirdParty-2.1.0.tgz
mv ThirdParty-2.1.0 ThirdParty-2.1.x
Download dependent packages for RHEL 6.2 (i.e. assumed same as Fedora 15/16 dependent packages):

Code:
sudo yum groupinstall 'Development Tools' 
sudo yum install openmpi openmpi-devel qt-devel qt-webkit-devel zlib-devel
Set environment variables:

Code:
export FOAM_INST_DIR=/data/app/OpenFOAM 
foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.1.x/etc/bashrc 
[ -f $foamDotFile ] && . $foamDotFile
Check the system:

Code:
cd $WM_PROJECT_DIR/bin
./foamSystemCheck
"System check: PASS"

Set the number of processors for wmakeScheduler:

Code:
export WM_NCOMPPROCS=10
(This workstation has 12 local cores)

Run ./Allwmake

Code:
cd ..
sudo ./Allwmake
Thanks to Bruno and Tobi for instructions on how to make log and error files:

Code:
su
./Allwmake 1> make.log 2> error.log
The (truncated) error log (first ~90 KB of text) that I obtained is attached to this post in .txt format.

I truncated the log but included the last few lines that pertain to the exit status. Please let me know if I can clean up this error.log in a way that is easier for someone to debug. (I'd like to be able to help those that are able/willing to help me in whatever way I can.)

Unfortunately, this is only as far as I have been able to get. (You may see how far through the process I am by referring to the aforementioned link to OpenFOAM's instructional website)

I am skeptical of the following:

1. whether I have suitable environment variables;
2. whether I have all requisite packages to build on RHEL 6.2

Thank you very much for any help or insight that you are able to offer.

Best,
Shaun
Attached Files
File Type: txt truncated_error.txt (88.3 KB, 4 views)
socon009 is offline   Reply With Quote

Old   May 16, 2012, 16:17
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Shaun,

Quote:
Originally Posted by socon009 View Post
I am installing OpenFOAM-2.1.x (Repository Release) in the following directory:

/opt/OpenFOAM
Baaaad idea, specially if you're building it as root. You're risking the safety of your workstation, because if you mess up 1 miserable command, you might break your OS installation.

But OK, moving onward, assuming you're an experienced Linux user.

Quote:
Originally Posted by socon009 View Post
Set environment variables:

Code:
export FOAM_INST_DIR=/data/app/OpenFOAM 
foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.1.x/etc/bashrc 
[ -f $foamDotFile ] && . $foamDotFile
Uhm, you should decide where exactly you want OpenFOAM installed Additionally, since you installed the system version of Open-MPI, here is what you should have:
Code:
export FOAM_INST_DIR=/opt/OpenFOAM 
foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.1.x/etc/bashrc 
[ -f $foamDotFile ] && . $foamDotFile WM_MPLIB=SYSTEMOPENMPI
Secondly, since you're using RHEL, I believe that you need the following command to be execute before those lines of code:
Code:
module load openmpi-x86_64
I got this command from here: http://www.openfoam.org/download/fedora.php - it's the only thing needed for you and the 2.1.x version.
By the way: yes, the Fedora package list you used should be a good reference for RHEL as well.

The errors shown in the attached file indicate that Open-MPI was nowhere to be seen, possibly due to the missing previous module load command.

As for logging and reporting the errors, I usually suggest the following instructions:
  1. Run Allwmake like this:
    Code:
    ./Allwmake > make.log
  2. When it's done, edit the "make.log" file and search-and-replace any sensitive paths and names.
  3. Then compress the file like this:
    Code:
    tar -czf make.log.tar.gz make.log
  4. Finally, attach the file "make.log.tar.gz" in your next post.


Last but not least: when using RHEL or CentOS or SL, I usually suggest CentFOAM: http://sourceforge.net/apps/mediawik...itle=Main_Page

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   May 16, 2012, 19:14
Default
  #3
New Member
 
Shaun
Join Date: May 2012
Posts: 14
Rep Power: 5
socon009 is on a distinguished road
Hey Bruno, great post!

1. CentFOAM was my fallback option. But I am determined to learn more about Linux. Therefore I am purposefully putting myself through this - no pain, no gain.

2a. I would actually prefer that each user have their own compilation of OpenFOAM so that when it comes time to modify the source, other users will not be affected by the changes made. (Does it matter that the system only allots ~3GB per user for their home directory?)

2b. Is there a way to reach the configuration mentioned above by this method? (My goal isn't to just get the software installed as much as it is to learn how Linux ticks.)

3a. I did NOT know that about Open-MPI. So I have installed the system version as opposed to the individual user version? Would one be required to load both in the same way? I'm terribly intrigued about environments, libraries, etc. -- Any resources you can offer would be quickly and thoroughly torn into. (Grade-A n00b here!)

3b. Can you please explain what this line is commanding?

Code:
[ -f foamDotFile ] && . foamDotFile WM_MPLIB=SYSTEMOPENMPI
My take on it is... "If the file 'foamDotFile' exists then source it." But now that you have added the WM_MPLIB argument, I am almost certained I have misinterpreted.

4. By the way, what tipped you off that OpenMPI was not loaded?

5. All of my tars had been compressing to a minimum of 150 KB (regardless of uncompressed size)... and I believe the maximum attachable file size is 97.7 KB. Any hints?

I will attempt again, as you have suggested.

Also, I just wanted to say how great it is to communicate with people who know their way around Linux. I am super eager to learn.

Thanks again,
Shaun
socon009 is offline   Reply With Quote

Old   May 16, 2012, 19:15
Default
  #4
New Member
 
Shaun
Join Date: May 2012
Posts: 14
Rep Power: 5
socon009 is on a distinguished road
double-posted
socon009 is offline   Reply With Quote

Old   May 17, 2012, 09:35
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Shaun,

Quote:
Originally Posted by socon009 View Post
2a. I would actually prefer that each user have their own compilation of OpenFOAM so that when it comes time to modify the source, other users will not be affected by the changes made. (Does it matter that the system only allots ~3GB per user for their home directory?)

2b. Is there a way to reach the configuration mentioned above by this method? (My goal isn't to just get the software installed as much as it is to learn how Linux ticks.)
I vaguely remember that OpenFOAM requires 1 to 2 GB for a full build...
Usually the principle for a system wide installation is simple:
  1. Build on your home folder.
  2. When completed, switch to root mode and copy the OpenFOAM-* and ThirdParty-* folders to the target place, such as "/opt/OpenFOAM".
  3. Edit the file "/opt/OpenFOAM/OpenFOAM-*/etc/bashrc" and change the installation path in the file.
  4. Change permissions:
    Code:
    chown -R root:root /opt/OpenFOAM
    chmod -R o-Xr /opt/OpenFOAM
    I'll have to check these two commands, but I think it's correct.

Quote:
Originally Posted by socon009 View Post
3a. I did NOT know that about Open-MPI. So I have installed the system version as opposed to the individual user version? Would one be required to load both in the same way? I'm terribly intrigued about environments, libraries, etc. -- Any resources you can offer would be quickly and thoroughly torn into. (Grade-A n00b here!)

3b. Can you please explain what this line is commanding?

Code:
[ -f foamDotFile ] && . foamDotFile WM_MPLIB=SYSTEMOPENMPI
My take on it is... "If the file 'foamDotFile' exists then source it." But now that you have added the WM_MPLIB argument, I am almost certained I have misinterpreted.
You've understood it correctly. What I added is used by OpenFOAM's bashrc file for exporting additional parameters. For more on this, read this blog post of mine: Advanced tips for working with the OpenFOAM shell environment

Quote:
Originally Posted by socon009 View Post
4. By the way, what tipped you off that OpenMPI was not loaded?
Says right in the error log that the mpi library wasn't being found.

Quote:
Originally Posted by socon009 View Post
5. All of my tars had been compressing to a minimum of 150 KB (regardless of uncompressed size)... and I believe the maximum attachable file size is 97.7 KB. Any hints?
The first errors are usually the most important ones. Edit the file and remove half of it or something like that...

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   May 17, 2012, 11:02
Default
  #6
New Member
 
Shaun
Join Date: May 2012
Posts: 14
Rep Power: 5
socon009 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
I vaguely remember that OpenFOAM requires 1 to 2 GB for a full build...
Usually the principle for a system wide installation is simple:
  1. Build on your home folder.
  2. When completed, switch to root mode and copy the OpenFOAM-* and ThirdParty-* folders to the target place, such as "/opt/OpenFOAM".
  3. Edit the file "/opt/OpenFOAM/OpenFOAM-*/etc/bashrc" and change the installation path in the file.
  4. Change permissions:
    Code:
    chown -R root:root /opt/OpenFOAM
    chmod -R o-Xr /opt/OpenFOAM
    I'll have to check these two commands, but I think it's correct.
Ok, understanding this is actually very important to me, as this will not be the only software that I will need to install for multiple users.

What you have stated above sounds like the procedure for installing OpenFOAM as a local user utilizing fewer root privileges using the $HOME directory path, followed by the creation of a "back up" or "reference" installation to be controlled (and distributed to others) by the system admin.

After the initial installation in the user's home directory, the root must COPY, (leaving the original in its place), the installation to the /opt/OpenFOAM directory and modify the bashrc file as well privileges.

At this point, it seems that there will be two installations on the system. (1) in the local user's directory, and (2) in the system's /opt/OpenFOAM directory.

Would one then be able to take the installation located in /opt/OpenFOAM and copy it to other users' directories?

Following that logic, would the installation located in /opt/OpenFOAM then act as a "back-up" installation while the others are in full user control?

If this is right, then "Hurray!" - that's what I'm looking for. If not, thank you for your patience and let me know if I need to just RTFM

Thanks,
Shaun
socon009 is offline   Reply With Quote

Old   May 17, 2012, 11:25
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Shaun,
Quote:
Originally Posted by socon009 View Post
Following that logic, would the installation located in /opt/OpenFOAM then act as a "back-up" installation while the others are in full user control?

If this is right, then "Hurray!" - that's what I'm looking for. If not, thank you for your patience and let me know if I need to just RTFM
The idea is to have a central installation, that users use without modifying. The original build is for the responsible to use as he/she deems necessary for updates and such.

The OpenFOAM user guide at least gives the idea that one should not modify the core code of OpenFOAM. Each user should always work on a copy of the tutorials, as well as building custom applications for themselves only. Example: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

I had assumed from the "/opt/OpenFOAM" reference that you were already familiar with the deb/rpm installations of OpenFOAM that exist for Ubuntu, Fedora and openSUSE.

As for installing other software to be shared with all users, it depends on the type of installation: if it's just a matter of installing, then you can do it directly as root. If you need to build code, do it in a safe place one or twice, to see what it really does... I know I wrote a longer description about this the other day... here we go: OpenFOAM 2.1.x linking error post #9

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   May 17, 2012, 12:04
Default
  #8
New Member
 
Shaun
Join Date: May 2012
Posts: 14
Rep Power: 5
socon009 is on a distinguished road
[QUOTE=wyldckat;361505]
Code:
module load openmpi-x86_64
export FOAM_INST_DIR=/opt/OpenFOAM 
foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.1.x/etc/bashrc 
[ -f $foamDotFile ] && . $foamDotFile WM_MPLIB=SYSTEMOPENMPI
Hmmm, returns...

Quote:
bash: mpicc: command not found
bash: mpicc: command not found
I also tried to find "mpicc" on my system. No luck.

But I definitely have tried "sudo yum install openmpi", etc., on multiple occassions.

Any thoughts?
socon009 is offline   Reply With Quote

Old   May 17, 2012, 18:26
Default
  #9
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Shaun,

This weekend perhaps I can checkout how this works, but for now I'd suggest that you check the manual for "module load":
Code:
man module
My guess is that there should be a second module for the development tools for Open-MPI.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   May 19, 2012, 11:38
Default
  #10
New Member
 
Shaun
Join Date: May 2012
Posts: 14
Rep Power: 5
socon009 is on a distinguished road
Ok, I will be sure to check this out.

While troubleshooting the missing soft links I discovered other issues with my system.

Seeing as there is no ubiquitously common knowledge that would help deduce what is causing the errors that I am experiencing, I want to thank everyone who has contributed thus far and take some time for personal study (and a possible system restore ).

You guys are great. Thank you for your selfless service to others in the CFD and FOSS communities. I hope to one day do the same.

Best,
Shaun
socon009 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
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 13:30
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 04:48
heat release in Fluent 6.2 Steve FLUENT 0 November 6, 2006 05:43


All times are GMT -4. The time now is 04:12.