Skip to content
Snippets Groups Projects
Commit 616a51a3 authored by Andrey Alekseenko's avatar Andrey Alekseenko
Browse files

Properly set compilation flags for OBJECT targets

Previously, some of the custom GROMACS flags were not properly passed.

Mostly warnings, but also `-fexcess-precision=fast` and `-funroll-all-loops`.

As a consequence, missing warnings allowed it to go unnoticed that
`pulling` module was compiled without OpenMP. This omission is also
fixed here.

Refs #4747
parent 51ea4f42
No related branches found
No related tags found
Loading
......@@ -95,3 +95,10 @@ Now, bonded force calculation on GPU is expected to be up to 3 times faster.
:issue:`3928`
Restored OpenMP acceleration of pulling routines
""""""""""""""""""""""""""""""""""""""""""""""""
During internal code reorganization, OpenMP acceleration was accidentally disabled
for pulling force calculation in |Gromacs| 2023. This is now fixed.
:issue:`4747`
......@@ -47,6 +47,9 @@ add_library(options OBJECT
treesupport.cpp
)
gmx_target_compile_options(options)
target_compile_definitions(options PRIVATE HAVE_CONFIG_H)
# Source files have the following private module dependencies.
target_link_libraries(options PRIVATE
legacy_api
......
......@@ -44,6 +44,10 @@ if (BUILD_SHARED_LIBS)
set_target_properties(pulling PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
# Set required compile flags
gmx_target_compile_options(pulling)
target_compile_definitions(pulling PRIVATE HAVE_CONFIG_H)
# Source files have the following dependencies on library infrastructure.
target_link_libraries(pulling PRIVATE
common
......@@ -68,6 +72,10 @@ target_link_libraries(pulling INTERFACE
legacy_api
)
if (GMX_OPENMP)
target_link_libraries(pulling PRIVATE OpenMP::OpenMP_CXX)
endif()
# TODO: when pulling is an OBJECT target
#target_link_libraries(pulling PUBLIC legacy_api)
#target_link_libraries(pulling PRIVATE common)
......
......@@ -45,6 +45,9 @@ if (BUILD_SHARED_LIBS)
set_target_properties(taskassignment PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
gmx_target_compile_options(taskassignment)
target_compile_definitions(taskassignment PRIVATE HAVE_CONFIG_H)
# Note that this is a higher-level module that should not need
# special compilation to suit e.g. GPU or MPI dependencies.
# If you find you want to do that, consider a preliminary
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment