Skip to content

updated cmake files to build also with petsc solver#71

Open
happyKitesurfer wants to merge 2 commits into
mainfrom
feat/with_petsc
Open

updated cmake files to build also with petsc solver#71
happyKitesurfer wants to merge 2 commits into
mainfrom
feat/with_petsc

Conversation

@happyKitesurfer
Copy link
Copy Markdown
Collaborator

I updated the cmake files in order that the FoamAdapter can be build also with petsc

@github-actions
Copy link
Copy Markdown

Deployed test documentation to https://exasim-project.com/FoamAdapter/Build_PR_71


target_link_libraries(heatTransfer FoamAdapter)

if(NeoN_WITH_PETSC)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that this should actually be part of neons public API, i.e. if neon is build with PETSc support the neon_public_api target should introduce this dependency.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually strange. When I do not add this, the linker complains about undefined references even though neon is build with petsc. Actually the symbols should be defined in some NeoN libraries. I'll check again

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that is an issue on the neon side.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I solved the issue exasim-project/NeoN#327

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed to add

if(NeoN_WITH_PETSC) add_definitions(${PETSc_DEFINITIONS}) target_link_libraries(NeoN_public_api INTERFACE ${PETSc_LIBRARIES}) target_link_libraries(NeoN_public_api INTERFACE ${PETSc_LIBRARIES} ${PETSc_LIBRARY_DIRS}/libkokkoscore.so mpi) target_include_directories(NeoN_public_api INTERFACE ${PETSc_INCLUDE_DIRS}) target_link_directories(NeoN_public_api INTERFACE ${PETSc_LIBRARY_DIRS}) link_directories(${PETSc_LIBRARY_DIRS}) target_compile_definitions(NeoN_public_api INTERFACE NF_WITH_PETSC=1) else()

in include/CMakeLists.txt

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 this pull request may close these issues.

2 participants