-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
411 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
packages=( | ||
python3.11-venv | ||
pypy3 | ||
libmpich12 | ||
libopenmpi3 | ||
) | ||
sudo=$(command -v sudo || true) | ||
$sudo apt update -y | ||
$sudo apt install -y ${packages[@]} | ||
$sudo ln -sr /usr/lib/$(arch)-linux-gnu/libmpi{ch,}.so.12 | ||
|
||
sdir=$(cd "$(dirname -- "$0")" && pwd -P) | ||
$sdir/test-wheel.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
packages=( | ||
python3.6 | ||
python3.7 | ||
python3.8 | ||
python3.9 | ||
python3.10 | ||
python3.11 | ||
python3.12 | ||
pypy3.9 | ||
pypy3.10 | ||
mpich | ||
openmpi | ||
) | ||
sudo=$(command -v sudo || true) | ||
opts=--setopt=install_weak_deps=False | ||
$sudo dnf install -y $opts ${packages[@]} | ||
set +u | ||
source /etc/profile.d/modules.sh | ||
set -u | ||
|
||
sdir=$(cd "$(dirname -- "$0")" && pwd -P) | ||
$sdir/test-wheel.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
packages=( | ||
python3.10-venv | ||
python3.11-venv | ||
pypy3 | ||
libmpich12 | ||
libopenmpi3 | ||
) | ||
sudo=$(command -v sudo || true) | ||
$sudo apt update -y | ||
$sudo apt install -y ${packages[@]} | ||
$sudo ln -sr /usr/lib/$(arch)-linux-gnu/libmpi{ch,}.so.12 | ||
|
||
sdir=$(cd "$(dirname -- "$0")" && pwd -P) | ||
$sdir/test-wheel.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
packages_py=( | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
pypy3.9 | ||
pypy3.10 | ||
) | ||
packages_mpi=( | ||
mpich | ||
openmpi | ||
) | ||
brew install ${packages_py[@]} | ||
for mpi in ${packages_mpi[@]}; do | ||
brew install $mpi | ||
brew unlink $mpi | ||
done | ||
|
||
sdir=$(cd "$(dirname -- "$0")" && pwd -P) | ||
$sdir/test-wheel.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
PYTHON=( | ||
python3.6 | ||
python3.7 | ||
python3.8 | ||
python3.9 | ||
python3.10 | ||
python3.11 | ||
python3.12 | ||
pypy3.7 | ||
pypy3.8 | ||
pypy3.9 | ||
) | ||
|
||
wheelhouse=${1:-dist} | ||
venvroot=$(mktemp -d) | ||
trap "rm -rf $venvroot" EXIT | ||
export PIP_QUIET=1 | ||
|
||
if [[ $(uname) =~ NT ]]; then | ||
MPI=(impi msmpi) | ||
OSTYPE=nt | ||
else | ||
MPI=(mpich openmpi) | ||
OSTYPE=posix | ||
fi | ||
|
||
function setup-python { | ||
local python=$1 | ||
venvdir=$venvroot/$python | ||
$python -m venv $venvdir | ||
if [[ $OSTYPE == posix ]]; then | ||
source $venvdir/bin/activate | ||
else | ||
export PATH="$venvdir\\Scripts;$PATH" | ||
hash -r 2> /dev/null | ||
fi | ||
command -v python | ||
python -m pip install pip --upgrade | ||
} | ||
|
||
function setup-mpi4py { | ||
local dist=$1 | ||
python -m pip install mpi4py --no-index --find-links=$dist | ||
} | ||
|
||
function setup-mpi { | ||
local mpi=$1 | ||
if command -v brew > /dev/null; then | ||
brew unlink mpich openmpi > /dev/null | ||
brew link $mpi > /dev/null | ||
elif command -v module > /dev/null; then | ||
module unload mpi | ||
module load mpi/$mpi-$(arch) | ||
else | ||
export MPI4PY_MPIABI=$mpi | ||
fi | ||
} | ||
|
||
function mpi4py-test-basic { | ||
python --version | ||
python -m mpi4py --version | ||
python -m mpi4py --mpi-std-version | ||
python -m mpi4py --mpi-lib-version | head -n 1 | ||
printf "\n" | ||
} | ||
|
||
for python in ${PYTHON[@]}; do | ||
test -z "$(command -v $python)" && continue | ||
setup-python $python | ||
setup-mpi4py $wheelhouse | ||
for mpi in ${MPI[@]}; do | ||
setup-mpi $mpi | ||
mpi4py-test-basic | ||
export MPI4PY_MPIABI=$mpi | ||
mpi4py-test-basic | ||
if [ $mpi == mpich -o $mpi == openmpi ]; then | ||
export MPI4PY_MPIABI=mpi31-$mpi | ||
mpi4py-test-basic | ||
fi | ||
unset MPI4PY_MPIABI | ||
done | ||
done |
Oops, something went wrong.