CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Installation

Compiling with static libraries tracing OpenFoam

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

LinkBack Thread Tools Display Modes
Old   July 5, 2008, 05:34
Default I want to trace (with vampirtr
Senior Member
Jens Klostermann
Join Date: Mar 2009
Posts: 117
Rep Power: 10
jens_klostermann is on a distinguished road
I want to trace (with vampirtrace) some solvers of OpenFoam. For the beginning I just use icoFoam. For this I have to compile all the libraries I want to trace as static libs (wmake lib instead of libso).

Some useful hints about static linking I got from this old thread Case-insensitive unpacking and windows/macos by By Niklas Nordin on Wednesday, August 17, 2005 - 05:55 am.

Unfortunately I get the same errors


Default patch type set to empty

--> FOAM FATAL ERROR : Unknown polyPatch type wall

Valid polyPatch types are :


Function: polyPatch::New(const word&, const word&, const label, const label, const label, const polyBoundaryMesh&)
in file: meshes/polyMesh/polyPatches/polyPatch/newPolyPatch.C at line: 66.

FOAM exiting

Are there any hints to get rid of this unknown patch problem. Maybe from the windows-port guys (or are they able to worke with shared libs now?)

jens_klostermann is offline   Reply With Quote

Old   September 12, 2008, 08:14
Default I recently had the same proble
New Member
Daniel Molka
Join Date: Mar 2009
Location: Dresden, Germany
Posts: 2
Rep Power: 0
dm81 is on a distinguished road
I recently had the same problem. The current workaround is to use "wmake libo" instead of "wmake lib" and build the .a files with ar. As mentioned in the other Thread the problem seems to be caused by missing or incomplete initialisation of static objects. I do not really understand why it makes a difference, but the libs containing one big .o file instead of many small ones work. All I could find about this strange behaviour is this 6 year old bugreport: As it obviously has not been fixed it might be some kind of feature as well.
dm81 is offline   Reply With Quote

Old   September 16, 2008, 04:37
Default Hello, I just spend some da
New Member
Daniel Molka
Join Date: Mar 2009
Location: Dresden, Germany
Posts: 2
Rep Power: 0
dm81 is on a distinguished road

I just spend some days on another problem with tracing OpenFOAM using vampirtrace. I finally had a working static linked version of OpenFOAM. But when I started to use vampirtrace I got segmentation faults. The problem was that OpenFOAM includes an own libz. As I replaced the gcc/g++ in the wmake rules with vtcc/vtcxx the libz was instrumented too. Unfortunatelly vampirtrace uses libz to compress tracefiles when flushing its buffer. But this creates events when the libz is instrumented, which cannot be stored as the buffer is full when it is flushed during the run. So DO NOT COMPILE LIBZ WITH VAMPIRTRACE WRAPPERS.

dm81 is offline   Reply With Quote


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
Problem compiling OpenFOAM on AIX 53 haunschmid OpenFOAM Installation 1 October 17, 2006 12:58
Compiling errors for OpenFOAM 13 brucejimo OpenFOAM Installation 3 October 5, 2006 00:01
A new Howto on the OpenFOAM Wiki Compiling OpenFOAM under Unix mbeaudoin OpenFOAM Installation 2 April 28, 2006 08:54
CGNS libraries, compiling and linking... Ironman80 Main CFD Forum 2 February 14, 2006 23:36
Compiling openfoam zaferleylek OpenFOAM Installation 0 November 7, 2005 08:01

All times are GMT -4. The time now is 20:52.