Skip to content

Commit 96692d1

Browse files
accept I_MPI_ROOT in place of MPIROOT (#2295)
1 parent 8fea545 commit 96692d1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ The build-process (using setup.py) happens in 4 stages:
162162
### Configure the Build with Environment Variables
163163
* ``SKLEARNEX_VERSION``: sets the package version
164164
* ``DALROOT``: sets the oneAPI Data Analytics Library path
165-
* ``MPIROOT``: sets the path to the MPI library that will be used for distributed mode support. Not used when using `NO_DIST=1`
165+
* ``MPIROOT``: sets the path to the MPI library that will be used for distributed mode support. If this variable is not set but `I_MPI_ROOT` is found, will use `I_MPI_ROOT` instead. Not used when using `NO_DIST=1`
166166
* ``NO_DIST``: set to '1', 'yes' or alike to build without support for distributed mode
167167
* ``NO_STREAM``: set to '1', 'yes' or alike to build without support for streaming mode
168168
* ``NO_DPC``: set to '1', 'yes' or alike to build without support of oneDAL DPC++ interfaces

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@
9292
no_stream = "NO_STREAM" in os.environ and os.environ["NO_STREAM"] in trues
9393
use_gcov = "SKLEARNEX_GCOV" in os.environ and os.environ["SKLEARNEX_GCOV"] in trues
9494
debug_build = os.getenv("DEBUG_BUILD") == "1"
95-
mpi_root = None if no_dist else os.environ["MPIROOT"]
95+
mpi_root = None if no_dist else os.environ.get("MPIROOT", os.environ.get("I_MPI_ROOT"))
96+
if (not no_dist) and (mpi_root is None):
97+
raise ValueError(
98+
"'MPIROOT' is not set, cannot build with distributed mode."
99+
" Use 'NO_DIST=1' to build without distributed mode."
100+
)
96101
dpcpp = (
97102
shutil.which("icpx") is not None
98103
and "onedal_dpc" in get_onedal_shared_libs(dal_root)

0 commit comments

Comments
 (0)