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

OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 15, 2011, 09:07
Default
  #41
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17
Attesz is an unknown quantity at this point
Yes I added #include <stddef.h> to a file, so the compilation doesn't stop at 5% but at 49%.

Otherwise I'm still getting error:

Quote:
SOURCE=manualDecomp/manualDecomp.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/attila/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude -I/home/attila/OpenFOAM/OpenFOAM-1.6-ext/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/manualDecomp.o
/usr/bin/ld: cannot find -lscotchDecomp
collect2: ld returned 1 exit status
make: *** [/home/attila/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/libdecompositionMethods.so] Error 1
+ wmake libso lagrangian/basic
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file passiveParticle/passiveParticleCloud.C
Making dependency list for source file indexedParticle/indexedParticleCloud.C
The compilation hasn't finished yet. Maybe if I compile again, it will work.

Regards,
Attila
__________________
I am doing CFD Consulting Services.
Ich biete CFD Strömungssimulationen an.
Attesz is offline   Reply With Quote

Old   November 16, 2011, 03:38
Default
  #42
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17
Attesz is an unknown quantity at this point
Unfortunately the compilation doesn't still work. I attach the log file.

The errors are:

Quote:
linux64GccDPOpt/options:8: *** missing separator. Stop.
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created
and after that:

This is my options file:

Quote:
EXE_INC = -I$(SCOTCH_INCLUDE_DIR) -I../decompositionMethods/lnInclude



LIB_LIBS = -L$(SCOTCH_LIB_DIR) -lscotch -L$(SCOTCH_LIB_DIR) -lscotcherrexit


-lrt
Where is the missing separator? The line8 is the '-lrt'.


Quote:
/usr/bin/ld: cannot find -lscotchDecomp
collect2: ld returned 1 exit status
make: *** [/home/attila/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/libdecompositionMethods.so] Error 1
What is true, this file can't be found in that directory. Why? Is it a ThirdParty compilation error?


The 'cannot find' files are:
Quote:
lmeshTools
ldynamicMesh
lfiniteVolume
ldynamicMesh
lfaceDecompositionMotionSolver
lfvMotionSolver
lRBFMotionSolver
lmesquiteMotionSolver
lsolidBodyMotion
lsampling
lbasicThermophysicalModels
lreactionThermophysicalModels
lODE
lcompressibleTurbulenceModel

and so on...
log_Allwmake_secondRun.zip

Regards,
Attila
__________________
I am doing CFD Consulting Services.
Ich biete CFD Strömungssimulationen an.

Last edited by Attesz; November 16, 2011 at 04:07. Reason: adding info
Attesz is offline   Reply With Quote

Old   November 16, 2011, 07:24
Default
  #43
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17
Attesz is an unknown quantity at this point
Quote:
2) When I used the scotch from the ThirdParty directory (which compiled OK), the OF compilation complained about an undefined reference to 'clock_gettime'. I used the Ubuntu provided scotch, libscotch-5.1 and libscotch-dev packages to get it to build.
Hi,
how can I do this? I'm getting the same error message...

Thanks,
Attila
__________________
I am doing CFD Consulting Services.
Ich biete CFD Strömungssimulationen an.
Attesz is offline   Reply With Quote

Old   November 16, 2011, 07:32
Default
  #44
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17
Attesz is an unknown quantity at this point
Well.. I forget to add / to the end of line 7

COMPILED!! Can't believe it!

I will write the instructions to prevent the other beginners to waste a lot of time for this!

So David, thank you very much for your help!

I wish you the best,
Attila
__________________
I am doing CFD Consulting Services.
Ich biete CFD Strömungssimulationen an.
Attesz is offline   Reply With Quote

Old   November 16, 2011, 13:37
Default
  #45
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
Yay! That's a relief. Quite an ordeal - I'm glad you got it up and running. Now, go do some good science with it!

-Dave
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   January 13, 2012, 13:38
Default
  #46
Member
 
