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

Compiler in OpenFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2005, 11:48
Default just I installed OpenFoam on m
  #1
gulp
Guest
 
Posts: n/a
just I installed OpenFoam on my linux box. The installation text script runs with one critical error:

gcc ...figure
WARNING: Conflicting installations:
foam settings: /home/nico/OpenFOAM/linux/gcc-4.0.1/bin/gcc
current path : /usr/bin/gcc
CRITICAL ERROR


Additionally, the compiler does not work properly:

nico@haydn:~/OpenFOAM/nico-1.2/run/tutorials/icoFoam > blockMesh . cavity
blockMesh: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

On my system gcc is already installed under /usr/bin, and it works fine.

I want OpenFoam (as any other application) use this compiler. How can I do that?

(BTW, why insists OpenFoam on its own compiler?
Sorry, but I can't see any sense in installing quite the same compiler on the same system twice...)

kind regards,

Nico Hoffmann
  Reply With Quote

Old   November 26, 2005, 20:09
Default OpenFOAM frequently uses the v
  #2
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
OpenFOAM frequently uses the very latest C++ features available in the gcc compiler. It is thus necessary to use an up to date version, so shipping it with the code ensures compatibility.

If your compiler in /usr/bin is gcc 4.0.1 or later and you really desperately want to use it, then you can tell OpenFOAM about its location by editing the .bashrc file (or .cshrc) in the main OpenFOAM directory. The variable that you need to change is WM_COMPILER_DIR.
eugene is offline   Reply With Quote

Old   December 13, 2005, 16:47
Default Hello, I have a similar prob
  #3
boerrebj
Guest
 
Posts: n/a
Hello,
I have a similar problem in the sense that I already have a version of GCC and javac installed in /usr/bin/
Unfortunately these are not the same version as used in OpenFOAM so I have installed the GCC and JDK that was bundled with OpenFOAM. However, when I try to run the check, after sourcing OpenFOAM/.bashrc the old installations are still found first.
Is there a way to setup the .bashrc to overcome the issue of double installations of GCC and Java ?
  Reply With Quote

Old   December 14, 2005, 06:00
Default Have a look at the OpenFOAM-12
  #4
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Have a look at the OpenFOAM-12.2/bashrc lines 117-120.

It will prefix the OpenFOAM WM_COMPILER_BIN to the path so should find the OpenFOAM one first.

Put some print statements in there to find out what is going on.
mattijs is offline   Reply With Quote

Old   October 27, 2007, 12:36
Default I am also not been able to rec
  #5
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
I am also not been able to recompile the foam to run it in debug mode. I do not know what exactly is the problem. can any body tell me, is this because of gcc compiler or what?? i have two gcc compiler on my linux system. one default and one with the package. precompiled programs on my ststem is running quite ok. But so far I could not be able to run any own programm.

The error after recompiling using ./Allawake is :-

/home/343880/OpenFOAM/linux/paraview-2.4.4/include/vtkDataObject.h: In member function 'virtual void vtkDataObject::ReleaseDataFlagOn()':
/home/343880/OpenFOAM/linux/paraview-2.4.4/include/vtkDataObject.h:116: warning: use of old-style cast
/home/343880/OpenFOAM/linux/paraview-2.4.4/include/vtkDataObject.h: In member function 'virtual void vtkDataObject::ReleaseDataFlagOff()':
/home/343880/OpenFOAM/linux/paraview-2.4.4/include/vtkDataObject.h:116: warning: use of old-style cast
/home/343880/OpenFOAM/linux/paraview-2.4.4/include/vtkDataObject.h: In member function 'virtual void vtkDataObject::RequestExactExtentOn()':
/home/343880/OpenFOAM/linux/paraview-2.4.4/include/vtkDataObject.h:273: warning: use of old-style cast
/home/343880/OpenFOAM/linux/paraview-2.4.4/include/vtkDataObject.h: In member function 'virtual void vtkDataObject::RequestExactExtentOff()':
/home/343880/OpenFOAM/linux/paraview-2.4.4/include/vtkDataObject.h:273: warning: use of old-style cast
`/home/343880/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPDebug/libvtkFoam.so' is up to date.
make[3]: Leaving directory `/home/343880/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/grap hics/PVFoamReader/vtkFoam'
+ cd PVFoamReader
+ mkdir -p Make/linuxGccDPDebug
+ cd Make/linuxGccDPDebug
+ cmake ../..
./Allwmake: line 6: cmake: command not found
+ make
make[3]: Entering directory `/home/343880/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/grap hics/PVFoamReader/PVFoamReader/Make/linuxGccDPDebug'
make[3]: *** No targets specified and no makefile found. Stop.
make[3]: Leaving directory `/home/343880/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/grap hics/PVFoamReader/PVFoamReader/Make/linuxGccDPDebug'
make[2]: *** [PVFoamReader] Error 2
make[2]: Leaving directory `/home/343880/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/grap hics'
make[1]: *** [graphics] Error 2
make[1]: Leaving directory `/home/343880/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing'
make: *** [postProcessing] Error 2
+ '[' 0 = 1 -a '' = doc ']'
__________________
Thanks and regards,

Nishant
nishant_hull 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
OpenFoam vs CFX5 mass balance in OpenFoam tangd OpenFOAM Running, Solving & CFD 33 May 23, 2010 17:36
Question on specify gcc compiler for OpenFOAM 15 peterlai OpenFOAM Installation 2 October 2, 2008 08:20
OpenFOAM users in Munich OpenFOAM benutzer in M%c3%bcnchen jaswi OpenFOAM 0 August 3, 2007 14:11
OpenFOAM installation on AIX 53 with gnu 40 compiler chauvin OpenFOAM Installation 3 June 15, 2006 14:12
A new Howto on the OpenFOAM Wiki Compiling OpenFOAM under Unix mbeaudoin OpenFOAM Installation 2 April 28, 2006 09:54


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