Disable unsafe Z4C AMR device path by default

This commit is contained in:
2026-05-02 01:36:41 +08:00
parent 383e936e88
commit a5c8188305
2 changed files with 2 additions and 2 deletions

View File

@@ -335,7 +335,7 @@ bool cuda_can_direct_pack(const Parallel::gridseg *src, const Parallel::gridseg
if (z4c_amr_device < 0)
{
const char *env = getenv("AMSS_CUDA_Z4C_AMR_DEVICE");
z4c_amr_device = (!env || atoi(env) != 0) ? 1 : 0;
z4c_amr_device = (env && atoi(env) != 0) ? 1 : 0;
}
if (!z4c_amr_device)
return false;