CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] ParaFoam or Praview segmentation fault only when I have a lib linked in controlDict (https://www.cfd-online.com/Forums/paraview/157262-parafoam-praview-segmentation-fault-only-when-i-have-lib-linked-controldict.html)

Luchini July 24, 2015 05:22

ParaFoam or Praview segmentation fault only when I have a lib linked in controlDict
 
Dear All,

My paraFoam/paraview crashes when i try to open a case with a specific library linked in the case controlDict.
If i comment the link in controlDict i have no problems paraFoam works perfectely.

If i leave the link parafoam (or paraview) crashes and i receive the message attached?

What do you think it is the problem?

Best regards,
and thank you for your ideas.





IN paraFoam:

Code:

--> FOAM Warning :
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1179
    dlopen error : /home/XXX/platforms/linux64GccDPOpt/lib/libYYY.so: undefined symbol: _ZTIN4Foam17psiChemistryModelE
--> FOAM Warning :
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load "/home/XXX/platforms/linux64GccDPOpt/lib/libYYY.so"

IN ParaView after the previous message i get also:

Code:

ERROR: In /home/YYY/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.cxx, line 216
vtkPV4FoamReader (0x2a20130): could not find valid OpenFOAM mesh


ERROR: In /home/ZZZ/ThirdParty-2.3.x/ParaView-4.1.0/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 754
vtkPVCompositeDataPipeline (0x4456dd0): Algorithm vtkPV4FoamReader(0x2a20130) returned failure for request: vtkInformation (0x44a4050)
  Debug: Off
  Modified Time: 90377
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_INFORMATION
  FORWARD_DIRECTION: 0
  ALGORITHM_AFTER_FORWARD: 1


wyldckat August 10, 2015 09:41

Quick answer:
  • The first error has to do with missing libraries that also need to be loaded. Keep in mind that your custom library will usually be loaded along with your solver, which already depends on other libraries. But the official ".OpenFOAM" plug-in reader for ParaView does not load all libraries that OpenFOAM has got, therefore you need to add the missing libraries to "libs" in "system/controlDict", such as... let me search with this command:
    Code:

    grep "_ZTIN4Foam17psiChemistryModelE" $FOAM_LIBBIN/*.so
    So it's either "libchemistryModel.so" or "libcombustionModels.so".
  • The second issue is most likely because the mesh doesn't exist yet, or the ".OpenFOAM" file that was opened is in the wrong folder?

Luchini August 10, 2015 12:50

Thank you a lot Bruno,

you are correct. The missing library was libcombustionModels.so.
Once it was added to controlDict the problem disappeared.

Said that, to solve the problem at the source, i have added the link to the libcombustionModels directly to the compilation of the original library, libYYY.so.

Probably you were correct also for the second error message, since the case is a multiregion, thus the actual folders are one directory up.


Once again, bless you.
Problem Solved
Thank you


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