Skip to content

Commit f856b84

Browse files
committed
prohibit kahan summation with mixed precision
1 parent 4cc5d36 commit f856b84

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

toolchain/mfc/case_validator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
"check_bubbles_lagrange": {
123123
"title": "Euler-Lagrange Bubble Model",
124124
"category": "Bubble Physics",
125-
"explanation": "2D/3D only. Requires polytropic = F and thermal = 3. Not compatible with model_eqns = 3.",
125+
"explanation": "2D/3D only. Requires polytropic = F and thermal = 3. Not compatible with model_eqns = 3. Kahan summation not compatible with --mixed precision.",
126126
},
127127
# Numerical Schemes
128128
"check_weno": {
@@ -1304,6 +1304,7 @@ def check_bubbles_lagrange(self):
13041304
charNz = self.get("lag_params%charNz", 0)
13051305
charWidth = self.get("lag_params%charwidth", 0)
13061306
fd_order = self.get("fd_order", 0)
1307+
kahan_summation = self.get("lag_params%kahan_summation", "T") == "T"
13071308

13081309
self.prohibit(n is not None and n == 0, "bubbles_lagrange accepts 2D and 3D simulations only")
13091310
self.prohibit(file_per_process, "file_per_process must be false for bubbles_lagrange")
@@ -1316,6 +1317,7 @@ def check_bubbles_lagrange(self):
13161317
self.prohibit(charNz <= 0 and p == 0, "lag_params%charNz must be positive for 2D bubbles_lagrange")
13171318
self.prohibit(charWidth <= 0 and p == 0, "lag_params%charwidth must be positive for 2D bubbles_lagrange")
13181319
self.prohibit(fd_order == 0 and vel_model > 0, "Non-zero lag_params%vel_model requires fd_order to be set")
1320+
self.prohibit(kahan_summation and CFG().mixed, "lag_params%kahan_summation = T is not compatible with --mixed precision")
13191321

13201322
def check_continuum_damage(self):
13211323
"""Checks continuum damage model parameters (simulation)"""

0 commit comments

Comments
 (0)