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

[OpenFOAM.org] Installation of OpenFOAM 2.3.0 / 2.3.x on RHEL 5.8 without root permissions

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

Like Tree5Likes
  • 1 Post By wyldckat
  • 4 Post By niX1337

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2014, 11:04
Default Installation of OpenFOAM 2.3.0 / 2.3.x on RHEL 5.8 without root permissions
  #1
New Member
 
Nicolas B.
Join Date: Jul 2014
Location: Munich, Germany
Posts: 5
Rep Power: 9
niX1337 is on a distinguished road
Hi all,

I would like to install OpenFOAM 2.3.0 / 2.3.x on my RHEL 5.8 Workstation. As I do not have root access I cannot install the necessary packages as suggested here.

Is there a workaround for non-root users on RHEL 5.8? I found a precompiled CentOS version of OF 2.2.x (centFOAM) but this one is also not working on my system (my system gcc is 4.1.2) and I would need OF 2.3.x or at least 2.3.0 anyway.

Best Regards
Nicolas
niX1337 is offline   Reply With Quote

Old   December 14, 2014, 13:10
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,962
Blog Entries: 45
Rep Power: 125
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Nicolas,

It's really hard to create instructions for building OpenFOAM from source code without root permissions, because it really depends on which packages are already installed the system you're using.

Honestly, beyond CentFOAM, there are 3 other sort-of simple ways for you to do this:
  1. Ask nicely your system's administrator to install the essential packages for building OpenFOAM and ParaView from source code.
  2. Or install RHEL 5.8 or CentOS 5.8 in a virtual machine and then copy the installation from the virtual machine to the real machine. It's essentially what CentFOAM does. Example: http://openfoamwiki.net/index.php/Ho..._VMware_Player
  3. Try following the installation instructions in the wiki and ignore the first steps that need root permissions. Let us know what errors you find and we can try helping from there.
Best regards,
Bruno
OpenFoamlove likes this.
__________________
wyldckat is offline   Reply With Quote

Old   December 19, 2014, 09:51
Default
  #3
New Member
 
Nicolas B.
Join Date: Jul 2014
Location: Munich, Germany
Posts: 5
Rep Power: 9
niX1337 is on a distinguished road
Hello Bruno,

thank you for your answer!

The first option is unfortunately not possible in my case.

The second option sounds good to me. But I do not yet understand how to copy the packages that are installed by the package manager in the virtual machine. Do I just have to browse to the system directories in the virtual machine, copy all necesssary folders, put them in e.g. "./OpenFOAM/tools" on my native RHEL 5.8 and then load all the excecutables into the environment? Mabye this question sounds a little silly, but I do not have a very strong linux background...

I will save the last option in case option two fails.

Thanks for your help!

Best Regards,
Nicolas
niX1337 is offline   Reply With Quote

Old   December 23, 2014, 08:52
Default
  #4
New Member
 
Nicolas B.
Join Date: Jul 2014
Location: Munich, Germany
Posts: 5
Rep Power: 9
niX1337 is on a distinguished road
Hello Bruno,

in the meantime I started to compile OF 2.3.x without root permission. I followed your advice and skipped the first steps of the installation instructions in the wiki for CentOS 5.10.

Out of the list of necessary packages, these were already installed on my workstation:
  • Development Tools
  • zlib-devel
  • readline
  • texinfo
  • libXext-devel
  • libXt-devel
As openmpi was missing, I compiled it from source and loaded it into the environment. "mpirun --version" gives:
Code:
mpirun (Open MPI) 1.4

Report bugs to http://www.open-mpi.org/community/help/
I was able to bulid CMake, GCC and CGAL as explained in the installation instructions. But as soon as I try to bulid OpenFOAM, the compilation fails.

In the logfile the first entry is:
Code:
flex wmkdep.l.l
flex: fatal internal error, exec failed
make: *** [/net/capc187/fs1/proj/openfoam-1/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/linux64Gcc48/wmkdep] Broken pipe
This error is followed by several other errors, which sound like this:
Code:
...
collect2: error: ld returned 1 exit status
...
You can find a closer description in the attached logfile.

I also followed the second way you propsed and set up centOS 5.8 in a virtual machine. On the fresh OS I reproduced the situation as it is on my RHEL 5.8 workstation. That means I only installed the above listened packages before I started the installation instructions for OpenFOAM. Surprisingly I could compile OF without any problems here.

Could the first error at the beginning of logfile have somesthing to do with my flex version? "flex --version" shows "2.5.35" for RHEL 5.8 and "2.5.4" in the VM.

Any further suggestions would be greatly appreciated!

Best regards,
Nicolas
Attached Files
File Type: zip make.zip (27.3 KB, 4 views)
niX1337 is offline   Reply With Quote

Old   December 30, 2014, 06:21
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,962
Blog Entries: 45
Rep Power: 125
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Nicolas,

I've finally managed to look into this, but haven't managed to do the necessary tests to reproduce the same error .

