diff --git a/docs/user/index.md b/docs/user/index.md index 46ddc3eb..106ec159 100644 --- a/docs/user/index.md +++ b/docs/user/index.md @@ -12,13 +12,13 @@ NDSL tries to have sensible defaults. In cases you want tweak something, here ar ### Literal precision (float/int) -Unspecified integer and floating point literals (e.g. `42` and `3.1415`) default to 64-bit precision. This can be changed with the environment variable `PACE_FLOAT_PRECISION`. +Unspecified integer and floating point literals (e.g. `42` and `3.1415`) default to 64-bit precision. This can be changed with the environment variable `NDSL_LITERAL_PRECISION`. For mixed precision code, you can specify the "hard coded" precision with type hints and casts, e.g. ```python with computation(PARALLEL), interval(...): - # Either 32-bit or 64-bit depending on `PACE_FLOAT_PRECISION` + # Either 32-bit or 64-bit depending on `NDSL_LITERAL_PRECISION` my_int = 42 my_float = 3.1415 diff --git a/ndsl/constants.py b/ndsl/constants.py index 82d16d30..a02f70f6 100644 --- a/ndsl/constants.py +++ b/ndsl/constants.py @@ -20,14 +20,7 @@ class ConstantVersions(Enum): def _get_constant_version( default: Literal["GFDL", "UFS", "GEOS"] = "UFS", ) -> Literal["GFDL", "UFS", "GEOS"]: - if os.getenv("PACE_CONSTANTS", ""): - ndsl_log.warning("PACE_CONSTANTS is deprecated. Use NDSL_CONSTANTS instead.") - if os.getenv("NDSL_CONSTANTS", ""): - ndsl_log.warning( - "PACE_CONSTANTS and NDSL_CONSTANTS were both specified. NDSL_CONSTANTS will take precedence." - ) - - constants_as_str = os.getenv("NDSL_CONSTANTS", os.getenv("PACE_CONSTANTS", default)) + constants_as_str = os.getenv("NDSL_CONSTANTS", default) expected: list[Literal["GFDL", "UFS", "GEOS"]] = ["GFDL", "UFS", "GEOS"] if constants_as_str not in expected: diff --git a/ndsl/dsl/__init__.py b/ndsl/dsl/__init__.py index 5fa508d2..f931129b 100644 --- a/ndsl/dsl/__init__.py +++ b/ndsl/dsl/__init__.py @@ -17,18 +17,7 @@ def _get_literal_precision(default: Literal["32", "64"] = "64") -> Literal["32", "64"]: - if os.getenv("PACE_FLOAT_PRECISION", ""): - ndsl_log.warning( - "PACE_FLOAT_PRECISION is deprecated. Use NDSL_LITERAL_PRECISION instead." - ) - if os.getenv("NDSL_LITERAL_PRECISION", ""): - ndsl_log.warning( - "PACE_FLOAT_PRECISION and NDSL_LOGLEVEL were both specified. NDSL_LITERAL_PRECISION will take precedence." - ) - - precision = os.getenv( - "NDSL_LITERAL_PRECISION", os.getenv("PACE_FLOAT_PRECISION", default) - ) + precision = os.getenv("NDSL_LITERAL_PRECISION", default) expected: list[Literal["32", "64"]] = ["32", "64"] if precision in expected: diff --git a/ndsl/dsl/dace/dace_config.py b/ndsl/dsl/dace/dace_config.py index d76e10da..66d43f17 100644 --- a/ndsl/dsl/dace/dace_config.py +++ b/ndsl/dsl/dace/dace_config.py @@ -15,7 +15,6 @@ from ndsl.dsl.caches.codepath import FV3CodePath from ndsl.dsl.gt4py_utils import is_gpu_backend from ndsl.dsl.typing import get_precision -from ndsl.logging import ndsl_log from ndsl.optional_imports import cupy as cp from ndsl.performance.collector import NullPerformanceCollector, PerformanceCollector @@ -31,14 +30,7 @@ def _debug_dace_orchestration() -> bool: Debugging Dace orchestration deeper can be done by turning on `syncdebug`. We control this Dace configuration below with our own override. """ - if os.getenv("PACE_DACE_DEBUG", ""): - ndsl_log.warning("PACE_DACE_DEBUG is deprecated. Use NDSL_DACE_DEBUG instead.") - if os.getenv("NDSL_DACE_DEBUG", ""): - ndsl_log.warning( - "PACE_DACE_DEBUG and NDSL_DACE_DEBUG were both specified. NDSL_DACE_DEBUG will take precedence." - ) - - return os.getenv("NDSL_DACE_DEBUG", os.getenv("PACE_DACE_DEBUG", "False")) == "True" + return os.getenv("NDSL_DACE_DEBUG", "False") == "True" def _is_corner(rank: int, partitioner: Partitioner) -> bool: diff --git a/ndsl/logging.py b/ndsl/logging.py index 183054b6..7892a647 100644 --- a/ndsl/logging.py +++ b/ndsl/logging.py @@ -20,14 +20,7 @@ def _get_log_level(default: str = "info") -> str: - if os.getenv("PACE_LOGLEVEL", ""): - logging.warning("PACE_LOGLEVEL is deprecated. Use NDSL_LOGLEVEL instead.") - if os.getenv("NDSL_LOGLEVEL", ""): - logging.warning( - "PACE_LOGLEVEL and NDSL_LOGLEVEL were both specified. NDSL_LOGLEVEL will take precedence." - ) - - loglevel = os.getenv("NDSL_LOGLEVEL", os.getenv("PACE_LOGLEVEL", default)).lower() + loglevel = os.getenv("NDSL_LOGLEVEL", default).lower() if loglevel in AVAILABLE_LOG_LEVELS.keys(): return loglevel