GROMACS version: 2022
GROMACS modification: Yes
Hi, I am trying to port the flow binning code by @pjohansson (GitHub - pjohansson/gromacs-flow-field: Flow field collection and output for GROMACS) to the release version of Gromacs 2022 (src/gromacs/mdrun · release-2022 · GROMACS / GROMACS · GitLab).
The library only consists in a source and its header, respectively src/gromacs/flow/flow_field.cpp
and src/gromacs/flow/flow_field.h
; the header is included in /src/gromacs/mdrun/md.cpp
and there some functions are called. It also comes with its CMakeList.txt
:
file(GLOB FLOW_SOURCES *.cpp)
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${FLOW_SOURCES} PARENT_SCOPE)
Now, I can easily build the code for Gromacs 2021, but when it comes to 2022 I get the following error:
../../lib/libgromacs.so.7.0.0: undefined reference to `flow_collect_or_output(FlowData&, unsigned long, t_commrec const*, t_inputrec const*, t_mdatoms const*, t_state const*, SimulationGroups const*)'
../../lib/libgromacs.so.7.0.0: undefined reference to `print_flow_collection_information(FlowData const&, double)'
../../lib/libgromacs.so.7.0.0: undefined reference to `init_flow_container(int, t_filenm const*, t_inputrec const*, SimulationGroups const*, t_state const*)'
I suspect the problem has to do with cmake
. If I do a quick grep
I notice that the Makefile of 2021 contains the instructions to build the library, while the one of 2022 doesn’t. Has something changed in the cmake between 2021 and 2022? Is the CMakeList.txt
incorrect?