QMCPACK / qmcpack

Main repository for QMCPACK, an open-source production level many-body ab initio Quantum Monte Carlo code for computing the electronic structure of atoms, molecules, and solids with full performance portable GPU support
http://www.qmcpack.org
Other
298 stars 139 forks source link

Incorrect spline evaluation index assert error in diamond 1x1x1 (or related bug) #5174

Open prckent opened 1 month ago

prckent commented 1 month ago

Describe the bug

Amazingly the GCC14-NoMPI-Complex-Mixed-Debug run of short-diamondC_1x1x1_pp-dmc_sdj-1-16 ( https://cdash.qmcpack.org/tests/4312408 ) is giving an assertion failure indicating a bad index, and subsequently aborting. It is the only configuration for this test currently giving an error -- the other real/mixed/complex debug builds do not abort.

qmcpack_complex: /scratch/pk7/QMCPACK_CI_BUILDS/qmcpack/src/einspline/bspline_eval_d_std.cpp:39: void coeff_offset_UBspline_d(const Ugrid, const BCtype_d, double, int&, double&): Assertion `ipart <= grid->num -1' failed.

To Reproduce

Nightly run configuration, develop version, ctest -R short-diamondC_1x1x1_pp-dmc_sdj-1-16

Expected behavior

Test passes

System: nitrogen2, nightly configuration

Additional context

??!!!

prckent commented 1 month ago

@ye-luo Can you please take a look at this? I wonder how this is logically possible. Perhaps we have a <= when we need a < somewhere, or variation in how the pbc is done allowing for numerical error? Happy to instrument this run and do more testing of it.

ye-luo commented 1 month ago

It is a MPC bug like https://github.com/QMCPACK/qmcpack/issues/4725. Clearly there is unsafe code. Let me see if I can find the cause.