Skip to content

Commit e21d1a1

Browse files
authored
Merge pull request #1996 from mccode-dev/CI-enable-openmpi-v5-macOS
Possible workaround for openmpi v5 crashes on macOS
2 parents 0e290c2 + 22bb777 commit e21d1a1

4 files changed

Lines changed: 23 additions & 6 deletions

File tree

.github/workflows/mcstas-basictest.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
- { os: macos-13, CC: clang, CXX: clang++, python: "3.11", mpi: 'mpich' }
2626
- { os: macos-14, CC: clang, CXX: clang++, python: "3.12", mpi: 'mpich' }
2727
- { os: macos-15, CC: clang, CXX: clang++, python: "3.13", mpi: 'mpich' }
28-
#- { os: macos-13, CC: clang, CXX: clang++, python: "3.11", mpi: 'openmpi' }
28+
- { os: macos-13, CC: clang, CXX: clang++, python: "3.11", mpi: 'openmpi' }
2929
#- { os: macos-14, CC: clang, CXX: clang++, python: "3.12", mpi: 'openmpi' }
30-
#- { os: macos-15, CC: clang, CXX: clang++, python: "3.13", mpi: 'openmpi' }
30+
- { os: macos-15, CC: clang, CXX: clang++, python: "3.13", mpi: 'openmpi' }
3131
#- { os: windows-latest, CC: gcc, CXX: g++, python: "3.12", mpi: 'msmpi' }
3232

3333
name: ${{ matrix.os }}.${{ matrix.CC }}.${{ matrix.mpi }}.python-${{ matrix.python }}
@@ -81,6 +81,7 @@ jobs:
8181
- name: Configure build and install mcstas
8282
id: mcstas-install
8383
run: |
84+
if [ "$RUNNER_OS" == "macOS" ]; then mkdir ${HOME}/tmp; fi
8485
if [ "$RUNNER_OS" == "macOS" ]; then export SDKROOT=$(xcrun --sdk macosx --show-sdk-path); fi
8586
set -e
8687
set -u
@@ -219,6 +220,7 @@ jobs:
219220
export MCSTAS_EXECUTABLE="mcstas"
220221
export MCSTAS_PYGEN_EXECUTABLE="mcstas-pygen"
221222
export MCRUN_EXECUTABLE="mcrun"
223+
if [ "$RUNNER_OS" == "macOS" ]; then export TMPDIR=${HOME}/tmp; fi
222224
if [ "$RUNNER_OS" == "Windows" ];
223225
then
224226
export MCSTAS_EXECUTABLE="mcstas.exe"
@@ -259,6 +261,7 @@ jobs:
259261
set -x
260262
export MCSTAS_EXECUTABLE="mcstas"
261263
export MCRUN_EXECUTABLE="mcrun"
264+
if [ "$RUNNER_OS" == "macOS" ]; then export TMPDIR=${HOME}/tmp; fi
262265
if [ "$RUNNER_OS" == "Windows" ];
263266
then
264267
export MCSTAS_EXECUTABLE="mcstas.exe"
@@ -299,6 +302,7 @@ jobs:
299302
set -x
300303
export MCSTAS_EXECUTABLE="mcstas"
301304
export MCRUN_EXECUTABLE="mcrun"
305+
if [ "$RUNNER_OS" == "macOS" ]; then export TMPDIR=${HOME}/tmp; fi
302306
if [ "$RUNNER_OS" == "Windows" ];
303307
then
304308
export MCSTAS_EXECUTABLE="mcstas.exe"

.github/workflows/mcstas-testsuite.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- { os: ubuntu-latest, CC: clang, CXX: clang++, python: '3.12', mpi: 'mpich' }
2121
- { os: ubuntu-latest, CC: gcc, CXX: g++, python: '3.12', mpi: 'openmpi' }
2222
- { os: ubuntu-latest, CC: gcc, CXX: g++, python: '3.12', mpi: 'mpich' }
23-
#- { os: macos-latest, CC: clang, CXX: clang++, python: '3.12', mpi: 'openmpi' }
23+
- { os: macos-latest, CC: clang, CXX: clang++, python: '3.12', mpi: 'openmpi' }
2424
- { os: macos-latest, CC: clang, CXX: clang++, python: '3.12', mpi: 'mpich' }
2525
- { os: windows-latest, CC: gcc, CXX: g++, python: '3.12', mpi: 'msmpi' }
2626

