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

Compilation - undefined symbol

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 16, 2019, 11:58
Default Compilation - undefined symbol
  #1
Member
 
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11
Robin.Kamenicky is on a distinguished road
Hello everyone,

I wonder whether somebody would be able to give me a hint.

I use OpenFOAM-dev updated about a year ago compiled from Openfoam.org.
OS is Ubuntu 16.04 LTS.

I developed a new wall boiling model boundary condition (BC), the compilation went well. The solver with the new BC runs also fine but when I want to decompose it, use Paraview or checkMesh I am getting undefined symbol:

Code:
case1:decomposePar -allRegions -force -dict system
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  dev
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : dev-674bff4031d4
Exec   : decomposePar -allRegions -force -dict system
Date   : Aug 16 2019
Time   : 16:45:39
Host   : "MAE-ROW-RK"
PID    : 7111
I/O    : uncollated
Case   : /home/robin/Desktop/UniOfStrathclyde/PhD/Modelling/OpenFOAM-dev/solverValidation/nie/case1
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM Warning : 
    From function void* Foam::dlOpen(const Foam::fileName&, bool)
    in file POSIX.C at line 1251
    dlopen error : /home/robin/OpenFOAM/robin-dev/platforms/linux64GccDPInt32Opt/lib/libreactingEulerianDevelopmentFvPatchFields.so: undefined symbol: _ZTIN4Foam12compressible58alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarFieldE
--> FOAM Warning : 
    From function bool Foam::dlLibraryTable::open(const Foam::fileName&, bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 105
    could not load "libreactingEulerianDevelopmentFvPatchFields.so"
Removing 6 existing processor directories
This would be nothing special if I would get the same warning during running the solver but I do not get warnings at all. Nevertheless, I am able to fix the symbolic error by including a particular library where the symbol is a weak object symbolized by “V”. However, then I got another symbol issue when I run ParaView, checkMesh or decomposePar but this time it ends with error:

Code:
case1:decomposePar -allRegions -force -dict system
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  dev
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : dev-674bff4031d4
Exec   : decomposePar -allRegions -force -dict system
Date   : Aug 16 2019
Time   : 15:44:26
Host   : "MAE-ROW-RK"
PID    : 20352
I/O    : uncollated
Case   : /home/robin/Desktop/UniOfStrathclyde/PhD/Modelling/OpenFOAM-dev/solverValidation/nie/case1
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM Warning : 
    From function void* Foam::dlOpen(const Foam::fileName&, bool)
    in file POSIX.C at line 1251
    dlopen error : /home/robin/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libreactingPhaseSystem.so: undefined symbol: _ZN4Foam15TurbulenceModelINS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEES4_NS_27compressibleTurbulenceModelENS_10phaseModelEE30dictionaryConstructorTablePtr_E
--> FOAM Warning : 
    From function bool Foam::dlLibraryTable::open(const Foam::fileName&, bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 105
    could not load "libreactingEulerianDevelopmentFvPatchFields.so"
Segmentation fault (core dumped)
I can look for the symbol using the following command

Code:
nm /home/robin/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/* | grep _ZN4Foam15TurbulenceModelINS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEES4_NS_27compressibleTurbulenceModelENS_10phaseModelEE30dictionaryConstructorTablePtr_E
But the symbol is not a weak object in any OpenFOAM library. It is either undefinied or BSS:

Code:
                 U _ZN4Foam15TurbulenceModelINS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEES4_NS_27compressibleTurbulenceModelENS_10phaseModelEE30dictionaryConstructorTablePtr_E
000000000033d3c0 B _ZN4Foam15TurbulenceModelINS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEES4_NS_27compressibleTurbulenceModelENS_10phaseModelEE30dictionaryConstructorTablePtr_E
0000000000465220 B _ZN4Foam15TurbulenceModelINS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEES4_NS_27compressibleTurbulenceModelENS_10phaseModelEE30dictionaryConstructorTablePtr_E
                 U _ZN4Foam15TurbulenceModelINS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEES4_NS_27compressibleTurbulenceModelENS_10phaseModelEE30dictionaryConstructorTablePtr_E
000000000046d2e0 B _ZN4Foam15TurbulenceModelINS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEES4_NS_27compressibleTurbulenceModelENS_10phaseModelEE30dictionaryConstructorTablePtr_E
Can somebody try to explain to me this behaviour.

There are two ways around.
  1. Exclude my library from controDict when I run some of the commands such as decomposePar and then included it just for the solver itself.
  2. Omit all libraries from Make/options this causes warnings about the first undefined symbol but no errors. Again only for various utilities, not solver.

My question is, why there is no symbol symbolized as "V" and why it does not give symbolic warning/error when I run the solvers but when I run utilities. This would mean that the symbol is not needed for the solver but I am no that sure.

Thank you,
Robin
Robin.Kamenicky 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
Caffa 3D code Waliur Rahman Main CFD Forum 0 May 29, 2018 00:53
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 12:38
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 00:34


All times are GMT -4. The time now is 01:30.