Let's see:
  • Regarding the transfer of the installation from the virtual machine, in theory you can create a massive tarball of the whole OpenFOAM folder from the virtual machine and then unpack it in the relative location at your workstation.
    • The relative location I'm referring to is "$HOME", indicated by this command:
      Code:
      echo $HOME
    • For example, to pack:
      Code:
      cd $HOME
      cd OpenFOAM
      tar -czf OpenFOAM-2.3.1-full.tar.gz OpenFOAM-2.3.1
      tar -czf ThirdParty-2.3.1-full.tar.gz ThirdParty-2.3.1
    • To unpack:
      Code:
      cd $HOME
      mkdir OpenFOAM
      cd OpenFOAM
      tar -xzf OpenFOAM-2.3.1-full.tar.gz
      tar -xzf ThirdParty-2.3.1-full.tar.gz
  • Forgot to tell you that you didn't need to manually compile Open-MPI 1.4, since you can simply remove the option "SYSTEMOPENMPI" from the instructions and it will by default build its own Open-MPI, which is in the "ThirdParty-*" folder.
  • In the virtual machine with CentOS 5.8, if you ran this command:
    Code:
    yum upgrade
    then you now have CentOS 5.11 and not 5.8. Check the contents of the file "/etc/redhat-release" to confirm this.
  • The error messages you have gotten in the log file seem to hint that something went wrong somewhere during the build process of GCC or "binutils". My guess is that most of the OpenFOAM source code got built with the system's GCC (4.1.2 I think) and then in a second pass it used GCC 4.8.1.
My advice would be to:
  1. In the workstation, try following these instructions to the letter, i.e. install OpenFOAM 2.3.1: http://openfoamwiki.net/index.php/In...EL#CentOS_5.10 - at least for testing if things work out correctly. Keep in mind that every single line of code is important and that each log file is also important.
    I myself have failed sometimes to run some occasional lines of code from those wiki pages, which results in not having things working exactly as they should.
  2. In the virtual machine, if you ran "yum upgrade", then I suggest that you start another new virtual machine with CentOS 5.8. Sorry about that, but upgrading is important, but in this case, it can lead to differences that are simply too big.
Beyond this, I do have plans to write a more detailed DIY installation of OpenFOAM for any scenario, but haven't managed to get enough time and inspiration to do it all...


Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   January 7, 2015, 13:01
Default flex error solved, new errors while mesh utilities are compiled
  #6
New Member
 
Nicolas B.
Join Date: Jul 2014
Location: Munich, Germany
Posts: 5
Rep Power: 9
niX1337 is on a distinguished road
Hi Bruno,

thank you for your advice.

In terms of the RHEL 5.8 virtual machine, I did not do any updates and could thus create the archives and transfer them to my workstation. But so far I did not yet test whether they work in the new environment.

As I will have to do the same procedure on a cluster (also without admin access and with a different OS) my focus is still on the direct compilation on my workstation. I found out that the different versions of flex were indeed the reason for the mentioned error. There was a bug in this specific version. As soon as I compiled flex 2.5.39 from source, I was able to build a large part of the OF excecutables without errors. But there are still some new errors which are all related to mesh utilities (see attached log file):
Code:
...
lnInclude/CGALTriangulation3DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_3.h: No such file or directory
...
My first guess is that it must have something to do with missing packages (those I could not install as a normal user). The log files of all ThirdParty apps do not show any problem (also CGAL was built successfully). Is there an easy way to get rid of this error?

Again thank you a lot for your kind help!

Best regards,
Nicolas
Attached Files
File Type: zip make2.zip (13.8 KB, 2 views)
niX1337 is offline   Reply With Quote

Old   January 10, 2015, 16:06
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,962
Blog Entries: 45
Rep Power: 125
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Nicolas,

About CGAL: cmake wasn't built with success or something happened that led it to not be seen on the command line:
Code:
./makeCGAL: line 265: cmake: command not found
Pay close attention to the details in step #10, namely the one related to building cmake: http://openfoamwiki.net/index.php/In...EL#CentOS_5.10

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   January 12, 2015, 03:43
Default
  #8
New Member
 
Nicolas B.
Join Date: Jul 2014
Location: Munich, Germany
Posts: 5
Rep Power: 9
niX1337 is on a distinguished road
Hello Bruno,

my bad, I have no idea why it did not work for OF 2.3.1 ... but it worked perfectly with OF 2.3.x. That's why I guess I made a mistake during the 2.3.1 compilation.

To summarize for those who need to install OpenFOAM without admin rights:
  • Skip the root commands in the instructions.
  • Whenever an error occurs, start with the log file, go into the make files and try to find out which package could have caused the issue. For me it was a buggy flex version.
  • Compile the neccessary package on your own and load the excecutables into the environment (make sure you add the path on the beginning of $PATH).
  • Retry the compilation process.
As paraview requires too many packages that are missing on my workstation, I simply installed the binary version from the paraview website. To link paraview with OpenFOAM, I use the "paraFoam -bulitin" option. Only the $Paraview_DIR variable needs to be edited.

Bruno, thanks again for your kind help!

Best regards,
Nicolas
wyldckat, hjj3118, shang and 1 others like this.
niX1337 is offline   Reply With Quote

Reply

Tags
2.3.x, non-root, rhel 5.8

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
[OpenFOAM.org] Installation notes: OpenFOAM 2.3.x (git repo) on OSX 10.9 opedrofunk OpenFOAM Installation 7 July 1, 2015 13:51
Openfoam installation error RHEL hcs129 OpenFOAM Installation 3 March 6, 2014 21:44
OpenFOAM-1.7.0 for CentOS/RHEL/SL 5.x 64bit released linnemann OpenFOAM Installation 66 October 26, 2013 13:04
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25


All times are GMT -4. The time now is 03:31.