Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PIP := $(shell command -v pip3 2> /dev/null || command which pip 2> /dev/null)
PYTHON := $(shell command -v python3 2> /dev/null || command which python 2> /dev/null)
NUM_PROCESSES = 3

.PHONY: install dev-install install_conda dev-install_conda tests doc docupdate run_examples run_tutorials
.PHONY: install dev-install install_conda dev-install_conda tests tests_nccl doc docupdate run_examples run_tutorials

pipcheck:
ifndef PIP
Expand Down Expand Up @@ -30,12 +30,19 @@ install_conda:
dev-install_conda:
conda env create -f environment-dev.yml && conda activate pylops_mpi && pip install -e .

dev-install_conda_nccl:
conda env create -f environment-dev.yml && conda activate pylops_mpi && conda install -c conda-forge cupy cudnn cutensor nccl && pip install -e .

lint:
flake8 pylops_mpi/ tests/ examples/ tutorials/

tests:
mpiexec -n $(NUM_PROCESSES) pytest tests/ --with-mpi

# assuming NUM_PROCESSES <= number of gpus available
tests_nccl:
mpiexec -n $(NUM_PROCESSES) pytest tests_nccl/ --with-mpi

doc:
cd docs && rm -rf source/api/generated && rm -rf source/gallery &&\
rm -rf source/tutorials && rm -rf build &&\
Expand Down
16 changes: 16 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ If you prefer a ``pip`` installation, we provide the following command
Note that, differently from the ``conda`` command, the above **will not** create a virtual environment.
Make sure you create and activate your environment previously.

Enable Nvidia Collective Communication Library (NCCL)
=======================================================
To obtain highly-optimized performance on GPU clusters, PyLops-MPI also supports the Nvidia's collective communication calls (NCCL).
`NCCL <https://developer.nvidia.com/nccl>

.. code-block:: bash

>> make dev-install_conda_nc


Run tests
=========
To ensure that everything has been setup correctly, run tests:
Expand All @@ -110,6 +120,12 @@ To ensure that everything has been setup correctly, run tests:

Make sure no tests fail, this guarantees that the installation has been successful.

If PyLops-MPI is installed with NCCL, also run tests:

.. code-block:: bash

>> make tests_nccl

Run examples and tutorials
==========================
Since the sphinx-gallery creates examples/tutorials using only a single process, it is highly recommended to test the
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tool:pytest]
addopts = --verbose
python_files = tests/*.py
python_files = tests/*.py tests_nccl/*.py

[flake8]
ignore = E203, E501, W503, E402
per-file-ignores =
__init__.py: F401, F403, F405
max-line-length = 88
__init__.py: F401, F403, F405
max-line-length = 88