Diego Angeli
Join Date: Mar 2009
Posts: 31
Rep Power: 17
diego_angeli is on a distinguished road
Hello FOAMers,

I've been configuring my new flaming laptop these days and I went through the usual pains of compiling both the vanilla and extend OF versions on a Kubuntu 11.10 64 bit system.
I thought it would be good to share my experience with the build of 1.6-ext, so I'm revamping this useful thread and bringing forth some status update with respect to what it was discussed before.

Luckily enough, and thanks to this and other threads scattered around the CFD-online and the OF-extend forums, I managed to sort out the compilation of both the ThirdParty tools and 99% of all the 1.6-ext package. Although there is only a minor glitch still unsolved, I'm fine with the result. Here are some comments on what I did

0) First of all, let me say that Bruno's tutorial is very useful for setting up both dependencies and the environment.
Also this guide from Hakan Nilsson

After cloning the git repository I also created my own git branch to keep the master copy clean and do my tricks safely:

Code:
 git checkout -b myFixes
1) The porting to gcc-4.6 seems to be quite OK now, so the compiler works fine with both ThirdParty tools and FOAM apps and libs.
I had to modify the $WM_DIR/rules/linux64Gcc/c++ file according to the instruction at
this link
And, as David suggested here I modified the Make/options file for the scotchDecomp library

Quote:
Originally Posted by marupio View Post
You also need to add -lrt to linker options for scotch.
Code:
File: src/decompositionMethods/scotchDecomp/Make/options:
 LIB_LIBS = \
     -L$(SCOTCH_LIB_DIR) -lscotch \
     -L$(SCOTCH_LIB_DIR) -lscotcherrexit \
     -lrt
Compilation then went on flawlessly and without errors

2) The only issue regarding gcc-4.6 was on the mesquite library, which was rather well known.
Rather than following the advice of Chris (on this thread)
who suggested to revert to gcc-4.5 for compilation of mesquite, I followed the advice on
this post of the extend forum

Quote:
Mesquite-2.1.2 source-code gave some compilation errors. Thus, I have used the latest available version, updating the mesquite version in:

~/OpenFOAM®®/OpenFOAM®®-1.6-ext/ThirdParty/AllMake.stage3: rpm_make -p mesquite-2.99 -s mesquite-2.99.spec -u software.sandia.gov/~jakraft/mesquite-2.99.tar.gz

