Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling against single precision OpenFOAM leads to undefined symbol errors #119

Closed
greole opened this issue May 9, 2024 · 0 comments · Fixed by #120
Closed

Compiling against single precision OpenFOAM leads to undefined symbol errors #119

greole opened this issue May 9, 2024 · 0 comments · Fixed by #120

Comments

@greole
Copy link
Collaborator

greole commented May 9, 2024

Currently, we only support DP scalars. Compiling against SP OpenFOAM leads to the following error.

v2312/platforms/linux64GccSPInt32Opt/lib/libOGL.so: undefined symbol: _ZNK4Foam9lduMatrix6solver11scalarSolveERNS_5FieldIdEERKS3_h

A workaround is to modify the CMakeLists.txt and set

  target_compile_definitions(OGL PUBLIC WM_LABEL_SIZE=32 WM_ARCH_OPTION=32
              NoRepository WM_SP)

here the important bit is to set WM_SP since this will be used with #ifdef macros to set the scalar type in scalar.H. Eventually this should be done automatically by cmake, by reading$WM_LABEL_SIZE and $WM_PRECISION_OPTION.

@greole greole linked a pull request May 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant