Keep EScalar mixed GPU RP opt-in

This commit is contained in:
2026-05-02 18:38:43 +08:00
parent f638cbc4e8
commit 6f28111a43
2 changed files with 2 additions and 2 deletions

View File

@@ -1757,7 +1757,7 @@ void bssnEScalar_class::Step(int lev, int YN)
#if USE_CUDA_BSSN
{
const char *mixed_env = getenv("AMSS_ESCALAR_MIXED_GPU_RP");
const bool mixed_gpu_rp = (!mixed_env || atoi(mixed_env) != 0);
const bool mixed_gpu_rp = (mixed_env && atoi(mixed_env) != 0);
const char *split_env = getenv("AMSS_ESCALAR_SPLIT_RP");
const bool split_rp = (split_env && atoi(split_env) != 0);
if (!mixed_gpu_rp && !split_rp)

View File

@@ -108,7 +108,7 @@ int amss_escalar_mixed_gpu_rp_enabled()
if (enabled < 0)
{
const char *env = getenv("AMSS_ESCALAR_MIXED_GPU_RP");
enabled = (!env || atoi(env) != 0) ? 1 : 0;
enabled = (env && atoi(env) != 0) ? 1 : 0;
}
return enabled;
}