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

Dynamic_cast failing while postprocessing with paraFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 13, 2008, 09:02
Default Version: 1.5 When trying to
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
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, 11:42
Default Had the same problem but hadn'
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
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, 12:40
Default Hi Mattijs! It gets more my
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
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, 17:37
Default
  #4
New Member
 
Silvano
Join Date: Aug 2010
Location: Chicago /Torino Us/Italy
Posts: 11
Rep Power: 16
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


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] Install paraFoam on Windows for postprocessing melanie ParaView 11 March 13, 2010 18:44
[OpenFOAM] ParaFOAM ttdtud ParaView 2 May 29, 2008 10:08
[OpenFOAM] ParaFoam nzy102 ParaView 0 April 13, 2007 21:15
ParaFoam Ales Alajbegovic (Alajbegovic) OpenFOAM Installation 13 November 7, 2006 10:44
Adaptation failing in // Fluent case? Riaan FLUENT 0 February 3, 2006 15:57


All times are GMT -4. The time now is 22:48.