QMCPACK / QMCPACK/qmcpack

EnergyDensity fails in HEG

Open
#4,628 1 comment 0 reactions 1 assignee Claimed by @jtkrogel View on GitHub
bug
Dominant language
C++
Stars
403
Forks
154
Avg merge
1d 12h
Merged PRs (30d)
82

Description

**Describe the bug**
When `EnergyDensity` estimator is requested, the `heg_14_gamma` example seg. faults.

**To Reproduce**
Steps to reproduce the behavior:
1. add `EnergyDensity` estimator (and `ion0`) to `heg_14_gamma` VMC example.

2. run vmc.xml (serial or parallel)
```


5
p p p
6



-1


-1



0


0




1.082858193 0.6653279375 0.4358910287 0.2243616172 0.1102948764


1.696171854 1.047722154 0.6275148566 0.3175982878 0.1446706214












100
10
100
5.0

```

backtrace shows
```
Thread 1 "qmcpack" received signal SIGSEGV, Segmentation fault.
0x00000000005acf54 in qmcplusplus::CombinedTraceSample::combine (this=0x0) at /rc/Estimators/TraceManager.h:709
709 std::fill(this->sample.begin(), this->sample.end(), T(0));
(gdb) bt
#0 0x00000000005acf54 in qmcplusplus::CombinedTraceSample::combine (this=0x0)
at src/Estimators/TraceManager.h:709
#1 0x00000000006d5ee7 in qmcplusplus::EnergyDensityEstimator::evaluate (this=0x174f5b0, P=...)
at src/QMCHamiltonians/EnergyDensityEstimator.cpp:301
#2 0x0000000000631d49 in qmcplusplus::QMCHamiltonian::auxHevaluate (this=0x1741f90, P=..., ThisWalker=...)
at src/QMCHamiltonians/QMCHamiltonian.cpp:795
#3 0x00000000005ab471 in qmcplusplus::VMCUpdatePbyP::advanceWalker (this=0x1769660, thisWalker=..., recompute=false)
at src/QMCDrivers/VMC/VMCUpdatePbyP.cpp:129
#4 0x00000000005a8407 in qmcplusplus::QMCUpdateBase::advanceWalkers (this=0x1769660, it=..., it_end=..., recompute=false)
at src/QMCDrivers/QMCUpdateBase.cpp:351
#5 0x000000000055635a in _ZN11qmcplusplus3VMC3runEv._omp_fn.0(void) () at src/QMCDrivers/VMC/VMC.cpp:94
#6 0x00007fffef59c812 in GOMP_parallel (fn=0x5560a8 <_ZN11qmcplusplus3VMC3runEv._omp_fn.0(void)>, data=0x7fffffff52f0, num_threads=1, flags=0)
at /dev/shm/nix-build-gcc-10.4.0.drv-0/nixbld1/spack-stage-gcc-10.4.0-ym0r2w4dnzd0fg0pnlipazv3ww9a3j6w/spack-src/libgomp/parallel.c:171
#7 0x00000000005542f9 in qmcplusplus::VMC::run (this=0x174e8b0) at src/QMCDrivers/VMC/VMC.cpp:77
#8 0x0000000000421616 in qmcplusplus::QMCMain::runQMC (this=0x13ed3e0, cur=0x17228b0, reuse=false)
at src/QMCApp/QMCMain.cpp:634
#9 0x0000000000421f7c in qmcplusplus::QMCMain::executeQMCSection (this=0x13ed3e0, cur=0x17228b0, reuse=false)
at src/QMCApp/QMCMain.cpp:699
#10 0x000000000041f74b in qmcplusplus::QMCMain::execute (this=0x13ed3e0) at src/QMCApp/QMCMain.cpp:260
#11 0x00000000004114e4 in main (argc=2, argv=0x7fffffff6278) at src/QMCApp/qmcapp.cpp:215
```

**Expected behavior**
no seg. fault

**System:**
- Intel workstation

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.