Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor CELER_(DISABLE|PARALLEL) environment variables #1010

Open
sethrj opened this issue Nov 9, 2023 · 0 comments
Open

Refactor CELER_(DISABLE|PARALLEL) environment variables #1010

sethrj opened this issue Nov 9, 2023 · 0 comments
Assignees
Labels
core Software engineering infrastructure minor Minor internal changes or fixes (including CI updates)
Milestone

Comments

@sethrj
Copy link
Member

sethrj commented Nov 9, 2023

We have some environment variables that "disable" capabilities automatically on (e.g., MPI or CUDA), others that "enable" capabilities (profiling). The "color" environment variable can be disabled or enabled, with an "automatic" evaluation as a third option.

It would be better to have an API:

template<class T>
T getenv(std::string const& key, T default);

so for example we could set

static bool use_root = getenv("CELER_ROOT", CELERITAS_USE_ROOT);

and the getenv would:

  1. load the environment variable (and register its access for later output)
  2. set the value to the default if blank, or parse the variable otherwise
  3. save the possibly defaulted result into the environment list
@sethrj sethrj added the core Software engineering infrastructure label Nov 9, 2023
@sethrj sethrj self-assigned this Nov 9, 2023
@sethrj sethrj added this to the v1.0.0 milestone Nov 9, 2023
@sethrj sethrj added the minor Minor internal changes or fixes (including CI updates) label Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Software engineering infrastructure minor Minor internal changes or fixes (including CI updates)
Projects
None yet
Development

No branches or pull requests

1 participant