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

Installation without root access

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

Like Tree5Likes
  • 1 Post By alexeym
  • 1 Post By wyldckat
  • 1 Post By louisgag
  • 1 Post By ddovizio
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   February 11, 2015, 10:44
Default Installation without root access
  #1
New Member
 
Join Date: Jun 2014
Posts: 9
Rep Power: 5
Chris_DSMC is on a distinguished road
Dear Community,

actually, I am facing an installation problem, which I can't solve by myself.

I am trying to compile OpenFOAM on a SUSE EL 11 system, where I do not have root access. The problem is, that parts of the libraries do not compile. For example "dsmcFields.o", which I need.

Obviously, this is because of the missing boost installation. Now my question: Is there any way to compile boost by myself and tell OpenFoam, where to search for these libraries?

Thank you all for your ideas in advance!
Chris_DSMC is offline   Reply With Quote

Old   February 11, 2015, 11:03
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,807
Rep Power: 31
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

In fact it is not so obvious with Boost. Can you please post the error?

To build Boost yourself, go to boost.org, download source tar-ball, unpack tar-ball, cd to the folder (it should be something like boost_1_5x_0), execute "./bootstrap -prefix=$HOME/boost/1.5x.0", then execute "./b2 install" (change x to the digit from the version you've downloaded). That's it, now you have Boost installed in your home folder. Add "export BOOST_ARCH_PATH=$HOME/boost/1.5x.0" to your prefs.sh.
alexeym is offline   Reply With Quote

Old   February 11, 2015, 13:12
Default
  #3
New Member
 
Join Date: Jun 2014
Posts: 9
Rep Power: 5
Chris_DSMC is on a distinguished road
Hi alexeym,

I followed your advise and compiled boost by myself.
The error appears anyway. When I compile the Third Party package the following error occurs at the end.

Code:
========================================
Build Metis decomposition
    optional component Metis was not found
========================================
Build CGAL
+ cgalPACKAGE=CGAL-4.3
+ boostPACKAGE=boost-system
+ gmpPACKAGE=gmp-system
+ mpfrPACKAGE=mpfr-system
+ wmakeCheckPwd /home/vacusim/nobackup/OpenFOAM/ThirdParty-2.3.x
+ . etc/tools/ThirdPartyFunctions
++ buildBASE=/home/vacusim/nobackup/OpenFOAM/ThirdParty-2.3.x/build/linux64Gcc
++ installBASE=/home/vacusim/nobackup/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc
++ unset WM_HOSTS WM_SCHEDULER
+++ wc -l
++ export WM_NCOMPPROCS=16
++ WM_NCOMPPROCS=16
++ '[' 16 -le 1 ']'
++ '[' 16 -ge 8 ']'
++ WM_NCOMPPROCS=8
+ '[' -n g++ ']'
+ export CXX=g++
+ CXX=g++
+ '[' 0 -gt 0 ']'
+ BOOST_ARCH_PATH=/home/vacusim/nobackup/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/boost-system
+ BOOST_SOURCE_DIR=/home/vacusim/nobackup/OpenFOAM/ThirdParty-2.3.x/boost-system
+ '[' -d /home/vacusim/nobackup/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/boost-system ']'
+ '[' -d /home/vacusim/nobackup/OpenFOAM/ThirdParty-2.3.x/boost-system ']'
+ boostInc=/usr/include
+ '[' 64 = 64 ']'
+ boostLib=/usr/lib64
+ '[' -f /usr/include/boost/version.hpp ']'
+ echo 'Boost does not appear to be installed'
Boost does not appear to be installed
+ echo 'stopping build'
stopping build
+ exit 1

========================================
Done ThirdParty Allwmake
========================================
I am wondering that it says:

Code:
+ BOOST_ARCH_PATH=/home/vacusim/nobackup/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/boost-system
When I print the variable in the terminal, it shows me the path to library-directory of boost, just like I set it.

Do you have any ideas?
Chris_DSMC is offline   Reply With Quote

Old   February 11, 2015, 15:27
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Greetings to all!

Check the instructions that are meant for CentOS 5.10: http://openfoamwiki.net/index.php/In...EL#CentOS_5.10 - namely steps #7, #9 and #13, where you can find the necessary hacks for using a custom built Boost.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   February 12, 2015, 04:20
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,807
Rep Power: 31
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

@Chris_DSMC, the reason for the behaviour are these lines in makeCGAL script:

Code:
BOOST_ARCH_PATH=$installBASE/$boostPACKAGE
BOOST_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$boostPACKAGE
I.e. it ignores your settings.

Also there are these lines:

Code:
elif [ -d "$BOOST_SOURCE_DIR" ]
then
    boostInc="$BOOST_ARCH_PATH/include"
    boostLib="$BOOST_ARCH_PATH/lib"
        
    echo "Starting build: boost"
...
I.e. if makeCGAL will be able to find sources of Boost in ThirdParty folder, it will build Boost. Values of the variables are:

Code:
boostPACKAGE=boost-system
...
BOOST_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$boostPACKAGE
I.e. move (or copy for start) Boost sources into ThirdParty/boost-system folder and run Allwmake.
alexeym is offline   Reply With Quote

Old   February 13, 2015, 05:52
Default
  #6
New Member
 
Join Date: Jun 2014
Posts: 9
Rep Power: 5
Chris_DSMC is on a distinguished road
Hi there,

thank you, for your answers.

@wyldckat:

I followed your advises for a custom boost build. When I try to build CGAL, it comes to the following error:

Code:
== Detect external libraries ==
-- External libraries supported: GMP;GMPXX;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;TAUCS;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL;Coin3D;NTL;IPE
-- Preconfiguring library: GMP ...
-- Found GMP: /usr/lib64/libgmp.so  
-- GMP has been preconfigured:
--   UseGMP-file:      
--   GMP include:      /usr/include
--   GMP libraries:    /usr/lib64/libgmp.so
--   GMP definitions:  
-- USING GMP_VERSION = '6.0.0'
-- Preconfiguring library: MPFR ...
-- Could NOT find MPFR (missing:  MPFR_LIBRARIES MPFR_INCLUDE_DIR) 
CMake Error at cmake/modules/CGAL_SetupDependencies.cmake:66 (message):
  CGAL requires MPFR to be found
Call Stack (most recent call first):
  CMakeLists.txt:589 (include)


-- Configuring incomplete, errors occurred!
See also "/home/vacusim/nobackup/OpenFOAM/ThirdParty-2.3.x/build/linux64Gcc/CGAL-4.3/CMakeFiles/CMakeOutput.log".
+ exit 1
I says, that somehow MPFR is missing. I do not exactly know, what these libraries do or how I can add them for building CGAL.

@alexeym:
I remember this error occuring, when I tried to build boost by my own a few days ago. I tried it in the same way, as you explained it, by copying the boost sources to ThirdParty/boost-system.

Have you any suggestions?

Thanks for your patience.

Chris
Chris_DSMC is offline   Reply With Quote

Old   February 13, 2015, 06:18
Default
  #7
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,807
Rep Power: 31
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

MPFR is The GNU MPFR Library. And it seems you do not have -devel package installed on your system.

makeGcc script contains lines necessary to build and install mpfr into right place. You can either download gmp (https://gmplib.org/) and mpfr (for 2.3.0 default versions are 5.0.4 and 3.1.0) sources, unpack them into ThirdParty folder and run makeGcc script. It will build gmp, mpfr, then fail on mpc library and exit.

Or you can try to use mpfr part of the makeGcc script alone to compile library.
wyldckat likes this.
alexeym is offline   Reply With Quote

Old   February 14, 2015, 12:31
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
@Chris: Or borrow even more steps and scripts from the aforementioned instructions: http://openfoamwiki.net/index.php/In...EL#CentOS_5.10

The detail is that the "getGcc" script provided by the instructions will get you the versions of "gcc, gmp, mpfr, mpc" that you choose, as demonstrated in step #11.

With any luck, starting at step #6 would get you a fully usable installation on SLES... but you might want to only to pick what you need from there...
kindle likes this.
wyldckat is offline   Reply With Quote

Old   February 19, 2015, 04:20
Default
  #9
New Member
 
Join Date: Jun 2014
Posts: 9
Rep Power: 5
Chris_DSMC is on a distinguished road
@wyldckat: This time I listened to you and made all the steps in your description.

The good news is, that everything went well and compiled. The next step for me is, to find out which steps I can omit, because at least the right gcc and cmake version is installed on the system. But I think I will do this later.

One last question, although this could be a complete different topic. One lib does not compile, yet. Because this problem is connected to source code, where I added some own stuff, I thought this is a mistake I did. The make.log file says this:
Code:
dsmcFields/dsmcFields.C:34:42: fatal error: boost/graph/graph_concepts.hpp: No such file or directory
 #include <boost/graph/graph_concepts.hpp>
                                          ^
compilation terminated.
make: *** [Make/linux64Gcc48DPOpt/dsmcFields.o] Error 1
The weird thing is, that all the other stuff, which uses boost compiles fine. And when I compile my code on my own Ubuntu machine, everything is fine. Honestly I have no idea what is happening here. In my own code I add the boost header like this:
Code:
#include <boost/graph/graph_concepts.hpp>
Which is the same, like anywhere else in the OpenFoam code I thought.

Anyway. Thank you for your help so far!
Chris_DSMC is offline   Reply With Quote

Old   February 19, 2015, 18:40
Default
  #10
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quick answer:
Code:
cat $FOAM_SRC/renumber/SloanRenumber/Make/options
Notice the lines that reference "BOOST_ARCH_PATH"?
wyldckat is offline   Reply With Quote

Old   May 7, 2015, 10:47
Default
  #11
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Milano, Italy
Posts: 259
Rep Power: 11
louisgag is on a distinguished road
Send a message via ICQ to louisgag
I had a similar problem with SloanRenumber complaining about not finding boost in the inexistent subdirectory of the third party software.

Ubuntu 14.04, OF2.3.x pulled today.

Thanks to Bruno's bug report ( http://www.openfoam.org/mantisbt/view.php?id=1173#c2874 ) I was able to follow a similar procedure and solve the issue using the following command:
Code:
ln -sT /usr/lib/x86_64-linux-gnu/libboost_thread.so $FOAM_LIBBIN/libboost_thread.so
wyldckat likes this.
louisgag is offline   Reply With Quote

Old   August 8, 2016, 09:35
Default
  #12
New Member
 
Daniele Dovizio
Join Date: Feb 2011
Posts: 6
Rep Power: 9
ddovizio is on a distinguished road
Dear All,
I am having a similar issue of Chris_DSMC during installation of OpenFOAM 4.0 on RH7.
I followed the steps in the wiki page
https://openfoamwiki.net/index.php/I...CentOS_SL_RHEL
I am using cmake-3.2.1, Gcc-4.8.5, gmp-5.1.2, mpfr-3.1.2, mpc-1.0.1 and CGAL-4.7.
However, after compiling CGAL I get the following warning:

CMake Warning:
Manually-specified variables were not used by the project:

GMPXX_INCLUDE_DIR
GMPXX_LIBRARIES


-- Build files have been written to: /software/OpenFOAM/ThirdParty-4.0/build/linux64Gcc/CGAL-4.7


When I try to compile OpenFOAM I get the following error:

== Detect external libraries ==
-- External libraries supported: GMP;GMPXX;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL ;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL;Coin3D;NTL;IPE
-- Preconfiguring library: GMP ...
-- Could NOT find GMP (missing: GMP_LIBRARIES GMP_INCLUDE_DIR)
CMake Error at cmake/modules/CGAL_SetupDependencies.cmake:66 (message):
CGAL requires GMP to be found
Call Stack (most recent call first):
CMakeLists.txt:649 (include)


-- Configuring incomplete, errors occurred!
See also "/software/OpenFOAM/ThirdParty-4.0/build/linux64Gcc/CGAL-4.7/CMakeFiles/CMakeOutput.log".
+ exit 1

I was wondering how I could make sure that the gmp libraries are corectly searched during OpenFOAM compilation, since the compilation of cmake, gcc, binutils and cgal were ok.
ddovizio is offline   Reply With Quote

Old   August 10, 2016, 03:40
Default
  #13
New Member
 
Daniele Dovizio
Join Date: Feb 2011
Posts: 6
Rep Power: 9
ddovizio is on a distinguished road
Resolved. I had to include the gmp and mpfr packages in the compilation:

./getGcc gcc-4.8.4 gmp-5.1.2 mpfr-3.1.2 mpc-1.0.1
./makeGcc gcc-4.8.4 gmp-5.1.2 mpfr-3.1.2 mpc-1.0.1
./makeCGAL gmp-5.1.2 mpfr-3.1.2

In the openfoamwiki page these are not included and resulted in compilation errors for me.
wyldckat likes this.
ddovizio is offline   Reply With Quote

Old   September 22, 2016, 10:39
Default
  #14
New Member
 
Pierre-Henri Musiedlak
Join Date: Dec 2015
Posts: 11
Rep Power: 4
phmusi is on a distinguished road
Hello Daniele,

I do get the same error. But I can't solve it
What is the getGcc you have? (i can't find it)

Cheers
phmusi is offline   Reply With Quote

Old   September 24, 2016, 13:59
Default
  #15
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quick answers:
Quote:
Originally Posted by ddovizio View Post
In the openfoamwiki page these are not included and resulted in compilation errors for me.
Thanks for reporting this. I've added it to the wiki, although I'm finding it very strange that it didn't work in your installation... maybe I forgot to double check the wiki page after I had made the test...


Quote:
Originally Posted by phmusi View Post
What is the getGcc you have? (i can't find it)
Are you following the instructions given here: https://openfoamwiki.net/index.php/I...HEL#CentOS_6.8 ??

If yes, then please try running (again) the following commands (first 2 are from step #13):
Code:
cd $WM_THIRD_PARTY_DIR
 
wget https://github.com/wyldckat/scripts4OpenFOAM3rdParty/raw/master/getQt

ls -l getQt
If the last command gives you an error message, then please let me know what was the output of the second command. Or you can simply download manually the file from the link that is shown to the right of the wget command.
__________________
wyldckat is offline   Reply With Quote

Old   September 27, 2016, 05:00
Default
  #16
New Member
 
Pierre-Henri Musiedlak
Join Date: Dec 2015
Posts: 11
Rep Power: 4
phmusi is on a distinguished road
Hello everyone - thanks for the help and the well described tutorials.

I am still facing a problem at step #13 where i can't manage to run without this error the ./makeQt:
Code:
Project ERROR: Package gstreamer-app-0.10 not found
make[1]: *** [WebCore/Makefile.WebKit] Error 2
make[1]: *** Waiting for unfinished jobs....
As I am not a moderator -I can't use
Code:
 yum install gstremer ...
So I download it and open it:
Code:
wget -P download http://mirror.centos.org/centos/6/os/x86_64/Packages/gstreamer-plugins-base-devel-0.10.29-2.el6.x86_64.rpm
tar -xjf download/gstreamer-plugins-base-devel-0.10.29-2.el6.x86_64.rpm
Then install it without root as explained here
HTML Code:
http://superuser.com/questions/209808/how-can-i-install-an-rpm-without-being-root
Code:
rpm2cpio gstreamer-plugins-base-devel-0.10.29-2.el6.x86_64.rpm.rpm | cpio -idv
Then I changed the name of the folder create through the install as
Code:
gstremer-app-0.10
to suit what the ./makeQt is looking for

still doesn't work
And even, the gstreamer-0.10 is already install in the cluster I am using! (in /usr/lib64 which is ../../usr/lib64/gstreamer-0.10/ from my $HOME or ../../../../usr/lib64/gstreamer-0.10/ from ThirdParty-4)

Any ideas will be helpfull

a remark:
I had a trouble with binutils - I couldn't download the folder due to a security connection I guess.
solution:
Code:
wget -P download http://ftp.gnu.org/gnu/binutils/binutils-2.23.1.tar.bz2
tar -xjf download/binutils-2.23.1.tar.bz2
mv binutils-2.23.1/ binutils-2.23
phmusi is offline   Reply With Quote

Old   September 29, 2016, 15:58
Default
  #17
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quick answer: I can't test this right now, but after a quick search: http://lists.qt-project.org/pipermai...il/016637.html - it seems that the following commands should help you to drop the dependency on gstreamer:
Code:
cd $WM_THIRD_PARTY_DIR
sed -i -e 's/\-opensource /-opensource -D ENABLE_VIDEO=0 /' makeQt
phmusi likes this.
__________________
wyldckat 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
Installation of OpenFOAM 2.3.0 / 2.3.x on RHEL 5.8 without root permissions niX1337 OpenFOAM Installation 7 January 12, 2015 04:43
Cannot configure OpenFOAM environment variable in CAE Linux 2011 TommiPLaiho OpenFOAM Installation 9 October 15, 2013 08:44
Environment errors with .deb install and ubuntu 13.04 64 bit jonathanbyrn OpenFOAM Installation 14 September 26, 2013 05:22
missing vtf3.h BPatch.h papi.h linch OpenFOAM Installation 41 July 24, 2012 14:45
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07


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