Skip to content

Make USE_ACC configurable via environment variable#84

Merged
joshkamm merged 1 commit intomainfrom
use-acc-env-var
Apr 21, 2026
Merged

Make USE_ACC configurable via environment variable#84
joshkamm merged 1 commit intomainfrom
use-acc-env-var

Conversation

@joshkamm
Copy link
Copy Markdown
Member

Summary

  • Replace hardcoded set(USE_ACC True) with env-var override: defaults ON, respects USE_ACC=OFF from shell
  • Backward-compatible — default behavior unchanged
  • Enables CPU-only builds of both SlaterGPU and downstream ZEST (see ZimmermanGroup/ZEST#78)

Changes

  • CMakeLists.txt: set(USE_ACC True)set(USE_ACC ON) with $ENV{USE_ACC} override + status message

Test plan

  • ZEST CI passes for both GPU and CPU builds on the issue-78-cpu-builds branch (which points at this SlaterGPU branch): check ZimmermanGroup/ZEST CI runs
  • Verified USE_ACC=OFF pixi install builds SlaterGPU without GPU flags (tested via ZEST locally)
  • Verified default pixi install (no env var) still builds with GPU as before
  • ZEST H2_Slater regression tests pass at 1e-6 tolerance for both CPU and GPU builds locally

🤖 Generated with Claude Code

Default behavior is unchanged (GPU enabled). Setting USE_ACC=OFF
in the environment before cmake configure disables OpenACC/GPU
compilation, using the existing CPU fallback paths in subdirectory
CMakeLists files.

Also switch from True/False to ON/OFF convention for consistency
with ZEST and standard CMake idioms.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@joshkamm joshkamm merged commit 11706af into main Apr 21, 2026
1 check 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.

1 participant