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

Dynamic_cast failing while postprocessing with paraFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 13, 2008, 08:02
Default Version: 1.5 When trying to
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,837
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Version: 1.5

When trying to postprocess a case with my own boundary conditions that are included using

libs ( "libcompressibleFluxBCs.so" );

in system/controlDict. paraFoam fails when loading the data with this very strange fatal error:

Attempt to cast type N4Foam5token8CompoundINS_4ListIdEEEE to type N4Foam5token8CompoundINS_4ListIdEEEE
From function dynamicCast<to>(From&)
in file /home/bgschaid/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/typeInfo.H at line 87.

(Note that the types in the error message are identical). The case loads OK when I comment out the libs entry OR when I modify the entry to

libs ( "libOpenFOAM.so" "libcompressibleFluxBCs.so" );

but not when I modify it to

libs ( "libcompressibleFluxBCs.so" "libOpenFOAM.so");

So obviously I have to force libOpenFOAM.so to be loaded before the UDFs.

As all my systems are CentOS 5 with 64 bit I can't check whether this is a problem with the ld of that system or a general problem

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   August 13, 2008, 10:42
Default Had the same problem but hadn'
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 15
mattijs is on a distinguished road
Had the same problem but hadn't found out that workaround. The interesting bit is that it works for normal OF execution.

Paraview uses 'dlopen' to load the OpenFOAM reader which then does a dlopen to load those libraries. Is there something on dlopen where recursive invocation resets some flags (RTLD_LOCAL etc)? Or maybe bug?
mattijs is offline   Reply With Quote

Old   August 13, 2008, 11:40
Default Hi Mattijs! It gets more my
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,837
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Mattijs!

It gets more mysterious. I tried it on my Mac and there it works without the workaround. I checked: dlopen is called with the same parameters there. So I guess the problem is with the glibc-implementation of dlopen

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   August 20, 2010, 16:37
Default
  #4
New Member
 
Silvano
Join Date: Aug 2010
Location: Chicago /Torino Us/Italy
Posts: 11
Rep Power: 6
SilPaut is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Version: 1.5

When trying to postprocess a case with my own boundary conditions that are included using

libs ( "libcompressibleFluxBCs.so" );

in system/controlDict. paraFoam fails when loading the data with this very strange fatal error:

Attempt to cast type N4Foam5token8CompoundINS_4ListIdEEEE to type N4Foam5token8CompoundINS_4ListIdEEEE
From function dynamicCast<to>(From&)
in file /home/bgschaid/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/typeInfo.H at line 87.

(Note that the types in the error message are identical). The case loads OK when I comment out the libs entry OR when I modify the entry to

libs ( "libOpenFOAM.so" "libcompressibleFluxBCs.so" );

but not when I modify it to

libs ( "libcompressibleFluxBCs.so" "libOpenFOAM.so");

So obviously I have to force libOpenFOAM.so to be loaded before the UDFs.

As all my systems are CentOS 5 with 64 bit I can't check whether this is a problem with the ld of that system or a general problem

Bernhard
Hi guys,
I'm trying to run the test case of "alternateReactingFoam solver" which use the "libcompressibleFluxBCs.so", but I don't have it installed on computer.
So I get the warming:

Code:
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 86
    could not load libcompressibleFluxBCs.so: cannot open shared object file: No such file or directory
Can you please tell me what that library do? and how I can install it?

thank you!

Silvano
SilPaut 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
Install paraFoam on Windows for postprocessing melanie OpenFOAM Paraview & paraFoam 11 March 13, 2010 17:44
ParaFOAM ttdtud OpenFOAM Paraview & paraFoam 2 May 29, 2008 09:08
ParaFoam nzy102 OpenFOAM Paraview & paraFoam 0 April 13, 2007 20:15
ParaFoam Ales Alajbegovic (Alajbegovic) OpenFOAM Installation 13 November 7, 2006 09:44
Adaptation failing in // Fluent case? Riaan FLUENT 0 February 3, 2006 14:57


All times are GMT -4. The time now is 19:40.