Skip to content

Bugfix in cloverdet_monomial#667

Merged
kostrzewa merged 1 commit intomasterfrom
konstantin_devel
Mar 5, 2026
Merged

Bugfix in cloverdet_monomial#667
kostrzewa merged 1 commit intomasterfrom
konstantin_devel

Conversation

@kottnad
Copy link
Contributor

@kottnad kottnad commented Mar 3, 2026

Fixes a bug in cloverdet monomial that is triggered if both of the following conditions are true
1.) external_library == QUDA_LIB && external_inverter == QUDA_INVERTER && no strict residual check is required
2.) one or more cloverrat monomials are present

@kostrzewa
Copy link
Member

@kottnad thanks!

Wasn't the problem already triggered with just the CLOVERDET present when g_strict_residual_check=0 and (external_library == QUDA_LIB && external_inverter == QUDA_INVERTER) == true ?

For completeness: it is caused in the acceptance step by the call to Qm which requires sw_invert to have been called.

@kottnad
Copy link
Contributor Author

kottnad commented Mar 3, 2026

Indeed, it is also enough to just have a single CLOVERDET to trigger it. However, running a two-flavor simulation including one or more CLOVERDETRATIOs is fine. Going to 2+1 with a CLOVERRAT is how it showed up originally.

@kostrzewa
Copy link
Member

Indeed. I think we actually need to perform a high statistics run to evaluate the effect this had on production simulations.

The way I understand it, sw_inv as used by Qm in the acceptance step for the CLOVERDET would have been slightly wrong (supplied by whichever CLOVERDETRATIO acceptance step ran right before the CLOVERDET acceptance step), resulting in an unquantified effect on dH and thus the sampled probability distribution. The effect must have been (very) small, otherwise we would have lost acceptance.

@kostrzewa
Copy link
Member

I would suggest an nf=2 twisted clover simulation on a 24c48 volume based on one of the old nf=2 ensembles at beta=2.1

Best would probably be cA2.60.24

@kostrzewa
Copy link
Member

Actually, now that we discussed, given that sw_inv under the problematic condition will come from the CLOVERDETRATIO and this, usually, will have set the same g_mu, the resulting sw_inv will also be correct for the CLOVERDET acceptance step.

However, when the last function that filled sw_inv happens to be from an NDCLOVERRAT, then I don't have a feeling for how badly the resulting sw_inv would affect the acceptance step of CLOVERDET...

@kostrzewa
Copy link
Member

cscs-ci run default

@kostrzewa
Copy link
Member

system-wide CSCS maintenance...

@kostrzewa kostrzewa self-requested a review March 5, 2026 12:41
@kostrzewa kostrzewa merged commit 6adec20 into master Mar 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants