CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Compiling with static libraries tracing OpenFoam (http://www.cfd-online.com/Forums/openfoam-installation/57316-compiling-static-libraries-tracing-openfoam.html)

jens_klostermann July 5, 2008 05:34

I want to trace (with vampirtr
 
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 :

3
(
empty
cyclic
patch
)


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

dm81 September 12, 2008 08:14

I recently had the same proble
 
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: http://gcc.gnu.org/ml/gcc-bugs/2002-08/msg00667.html. As it obviously has not been fixed it might be some kind of feature as well.

dm81 September 16, 2008 04:37

Hello, I just spend some da
 
Hello,

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.

Daniel


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