Fix a bug in GROMACS-2025.0 incomplete patch.#1380
Fix a bug in GROMACS-2025.0 incomplete patch.#1380aalhossary wants to merge 1 commit intoplumed:masterfrom
Conversation
|
Thanks for you contribution Are you sure about this? This should have been caught by the gromacs CI before the release of GMX 2025 and it should matter also all the other modules that are included in gromacs (like colvar). |
|
Calling |
|
@Iximiel do I remember correctly that this was a bug that we fixed after gromacs beta but gromacs developers preferred not to include? And that it is solved by patching? |
The lack of the multisim is not a bug, is a missing feature. We did not manage to put it in time for the 2025, and then we left the PR open...
The change proposed do not impact the behaviour of the patch. If I remember well,Cmake is intended to be run at least twice: configuration (in which things changes) and generation (in which settings are not touched and it is supposed to create the compilation procedure), look at how the various cmake guis behave, so that the order in which the cache is populated should not be a problem. @aalhossary the problem--symptom couple you have indicated in the opening message is not the problem you are talking about in your second comment. This leave me a bit confused |
|
@Iximiel can you confirm that if one applies the patch then the problem is solved? |
|
I just checked, @GiovanniBussi the "multisim" machinery is in the 2025 patch we deliver with plumed since 2.10.0 |
Description
Problem
GROMACS 2025.0 has a CMake ordering bug that prevents the real PLUMED module from being compiled, even when
GMX_USE_PLUMED=ONis set.Symptom
When running
gmx_mpi mdrun -plumed plumed.dat, users get:Even though GROMACS was configured with
-DGMX_USE_PLUMED=ON.Root Cause
In
src/gromacs/CMakeLists.txt:add_subdirectory(applied_forces)- checksGMX_PLUMED_ACTIVEvariablegmx_manage_plumed()- setsGMX_PLUMED_ACTIVE=ONThe variable is checked before it's set, causing CMake to always compile the stub (
plumedMDModule_stub.cpp) instead of the real PLUMED module (plumedMDModule.cpp).Solution
Move
gmx_manage_plumed()call to beforeadd_subdirectory(applied_forces).Type of contribution
Copyright
COPYRIGHTfile with the correct license information. Code should be released under an open source license. I also used the commandcd src && ./header.sh mymodulenamein order to make sure the headers of the module are correct.Tests