NDSL allows atmospheric scientists to write focus on what matters in model development and hides away the complexities of coding for a super computer.
Python 3.11.x is required for NDSL and all its third party dependencies for installation.
NDSL submodules gt4py and dace to point to vetted versions, use git clone --recurse-submodule to update the git submodules.
NDSL is NOT available on pypi. Installation of the package has to be local, via pip install ./NDSL (-e supported). The packages have a few options:
ndsl[test]: installs the test packages (based onpytest)ndsl[develop]: installs tools for development and tests.
NDSL uses pytest for its unit tests, the tests are available via:
pytest -x test: running CPU serial tests (GPU as well ifcupyis installed)mpirun -np 6 pytest -x test/mpi: running CPU parallel tests (GPU as well ifcupyis installed)
For CPU backends:
- 3.11.x >= Python < 3.12.x
- Compilers:
- GNU 11.2+
For GPU backends (the above plus):
- CUDA 11.2+
- Python package:
cupy(latest with proper driver support see install notes)
- Libraries:
- MPI compiled with cuda support
NDSL is not available at pypi, it uses
pip install NDSLto install NDSL locally.
NDSL has a few options:
ndsl[test]: installs the test packages (based onpytest)ndsl[develop]: installs tools for development and tests.
Tests are available via:
pytest -x test: running CPU serial tests (GPU as well ifcupyis installed)mpirun -np 6 pytest -x test/mpi: running CPU parallel tests (GPU as well ifcupyis installed)
Configurations for Pace to use NDSL with different backend:
-
FV3_DACEMODE=Python[Build|BuildAndRun|Run] controls the full program optimizer behavior
-
Python: default, use stencil only, no full program optimization
-
Build: will build the program then exit. This build no matter what. (backend must be
dace:gpuordace:cpu) -
BuildAndRun: same as above but after build the program will keep executing (backend must be
dace:gpuordace:cpu) -
Run: load pre-compiled program and execute, fail if the .so is not present (no hash check!) (backend must be
dace:gpuordace:cpu)
-
-
PACE_FLOAT_PRECISION=64 control the floating point precision throughout the program.
Install Pace with different NDSL backend:
- Shell scripts to install Pace using NDSL backend on specific machines such as Gaea can be found in
examples/build_scripts/. - When cloning Pace you will need to update the repository's submodules as well:
git clone --recursive https://github.com/ai2cm/pace.gitor if you have already cloned the repository:
git submodule update --init --recursive- Pace requires GCC > 9.2, MPI, and Python 3.8 on your system, and CUDA is required to run with a GPU backend.
- We recommend creating a python
venvor conda environment specifically for Pace.
python3 -m venv venv_name
source venv_name/bin/activate- Inside of your pace
venvor conda environment pip install the Python requirements, GT4Py, and Pace:
pip3 install -r requirements_dev.txt -c constraints.txt- There are also separate requirements files which can be installed for linting (
requirements_lint.txt) and building documentation (requirements_docs.txt).