Inconsistent results from qmca when analysing multiple files
- Dominant language
- C++
- Stars
- 403
- Forks
- 154
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 82
Description
**Describe the bug**
While checking #4549 I noticed that at some recent point we have reordered the scalar.dat output. The columns are correctly labeled. Unfortunately, when files of different versions are mixedm qmca doesn't completely handle the situation and gives inconsistent results . They are nearly OK which suggests the correct data is being used for the most part.
**To Reproduce**
Analyze different versions of scalar files simultaneously. In the following notice the debug* results are reported consistently but the orig* ones are not. Quantities other than the energy are suspect, e.g. samples, although I noticed this first by the energy.
Archive of the respective files attached. Used qmca from develop.
```
$ qmca -q e */*/*.scalar.dat
debug/vmc_perf_pbe_u_None_3x3x1_1x1x1_4990_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -197.290314 +/- 0.029507
debug/vmc_perf_pbe_u_None_3x3x1_1x1x1_5000_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -197.336379 +/- 0.093084
debug/vmc_perf_pbe_u_None_3x3x1_1x1x1_5010_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -197.176166 +/- 0.030095
orig/vmc_perf_pbe_u_None_3x3x1_1x1x1_4990_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -198.202521 +/- 0.026945
orig/vmc_perf_pbe_u_None_3x3x1_1x1x1_5000_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -197.273603 +/- 0.026549
orig/vmc_perf_pbe_u_None_3x3x1_1x1x1_5010_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -198.168970 +/- 0.031373
$ qmca -q e d*/*/*.scalar.dat
debug/vmc_perf_pbe_u_None_3x3x1_1x1x1_4990_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -197.290314 +/- 0.029507
debug/vmc_perf_pbe_u_None_3x3x1_1x1x1_5000_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -197.336379 +/- 0.093084
debug/vmc_perf_pbe_u_None_3x3x1_1x1x1_5010_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -197.176166 +/- 0.030095
$ qmca -q e o*/*/*.scalar.dat
orig/vmc_perf_pbe_u_None_3x3x1_1x1x1_4990_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -198.197432 +/- 0.026929
orig/vmc_perf_pbe_u_None_3x3x1_1x1x1_5000_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -197.274287 +/- 0.026617
orig/vmc_perf_pbe_u_None_3x3x1_1x1x1_5010_ccecparep_legacy_500_500_1.5_50_True_hf/vmc series 0 LocalEnergy = -198.168970 +/- 0.031373
$ head -1 */*/*.scalar.dat
==> debug/vmc_perf_pbe_u_None_3x3x1_1x1x1_4990_ccecparep_legacy_500_500_1.5_50_True_hf/vmc.s000.scalar.dat <==
# index LocalEnergy LocalEnergy_sq LocalPotential Kinetic LocalECP NonLocalECP ElecElec IonIon MPC KEcorr BlockWeight BlockCPU AcceptRatio
==> debug/vmc_perf_pbe_u_None_3x3x1_1x1x1_5000_ccecparep_legacy_500_500_1.5_50_True_hf/vmc.s000.scalar.dat <==
# index LocalEnergy LocalEnergy_sq LocalPotential Kinetic LocalECP NonLocalECP ElecElec IonIon MPC KEcorr BlockWeight BlockCPU AcceptRatio
==> debug/vmc_perf_pbe_u_None_3x3x1_1x1x1_5010_ccecparep_legacy_500_500_1.5_50_True_hf/vmc.s000.scalar.dat <==
# index LocalEnergy LocalEnergy_sq LocalPotential Kinetic LocalECP NonLocalECP ElecElec IonIon MPC KEcorr BlockWeight BlockCPU AcceptRatio
==> orig/vmc_perf_pbe_u_None_3x3x1_1x1x1_4990_ccecparep_legacy_500_500_1.5_50_True_hf/vmc.s000.scalar.dat <==
# index LocalEnergy LocalEnergy_sq LocalPotential Kinetic ElecElec IonIon LocalECP NonLocalECP MPC KEcorr BlockWeight BlockCPU AcceptRatio
==> orig/vmc_perf_pbe_u_None_3x3x1_1x1x1_5000_ccecparep_legacy_500_500_1.5_50_True_hf/vmc.s000.scalar.dat <==
# index LocalEnergy LocalEnergy_sq LocalPotential Kinetic ElecElec IonIon LocalECP NonLocalECP MPC KEcorr BlockWeight BlockCPU AcceptRatio
==> orig/vmc_perf_pbe_u_None_3x3x1_1x1x1_5010_ccecparep_legacy_500_500_1.5_50_True_hf/vmc.s000.scalar.dat <==
# index LocalEnergy LocalEnergy_sq LocalPotential Kinetic ElecElec IonIon LocalECP NonLocalECP MPC KEcorr BlockWeight BlockCPU AcceptRatio
```
**Expected behavior**
Either abort in this scenario (easiest) or give consistent results.
**System:**
Develop, runs & analysis on nitrogen2 with amdclang cpu nightly configuration.
**Additional context**
[scalar.tar.zip](https://github.com/QMCPACK/qmcpack/files/11253883/scalar.tar.zip)
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.