Add CALORINE_GPUMD_COMMAND environment variable for GPUNEP

Adds support for a CALORINE_GPUMD_COMMAND environment variable that sets the default command GPUNEP uses to invoke gpumd. This makes it easy to point GPUNEP at a gpumd binary that isn't on PATH without passing command=... at every call site, and in particular makes it simple to run the test suite against a local build.

An explicit command= argument to GPUNEP still takes priority over the environment variable.

Introduces calorine/env.py as a shared home for CALORINE_* environment variables, mirroring the existing pattern in the strongcoca package. This makes it straightforward to register future variables in the same place, e.g. a planned CALORINE_NEP_COMMAND for the nep binary.

Details

  • New calorine.env.calorine_getenv() helper, with a defaults dict registering known variables and raising a clear error for unknown ones.
  • GPUNEP.__init__ resolves command from the environment when not passed explicitly.
  • New doc/reference/configuration.rst page documenting the environment variable.
  • Tests added in tests/test_env.py and tests/test_gpunep.py; verified end-to-end against a real gpumd binary.

Merge request reports

Loading