Skip to content

Commit 5bc6277

Browse files
committed
Intel MPI: Support for Windows
1 parent 54af02f commit 5bc6277

File tree

3 files changed

+51
-14
lines changed

3 files changed

+51
-14
lines changed

.github/workflows/ci.yml

+14-12
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,10 @@ jobs:
4545
mpi: mpich
4646
- os: windows-2022
4747
mpi: openmpi
48-
- os: windows-2022
49-
mpi: intelmpi
5048
- os: windows-2019
5149
mpi: mpich
5250
- os: windows-2019
5351
mpi: openmpi
54-
- os: windows-2019
55-
mpi: intelmpi
5652

5753
steps:
5854

@@ -88,33 +84,39 @@ jobs:
8884
Write-Host MSMPI_LIB64=$Env:MSMPI_LIB64
8985
if: ${{ matrix.mpi == 'msmpi' }}
9086

91-
- name: Show MPI C compiler wrapper
87+
- name: Show MPI compiler wrappers
9288
run: |
9389
command -v mpicc
9490
mpicc -show
95-
if: ${{ runner.os != 'Windows' }}
9691
97-
- name: Show MPI C++ compiler wrapper
98-
run: |
9992
command -v mpicxx
10093
mpicxx -show
101-
if: ${{ runner.os != 'Windows' }}
10294
103-
- name: Show MPI Fortran compiler wrapper
104-
run: |
10595
mpifort=$(command -v mpifort || command -v mpifc)
10696
command -v $mpifort
10797
$mpifort -show
10898
if: ${{ runner.os != 'Windows' }}
10999

100+
- name: Show MPI compiler wrappers
101+
run: |
102+
mpicc -show
103+
mpicxx -show
104+
mpifc -show
105+
if: ${{ runner.os == 'Windows' && matrix.mpi == 'intelmpi' }}
106+
110107
- name: Help MPI executor
111108
run: |
112109
command -v mpiexec
113110
mpiexec --help
114111
if: ${{ runner.os != 'Windows' }}
115112

113+
- name: Help MPI executor
114+
run: |
115+
mpiexec -help
116+
if: ${{ runner.os == 'Windows' && matrix.mpi == 'intelmpi' }}
117+
116118
- name: Help MPI executor
117119
run: |
118120
mpiexec /help2
119121
mpiexec /help3
120-
if: ${{ runner.os == 'Windows' }}
122+
if: ${{ runner.os == 'Windows' && matrix.mpi == 'msmpi' }}

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ jobs:
4949
[Open MPI](https://www.open-mpi.org/) (`brew` install).
5050

5151
* Windows:
52-
[Microsoft MPI](https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi).
52+
[Microsoft MPI](https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi) and
53+
[Intel MPI](https://software.intel.com/intel-mpi-library).

setup-mpi.sh

+35-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,35 @@ setup-env-intel-oneapi () {
2828
echo "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}" >> $GITHUB_ENV
2929
}
3030

31+
setup-win-intel-oneapi-mpi () {
32+
baseurl=https://registrationcenter-download.intel.com
33+
subpath=akdlm/irc_nas/18932
34+
version=2021.7.0 build=9549
35+
package=w_mpi_oneapi_p_${version}.${build}_offline.exe
36+
set -x
37+
curl -sO $baseurl/$subpath/$package
38+
./$package -s -a --silent --eula accept
39+
set +x
40+
}
41+
42+
setup-win-intel-oneapi-mpi-env () {
43+
ONEAPI_ROOT="C:\Program Files (x86)\Intel\oneAPI"
44+
I_MPI_ROOT="${ONEAPI_ROOT}\mpi\latest"
45+
echo "ONEAPI_ROOT=${ONEAPI_ROOT}" >> $GITHUB_ENV
46+
echo "I_MPI_ROOT=${I_MPI_ROOT}" >> $GITHUB_ENV
47+
echo "${I_MPI_ROOT}\bin" >> $GITHUB_PATH
48+
echo "${I_MPI_ROOT}\bin\release" >> $GITHUB_PATH
49+
echo "${I_MPI_ROOT}\libfabric\bin" >> $GITHUB_PATH
50+
echo "${I_MPI_ROOT}\libfabric\bin\utils" >> $GITHUB_PATH
51+
52+
ONEAPI_ROOT="/c/Program Files (x86)/Intel/oneAPI"
53+
I_MPI_ROOT="${ONEAPI_ROOT}/mpi/latest"
54+
export PATH="${I_MPI_ROOT}/bin:$PATH"
55+
export PATH="${I_MPI_ROOT}/bin/release:$PATH"
56+
export PATH="${I_MPI_ROOT}/bin/libfabric/bin:$PATH"
57+
impi_info=impi_info.exe
58+
}
59+
3160
case $(uname) in
3261

3362
Linux)
@@ -80,6 +109,11 @@ case $(uname) in
80109
sdir=$(dirname "${BASH_SOURCE[0]}")
81110
pwsh "${sdir}\\setup-${MPI}.ps1"
82111
;;
112+
intelmpi)
113+
setup-win-intel-oneapi-mpi
114+
setup-win-intel-oneapi-mpi-env
115+
hydra_service.exe -install
116+
;;
83117
*)
84118
echo "Unknown MPI implementation:" $MPI
85119
exit 1
@@ -109,7 +143,7 @@ case $MPI in
109143
;;
110144
intelmpi)
111145
echo "::group::Run impi_info -all"
112-
impi_info -all
146+
${impi_info:-impi_info} -all
113147
echo "::endgroup::"
114148
;;
115149
esac

0 commit comments

Comments
 (0)