@@ -168,6 +168,11 @@ jobs:
168168
then
169169
export MCTEST_EXECUTABLE="mctest.bat"
170170
fi
171+
if [ "$RUNNER_OS" == "macOS" ];
172+
then
173+
mkdir ${HOME}/tmp
174+
export TMPDIR=${HOME}/tmp
175+
fi
171176
echo $PATH
172177
${MCTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }} --mpi=2
173178

.github/workflows/mcxtrace-basictest.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
- { os: macos-13, CC: clang, CXX: clang++, python: "3.11", mpi: 'mpich' }
2626
- { os: macos-14, CC: clang, CXX: clang++, python: "3.12", mpi: 'mpich' }
2727
- { os: macos-15, CC: clang, CXX: clang++, python: "3.13", mpi: 'mpich' }
28-
#- { os: macos-13, CC: clang, CXX: clang++, python: "3.11", mpi: 'openmpi' }
28+
- { os: macos-13, CC: clang, CXX: clang++, python: "3.11", mpi: 'openmpi' }
2929
#- { os: macos-14, CC: clang, CXX: clang++, python: "3.12", mpi: 'openmpi' }
30-
#- { os: macos-15, CC: clang, CXX: clang++, python: "3.13", mpi: 'openmpi' }
30+
- { os: macos-15, CC: clang, CXX: clang++, python: "3.13", mpi: 'openmpi' }
3131
#- { os: windows-latest, CC: gcc, CXX: g++, python: "3.12", mpi: 'msmpi' }
3232

3333
name: ${{ matrix.os }}.${{ matrix.CC }}.${{ matrix.mpi }}.python-${{ matrix.python }}
@@ -81,6 +81,7 @@ jobs:
8181
- name: Configure build and install mcxtrace
8282
id: mcxtrace-install
8383
run: |
84+
if [ "$RUNNER_OS" == "macOS" ]; then mkdir ${HOME}/tmp; fi
8485
if [ "$RUNNER_OS" == "macOS" ]; then export SDKROOT=$(xcrun --sdk macosx --show-sdk-path); fi
8586
set -e
8687
set -u
@@ -219,6 +220,7 @@ jobs:
219220
export MCXTRACE_EXECUTABLE="mcxtrace"
220221
export MCXTRACE_PYGEN_EXECUTABLE="mcxtrace-pygen"
221222
export MXRUN_EXECUTABLE="mxrun"
223+
if [ "$RUNNER_OS" == "macOS" ]; then export TMPDIR=${HOME}/tmp; fi
222224
if [ "$RUNNER_OS" == "Windows" ];
223225
then
224226
export MCXTRACE_EXECUTABLE="mcxtrace.exe"
@@ -258,6 +260,7 @@ jobs:
258260
set -x
259261
export MCXTRACE_EXECUTABLE="mcxtrace"
260262
export MXRUN_EXECUTABLE="mxrun"
263+
if [ "$RUNNER_OS" == "macOS" ]; then export TMPDIR=${HOME}/tmp; fi
261264
if [ "$RUNNER_OS" == "Windows" ];
262265
then
263266
export MCXTRACE_EXECUTABLE="mcxtrace.exe"

.github/workflows/mcxtrace-testsuite.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- { os: ubuntu-latest, CC: clang, CXX: clang++, python: '3.12', mpi: 'mpich' }
2121
- { os: ubuntu-latest, CC: gcc, CXX: g++, python: '3.12', mpi: 'openmpi' }
2222
- { os: ubuntu-latest, CC: gcc, CXX: g++, python: '3.12', mpi: 'mpich' }
23-
#- { os: macos-latest, CC: clang, CXX: clang++, python: '3.12', mpi: 'openmpi' }
23+
- { os: macos-latest, CC: clang, CXX: clang++, python: '3.12', mpi: 'openmpi' }
2424
- { os: macos-latest, CC: clang, CXX: clang++, python: '3.12', mpi: 'mpich' }
2525
- { os: windows-latest, CC: gcc, CXX: g++, python: '3.12', mpi: 'msmpi' }
2626

@@ -170,6 +170,11 @@ jobs:
170170
then
171171
export MXTEST_EXECUTABLE="mxtest.bat"
172172
fi
173+
if [ "$RUNNER_OS" == "macOS" ];
174+
then
175+
mkdir ${HOME}/tmp
176+
export TMPDIR=${HOME}/tmp
177+
fi
173178
echo $PATH
174179
${MXTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }} --mpi=2
175180

0 commit comments

Comments
 (0)