This page collects problems that were found while revising the code for PLUMED 2.11, and the checks that found them. Read it before changing an action or a tool that other actions use.
git stash push src/module/File.cpp), rebuilding and running the test, then restoring the fix.plumed_regtest_after of the config file: each bad input is written to a file, run with the driver, and the exit code and the first ERROR in input line are appended to a file errors, which is compared with errors.reference (see e.g. regtest/multicolvar/rt-multicolvar-errors or regtest/basic/rt-molinfo-errors). Check the text of the message, not whether it comes from error() or from an assertion. Set export PLUMED_STACK_TRACE=no in such a config: the CI runs with the stack trace on, and for an error raised outside an action the stack dump is printed where the test expects the message.FMT=%8.4f or similar): the last digits change with the compiler, the optimization flags and the number of threads. Results that depend on std::shuffle, on the distributions of <random> or on cancellations that change with fused multiply-add are not portable either.driver --debug-forces, and on inputs that are not trivial: sparse matrices, matrices that are not square, rows with no elements, two OpenMP threads, AVOID_THREAD_GATHER. For models computed in single precision (e.g. pytorch), compare with an equivalent input in double precision instead.COLLECT, COLLECT_FRAMES, ACCUMULATE and the actions built on them) must also be run on a real trajectory through to the end (the jobs at the end of the calculation run there) and with an output at step 0.make valgrind inside a regtest directory runs that test under valgrind (the summary is in tmp/err). Tests with mpiprocs>1 are skipped without an MPI build.type=make, e.g. regtest/basic/rt65-rmsd2 and regtest/tools/rt-make-grid) use functions of the tools that no action calls. Run them when changing the interface of a tool.plumed driver --noatoms without a trajectory runs forever: give a small trajectory with --ixyz. Inside a regtest use --noatoms only with an input that reads its data with READ.--trajectory-stride larger than the number of frames is an error.error(), naming the action and the keyword, and never at a plumed_assert or with an exception from the standard library (e.g. map::at): the user cannot tell what to change.Keywords::addDeprecatedKeyword. When a keyword is removed, keep it as a hidden keyword that stops with a message giving the replacement (see CUTOFF in RDF).plumed manual --action NAME.Action::keywords refers to the keywords of the options the action was created with: use it only in the constructor (e.g. not in checkRead() or later), where those options may not exist any more. The same holds for the functions that use it, e.g. getkBT(), which stops with an assertion when it is called after the constructor: store its result..ci/audit-keywords.py adds each registered keyword to an example of the manual that uses the action, and reports the keywords that are refused as not understood, and the crashes; --static-only lists the keywords read with parse that no action of the file registers. .ci/audit-inputs.py changes the values of the keywords of the examples.src/tools and src/core. When a function is removed or changed, add a line to the list of changes on the manual page of LOAD.tools/Random.h) has a period of about 2^31: the noise of simplemd or pesmd repeats after about 5.6e5 steps with 1000 atoms.
Hosted by GitHub
|
1.13.2
|