Skip to content

Commit 1af95bb

Browse files
committed
Enable ASAN for all mpi4py tests and increase optimizations
30 minutes are not enough to run two extra tests so just enable ASAN for the existing tests. Also test `ompi_info` and `mpicc`. Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
1 parent 7f5eea7 commit 1af95bb

1 file changed

Lines changed: 20 additions & 32 deletions

File tree

.github/workflows/ompi_mpi4py.yaml

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,16 @@ jobs:
2626
timeout-minutes: 30
2727
env:
2828
MPI4PY_TEST_SPAWN: true
29-
# disable ODR violation detection until #13469 is fixed
30-
# and don't abort on error by default
29+
# disable ASAN while building
3130
ASAN_OPTIONS: verify_asan_link_order=0,detect_odr_violation=0,abort_on_error=0
32-
# disable leak detection and make sure we do not fail on leaks
31+
# disable leak detection
3332
LSAN_OPTIONS: detect_leaks=0,exitcode=0
3433

3534
steps:
3635
- name: Configure hostname
3736
run: echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null
3837
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
3938

40-
# - name: Print kernel version
41-
# run: uname -a
42-
#
43-
# - name: Disable ASLR
44-
# run: sudo sysctl -w kernel.randomize_va_space=0
45-
# if: ${{ runner.os == 'Linux' }}
46-
4739
- name: Install depencencies
4840
run: sudo apt-get install -y -q
4941
libnuma-dev libasan8
@@ -74,7 +66,7 @@ jobs:
7466
--disable-oshmem
7567
--disable-silent-rules
7668
--prefix=/opt/openmpi
77-
CFLAGS="-fno-omit-frame-pointer -g -O1 -fsanitize=address"
69+
CFLAGS="-O2 -fno-omit-frame-pointer -g -fsanitize=address"
7870
LDFLAGS="-Wl,-rpath,/opt/openmpi/lib -fsanitize=address"
7971
working-directory: mpi-build
8072

@@ -131,6 +123,19 @@ jobs:
131123
env:
132124
CFLAGS: "-O0"
133125

126+
- name: Setting up ASAN environment
127+
# LD_PRELOAD is needed to make sure ASAN is the first thing loaded
128+
# as it will otherwise complain
129+
# Leak detection is currently disabled because of the size of the report.
130+
# The patcher is disabled because ASAN fails if code mmaps data at fixed
131+
# memory addresses, see https://github.com/open-mpi/ompi/issues/12819
132+
# ODR violation detection is disabled until #13469 is fixed
133+
run: |
134+
echo LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.8 >> $GITHUB_ENV
135+
echo ASAN_OPTIONS=detect_odr_violation=0,abort_on_error=1 >> $GITHUB_ENV
136+
echo LSAN_OPTIONS=detect_leaks=0,exitcode=0 >> $GITHUB_ENV
137+
echo OMPI_MCA_memory=^patcher >> $GITHUB_ENV
138+
134139
- name: Test mpi4py (singleton)
135140
run: python test/main.py -v -x TestExcErrhandlerNull
136141
if: ${{ true }}
@@ -161,28 +166,11 @@ jobs:
161166
if: ${{ true }}
162167
timeout-minutes: 10
163168

164-
- name: Setting up ASAN environment
165-
# LD_PRELOAD is needed to make sure ASAN is the first thing loaded
166-
# as it will otherwise complain
167-
# Leak detection is currently disabled because of the size of the report.
168-
# The patcher is disabled because ASAN fails if code mmaps data at fixed
169-
# memory addresses, see https://github.com/open-mpi/ompi/issues/12819
170-
# ODR violation detection is disabled until #13469 is fixed
171-
run: |
172-
echo LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.8 >> $GITHUB_ENV
173-
echo ASAN_OPTIONS=detect_odr_violation=0,abort_on_error=1 >> $GITHUB_ENV
174-
echo LSAN_OPTIONS=detect_leaks=0,exitcode=0 >> $GITHUB_ENV
175-
echo OMPI_MCA_memory=^patcher >> $GITHUB_ENV
176-
177-
- name: Test mpi4py ASAN (np=1)
178-
run: mpiexec -n 1 python test/main.py -v -x TestExcErrhandlerNull
179-
if: ${{ true }}
180-
timeout-minutes: 10
169+
- name: Show MPI (ASAN)
170+
run: ompi_info
181171

182-
- name: Test mpi4py ASAN (np=4)
183-
run: mpiexec -n 4 python test/main.py -v -f -x TestExcErrhandlerNull
184-
if: ${{ true }}
185-
timeout-minutes: 10
172+
- name: Show MPICC (ASAN)
173+
run: mpicc -show
186174

187175
- name: Disabling ASAN environment
188176
run: |

0 commit comments

Comments
 (0)