Skip to content

Commit

Permalink
MPI headers need some tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Jan 13, 2025
1 parent de3fcc8 commit 44ef470
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions packaging/python/build_wheels.bash
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,15 @@ coreneuron=$3
case "$1" in

linux)
MPI_INCLUDE_HEADERS="/usr/include/openmpi-$(uname -m);/usr/include/mpich-$(uname -m)"
MPI_POSSIBLE_INCLUDE_HEADERS="/usr/include/openmpi-$(uname -m) /usr/include/mpich-$(uname -m) /usr/lib/$(uname -m)-linux-gnu/openmpi/include /usr/include/$(uname -m)-linux-gnu/mpich"
MPI_INCLUDE_HEADERS=""
for dir in $MPI_POSSIBLE_INCLUDE_HEADERS
do
if [ -d "${dir}" ]; then
MPI_INCLUDE_HEADERS="${MPI_INCLUDE_HEADERS};${dir}"
fi
done

# Check for MPT headers. On Azure, we extract them from a secure file and mount them in the docker image in:
MPT_INCLUDE_PATH="/nrnwheel/mpt/include"
if [ -d "$MPT_INCLUDE_PATH" ]; then
Expand Down Expand Up @@ -223,7 +231,14 @@ case "$1" in
else
# first two are for AlmaLinux 8 (default for manylinux_2_28);
# second two are for Debian/Ubuntu derivatives
MPI_INCLUDE_HEADERS="/usr/include/openmpi-$(uname -m);/usr/include/mpich-$(uname -m);/usr/lib/$(uname -m)-linux-gnu/openmpi/include;/usr/include/$(uname -m)-linux-gnu/mpich"
MPI_POSSIBLE_INCLUDE_HEADERS="/usr/include/openmpi-$(uname -m) /usr/include/mpich-$(uname -m) /usr/lib/$(uname -m)-linux-gnu/openmpi/include /usr/include/$(uname -m)-linux-gnu/mpich"
MPI_INCLUDE_HEADERS=""
for dir in $MPI_POSSIBLE_INCLUDE_HEADERS
do
if [ -d "${dir}" ]; then
MPI_INCLUDE_HEADERS="${MPI_INCLUDE_HEADERS};${dir}"
fi
done
build_wheel_linux $(which python3) "$coreneuron" "$MPI_INCLUDE_HEADERS"
fi
ls wheelhouse/
Expand Down

0 comments on commit 44ef470

Please sign in to comment.