in /OpenFOAM®®/OpenFOAM®®-1.6-ext/etc/settings.sh :
[ -z "$MESQUITE_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/mesquite-2.99/platforms/$WM_OPTIONS ] && { _foamSource $WM_THIRD_PARTY_DIR/packages/mesquite-2.99/platforms/$WM_OPTIONS/etc/mesquite-2.99.sh }

and in ~/OpenFOAM®®/OpenFOAM®®-1.6-ext/ThirdParty/rpmBuild/SPECS/ :
mv mesquite-2.1.2.spec mesquite-2.99.spec
vim mesquite-2.99.spec : replace mesquite-2.1.2 with mesquite-2.99 ~/OpenFOAM®® $ cd OpenFOAM®®-1.6-ext/ ./Allwmake
And everything went fine

3) I managed to compile and install Paraview: here are three key tips:
a) Initially, the compilation of ParaView typically stops at 5%. As also explained by David for other packages (for which seemingly now all problems are fixed), the AllMake.stage4 script fails, but it will have downloaded all the necessary .tar.gz files to ThirdParty/rpmBuild/SOURCES. When AllMake runs, it unpacks these .tar.gz files into source directories in ThirdParty/rpmBuild/BUILD.
The hack to be done here is then quite ugly: one has to edit the tar.gz archive itself! Here it is:
- open the $WM_PROJECT_DIR/ThirdParty/rpmBuild/SOURCES/ParaView-3.10.1.tar.gz
- extract (or directly edit, if the archiving program allows for it) the file ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx
- added
Code:
#include <stddef.h>
at line 21
- (if needed) add the modified file to the archive, being careful to place it in the right position
- save the archive.
When the AllMake script is run again, the compilation now (as many of you reported) stops at 49%
b) as Stanislav suggests in this thread , in the /opt/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/SPECS/ParaView-3.10.1.spec file, line 153, statement
Code:
addCMakeVariable  OPENGL_gl_LIBRARY:STRING=
should be commented out. This brings compilation to full completion.
c) Two posts after, Stanislav offers the solution to the third and last issue: the AllMake.stage4 script exits with errors and no rpm is built.
One should go manually into the ParaView build directory and do the following:
Code:
./AllMake.stage4 # first try
cd rpmBuild/BUILD/ParaView-3.10.1/buildObj/
make install
cd ../../../../
./AllMake.stage4
This does the trick, even if the procedure starts over again. However, the whole package must then be installed manually, by copying the build directory:
Code:
cp -r rpmBuild/BUILDROOT/ParaView-3.10.1-linux64GccDPOpt.x86_64/opt/OpenFOAM/OpenFOAM-1.6.ext/ThirdParty/packages/ParaView-3.10.1/platforms/linux64GccDPOpt/*    ./packages/ParaView-3.10.1/platforms/linux64GccDPOpt/
One important thing about ParaView is that, currently, the etc/settings.sh file is still set to source the environment variable PARAVIEW_DIR by looking for ParaView 3.8.1, while, by default, the 3rd party script installs ParaView 3.10.1. Hence, one should open file etc/settings.sh, go to line 536, uncomment these two lines:
Code:
# [ -z "$PARAVIEW_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-3.10.1/platforms/$WM_OPTIONS ] && {
#    _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.10.1/platforms/$WM_OPTIONS/etc/ParaView-3.10.1.sh
and comment these two lines:
Code:
 [ -z "$PARAVIEW_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1/platforms/$WM_OPTIONS ] && {
    _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1/platforms/$WM_OPTIONS/etc/ParaView-3.8.1.sh
and this sets up correctly the environment.

4) Once I finally ran the cavity tutorial to test the installation, the only annoying thing was that the PV3FoamReader (correctly compiled and built) does not actually work: in fact, I had to select manually the reader to be used for the cavity.OpenFOAM file in a dialog when opening the results with ParaView.
I wanted to dig more into this, so I opened the Plugins->Manage Plugins menu in ParaView and I discovered that there was a problem in the libPV3FoamReader_SM plugin. Here it is
Code:
 libPV3FoamReader_SM Error
/opt/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/paraview_plugins/libPV3FoamReader_SM.so
Load Error, Plugin verification data mismatch in '/opt/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/paraview_plugins/libPV3FoamReader_SM.so'
/opt/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/ParMetis-3.1.1/platforms/linux64GccDPOpt/lib/libparmetis.so: undefined symbol: ompi_mpi_comm_world
It is very likely to be a problem with the ParMetis installation, but at this point I decided to stop and circumvent the issue by modifying the $WM_PROJECT_DIR/bin/paraFoam file in order for it to create the dummy case file with the .foam extension rather than with the .OpenFOAM one.
Code:
sed -i -e 's=\.OpenFOAM=\.foam=' $WM_PROJECT_DIR/bin/paraFoam
Finally, I've got everything in the right place, except from this minor "problem" which I'll leave pending. I hope that this summary of "tips" can be useful for anyone tackling the installation of OpenFOAM-1.6-ext in the near future.

Regards,

diego

Last edited by diego_angeli; January 17, 2012 at 05:53.
diego_angeli is offline   Reply With Quote

Reply

Tags
11.10, ext, of extended


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 1.7.1 installation problem on Fedora 14 armonica OpenFOAM Installation 16 March 31, 2011 14:16
Error in apt-get update for installation of OpenFoam 1.7.1 on Ubuntu 10.10 StuntedChicken OpenFOAM Installation 1 January 9, 2011 11:43
New openfoam installation fivos OpenFOAM Installation 5 April 1, 2009 04:58
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25


All times are GMT -4. The time now is 16:17.