From 99448920de7fd99deff0ff0767b639187304010f Mon Sep 17 00:00:00 2001 From: mertcan <149396759+Puncist@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:36:58 +0200 Subject: [PATCH 1/5] now git ignores coverage output (#1127) Co-authored-by: = --- developer-doc/.gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/developer-doc/.gitignore b/developer-doc/.gitignore index 975bc156cc..42e5b08651 100644 --- a/developer-doc/.gitignore +++ b/developer-doc/.gitignore @@ -5,5 +5,6 @@ /*PP.txt /links-to-user-manual.md /plumedcheck.md -/coverage +/coverage*/ +/coverage* From 430fce6e73e1bc973cb128b8fd842daec0642126 Mon Sep 17 00:00:00 2001 From: Carlo Camilloni Date: Thu, 10 Oct 2024 12:00:31 +0200 Subject: [PATCH 2/5] changes --- CHANGES/v2.9.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES/v2.9.md b/CHANGES/v2.9.md index 7fcd4b30c9..74f263dcc6 100644 --- a/CHANGES/v2.9.md +++ b/CHANGES/v2.9.md @@ -63,3 +63,5 @@ Changes from version 2.8 which are relevant for users: - new patch for GROMACS 2024 - Small optimization of \ref COORDINATION and related collective variables (\issue{1096}). +## Version 2.9.3 (tba) + - Patch for GROMACS 2024 was updated to fix a big issue preventing its use From c28e2d071ac496cc35b8505af789e78218d44f07 Mon Sep 17 00:00:00 2001 From: Daniele Date: Thu, 10 Oct 2024 14:31:39 +0200 Subject: [PATCH 3/5] Compiling with NVHPC (#1076) * now nvhpc24.3 compiles * upgrade to the workflow * changed the position of the define near to where it is needed * Update MergeVectorTools.h on GH * Update MergeVectorTools.h: adding a more explanatory comment * small modification to the CI * changing again linuxWF for nvhpc --------- Co-authored-by: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com> --- .github/workflows/linuxWF.yml | 14 ++++++++++++++ src/tools/MergeVectorTools.h | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linuxWF.yml b/.github/workflows/linuxWF.yml index 21a1237ea2..78fb39b3aa 100644 --- a/.github/workflows/linuxWF.yml +++ b/.github/workflows/linuxWF.yml @@ -28,6 +28,8 @@ jobs: # see https://github.com/plumed/plumed2/issues/976 - -intel- - -pycv-mpi- +#this does not install mpi but uses the internal one + - -nvhpc-mpi- steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 @@ -136,6 +138,18 @@ jobs: echo "CXX=icpx" >> $GITHUB_ENV echo "CC=icx" >> $GITHUB_ENV echo "FC=ifx" >> $GITHUB_ENV + - name: Install NVHPC compiler + if: contains( matrix.variant, '-nvhpc-' ) + # use this if it does not work + # wget https://developer.download.nvidia.com/hpc-sdk/24.3/nvhpc_2024_243_Linux_x86_64_cuda_12.3.tar.gz + # tar xpzf nvhpc_2024_243_Linux_x86_64_cuda_12.3.tar.gz + # nvhpc_2024_243_Linux_x86_64_cuda_12.3/install + run: | + curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg + echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list + sudo apt-get update -y + sudo apt-get install -y nvhpc-24-3 + # nvhpcinstalls his own mpi compilers - name: Install MPI # install MPI at last since it modifies CC and CXX if: contains( matrix.variant, '-mpi-' ) diff --git a/src/tools/MergeVectorTools.h b/src/tools/MergeVectorTools.h index 34400b8d66..195d82a869 100644 --- a/src/tools/MergeVectorTools.h +++ b/src/tools/MergeVectorTools.h @@ -51,7 +51,8 @@ static void mergeSortedVectors(const C* const* vecs, std::size_t size, std::vect /// to allow using a priority_queu, which selects the highest element. /// we here (counterintuitively) define < as > bool operator< (Entry const& rhs) const { return top() > rhs.top(); } - const auto & top() const { return *fwdIt; } + // TODO: revert "typename C::value_type" to "auto": nvc++ and icpc seems to do not deduce automatically the return type + const typename C::value_type & top() const { return *fwdIt; } void next() { ++fwdIt;}; }; From 9462399c4f77495ae35f6d0e1017cc560c5a2fe7 Mon Sep 17 00:00:00 2001 From: Daniele Date: Thu, 10 Oct 2024 16:07:10 +0200 Subject: [PATCH 4/5] Now we have a test for the signedness of the walls (#1130) Co-authored-by: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com> --- regtest/basic/rt-WALLS-sign/COLVAR.reference | 12 ++++++++++++ regtest/basic/rt-WALLS-sign/Makefile | 1 + regtest/basic/rt-WALLS-sign/config | 11 +++++++++++ regtest/basic/rt-WALLS-sign/der.reference | 12 ++++++++++++ regtest/basic/rt-WALLS-sign/plumed.dat | 13 +++++++++++++ 5 files changed, 49 insertions(+) create mode 100644 regtest/basic/rt-WALLS-sign/COLVAR.reference create mode 100644 regtest/basic/rt-WALLS-sign/Makefile create mode 100644 regtest/basic/rt-WALLS-sign/config create mode 100644 regtest/basic/rt-WALLS-sign/der.reference create mode 100644 regtest/basic/rt-WALLS-sign/plumed.dat diff --git a/regtest/basic/rt-WALLS-sign/COLVAR.reference b/regtest/basic/rt-WALLS-sign/COLVAR.reference new file mode 100644 index 0000000000..5d27110130 --- /dev/null +++ b/regtest/basic/rt-WALLS-sign/COLVAR.reference @@ -0,0 +1,12 @@ +#! FIELDS time p.x uw1.bias lw1.bias uw2.bias lw2.bias uw3.bias lw3.bias uw4.bias lw4.bias uw1.force2 lw1.force2 uw2.force2 lw2.force2 uw3.force2 lw3.force2 uw4.force2 lw4.force2 + 0.000000 -5.000000 0.000000 5.000000 0.000000 25.000000 0.000000 125.000000 0.000000 625.000000 0.000000 1.000000 0.000000 100.000000 0.000000 5625.000000 0.000000 250000.000000 + 1.000000 -4.000000 0.000000 4.000000 0.000000 16.000000 0.000000 64.000000 0.000000 256.000000 0.000000 1.000000 0.000000 64.000000 0.000000 2304.000000 0.000000 65536.000000 + 2.000000 -3.000000 0.000000 3.000000 0.000000 9.000000 0.000000 27.000000 0.000000 81.000000 0.000000 1.000000 0.000000 36.000000 0.000000 729.000000 0.000000 11664.000000 + 3.000000 -2.000000 0.000000 2.000000 0.000000 4.000000 0.000000 8.000000 0.000000 16.000000 0.000000 1.000000 0.000000 16.000000 0.000000 144.000000 0.000000 1024.000000 + 4.000000 -1.000000 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 0.000000 4.000000 0.000000 9.000000 0.000000 16.000000 + 5.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 + 6.000000 1.000000 1.000000 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 0.000000 4.000000 0.000000 9.000000 0.000000 16.000000 0.000000 + 7.000000 2.000000 2.000000 0.000000 4.000000 0.000000 8.000000 0.000000 16.000000 0.000000 1.000000 0.000000 16.000000 0.000000 144.000000 0.000000 1024.000000 0.000000 + 8.000000 3.000000 3.000000 0.000000 9.000000 0.000000 27.000000 0.000000 81.000000 0.000000 1.000000 0.000000 36.000000 0.000000 729.000000 0.000000 11664.000000 0.000000 + 9.000000 4.000000 4.000000 0.000000 16.000000 0.000000 64.000000 0.000000 256.000000 0.000000 1.000000 0.000000 64.000000 0.000000 2304.000000 0.000000 65536.000000 0.000000 + 10.000000 5.000000 5.000000 0.000000 25.000000 0.000000 125.000000 0.000000 625.000000 0.000000 1.000000 0.000000 100.000000 0.000000 5625.000000 0.000000 250000.000000 0.000000 diff --git a/regtest/basic/rt-WALLS-sign/Makefile b/regtest/basic/rt-WALLS-sign/Makefile new file mode 100644 index 0000000000..3703b27cea --- /dev/null +++ b/regtest/basic/rt-WALLS-sign/Makefile @@ -0,0 +1 @@ +include ../../scripts/test.make diff --git a/regtest/basic/rt-WALLS-sign/config b/regtest/basic/rt-WALLS-sign/config new file mode 100644 index 0000000000..86940b8c54 --- /dev/null +++ b/regtest/basic/rt-WALLS-sign/config @@ -0,0 +1,11 @@ +type=driver +arg="--plumed plumed.dat --ixyz trajectory.xyz" + + +function plumed_regtest_before() { + for x in {-5..5}; do + echo "1" + echo "100 100 100" + echo "C $x 0 0" + done > trajectory.xyz +} diff --git a/regtest/basic/rt-WALLS-sign/der.reference b/regtest/basic/rt-WALLS-sign/der.reference new file mode 100644 index 0000000000..2718bc03af --- /dev/null +++ b/regtest/basic/rt-WALLS-sign/der.reference @@ -0,0 +1,12 @@ +#! FIELDS time parameter uw1.bias lw1.bias uw2.bias lw2.bias uw3.bias lw3.bias uw4.bias lw4.bias + 0.000000 0 0.000 -1.000 0.000 -10.000 0.000 -75.000 0.000 -500.000 + 1.000000 0 0.000 -1.000 0.000 -8.000 0.000 -48.000 0.000 -256.000 + 2.000000 0 0.000 -1.000 0.000 -6.000 0.000 -27.000 0.000 -108.000 + 3.000000 0 0.000 -1.000 0.000 -4.000 0.000 -12.000 0.000 -32.000 + 4.000000 0 0.000 -1.000 0.000 -2.000 0.000 -3.000 0.000 -4.000 + 5.000000 0 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 6.000000 0 1.000 0.000 2.000 0.000 3.000 0.000 4.000 0.000 + 7.000000 0 1.000 0.000 4.000 0.000 12.000 0.000 32.000 0.000 + 8.000000 0 1.000 0.000 6.000 0.000 27.000 0.000 108.000 0.000 + 9.000000 0 1.000 0.000 8.000 0.000 48.000 0.000 256.000 0.000 + 10.000000 0 1.000 0.000 10.000 0.000 75.000 0.000 500.000 0.000 diff --git a/regtest/basic/rt-WALLS-sign/plumed.dat b/regtest/basic/rt-WALLS-sign/plumed.dat new file mode 100644 index 0000000000..18acefed14 --- /dev/null +++ b/regtest/basic/rt-WALLS-sign/plumed.dat @@ -0,0 +1,13 @@ +p: POSITION ATOM=1 NOPBC + +uw1: UPPER_WALLS ARG=p.x AT=0 KAPPA=1.0 EXP=1 +lw1: LOWER_WALLS ARG=p.x AT=0 KAPPA=1.0 EXP=1 +uw2: UPPER_WALLS ARG=p.x AT=0 KAPPA=1.0 EXP=2 +lw2: LOWER_WALLS ARG=p.x AT=0 KAPPA=1.0 EXP=2 +uw3: UPPER_WALLS ARG=p.x AT=0 KAPPA=1.0 EXP=3 +lw3: LOWER_WALLS ARG=p.x AT=0 KAPPA=1.0 EXP=3 +uw4: UPPER_WALLS ARG=p.x AT=0 KAPPA=1.0 EXP=4 +lw4: LOWER_WALLS ARG=p.x AT=0 KAPPA=1.0 EXP=4 + +PRINT ARG=p.x,*.bias,*.force2 FILE=COLVAR +DUMPDERIVATIVES ARG=*.bias FILE=der FMT=%04.3f \ No newline at end of file From 4df397b3394ad627b739c9d801014b699c34f96f Mon Sep 17 00:00:00 2001 From: Daniele Date: Thu, 10 Oct 2024 16:31:08 +0200 Subject: [PATCH 5/5] this should solve #1091 (#1109) Co-authored-by: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com> --- src/bias/Walls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bias/Walls.cpp b/src/bias/Walls.cpp index 34530e8f1f..f94c708986 100644 --- a/src/bias/Walls.cpp +++ b/src/bias/Walls.cpp @@ -94,7 +94,7 @@ Walls::Walls(const ActionOptions&ao): readInputLine( getShortcutLabel() + "_pow_" + argn + ": CUSTOM PERIODIC=NO FUNC=step(x)*x^" + exp[i] + " ARG=" + getShortcutLabel() + "_scale_" + argn ); } else if( getName()=="LOWER_WALLS" ) { readInputLine( getShortcutLabel() + "_scale_" + argn + ": CUSTOM PERIODIC=NO FUNC=(x-" + offset[i] +")/" + eps[i] + " ARG=" + getShortcutLabel() + "_cv_" + argn ); - readInputLine( getShortcutLabel() + "_pow_" + argn + ": CUSTOM PERIODIC=NO FUNC=step(-x)*x^" + exp[i] + " ARG=" + getShortcutLabel() + "_scale_" + argn ); + readInputLine( getShortcutLabel() + "_pow_" + argn + ": CUSTOM PERIODIC=NO FUNC=step(-x)*(-x)^" + exp[i] + " ARG=" + getShortcutLabel() + "_scale_" + argn ); } readInputLine( getShortcutLabel() + "_v_wall_" + argn + ": CUSTOM PERIODIC=NO FUNC=" + kappa[i] +"*x" + " ARG=" + getShortcutLabel() + "_pow_" + argn ); readInputLine( getShortcutLabel() + "_wall_" + argn + ": SUM ARG=" + getShortcutLabel() + "_v_wall_" + argn + " PERIODIC=NO");