@@ -24,14 +24,22 @@ jobs:
2424 timeout-minutes : 30
2525 env :
2626 MPI4PY_TEST_SPAWN : true
27+ # ASAN needs to come first
28+ # LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libasan.so.8
29+ # disable ODR violation detection until #13469 is fixed
30+ # and don't abort on error by default
31+ 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
33+ LSAN_OPTIONS : detect_leaks=0,exitcode=0
34+
2735 steps :
2836 - name : Configure hostname
2937 run : echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null
3038 if : ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
3139
3240 - name : Install depencencies
3341 run : sudo apt-get install -y -q
34- libnuma-dev
42+ libnuma-dev libasan8
3543 if : ${{ runner.os == 'Linux' }}
3644
3745 - name : Checkout Open MPI
5967 --disable-oshmem
6068 --disable-silent-rules
6169 --prefix=/opt/openmpi
62- LDFLAGS=-Wl,-rpath,/opt/openmpi/lib
70+ CFLAGS="-fno-omit-frame-pointer -g -O1 -fsanitize=address"
71+ LDFLAGS="-Wl,-rpath,/opt/openmpi/lib -fsanitize=address"
6372 working-directory : mpi-build
6473
6574 - name : Build MPI
@@ -158,3 +167,24 @@ jobs:
158167 if : ${{ true }}
159168 timeout-minutes : 10
160169
170+ - name : Test mpi4py ASAN (np=1)
171+ env :
172+ LD_PRELOAD : /usr/lib/x86_64-linux-gnu/libasan.so.8
173+ # run again and abort if ASAN detects an error
174+ ASAN_OPTIONS : detect_odr_violation=0,abort_on_error=1
175+ # enable leak detection but do not fail on leaks
176+ LSAN_OPTIONS : detect_leaks=1,exitcode=0
177+ run : mpiexec -n 1 python test/main.py -v -x TestExcErrhandlerNull
178+ if : ${{ true }}
179+ timeout-minutes : 10
180+
181+ - name : Test mpi4py ASAN (np=4)
182+ env :
183+ LD_PRELOAD : /usr/lib/x86_64-linux-gnu/libasan.so.8
184+ # run again and abort if ASAN detects an error
185+ ASAN_OPTIONS : detect_odr_violation=0,abort_on_error=1
186+ # enable leak detection but do not fail on leaks
187+ LSAN_OPTIONS : detect_leaks=1,exitcode=0
188+ run : mpiexec -n 4 python test/main.py -v -f -x TestExcErrhandlerNull
189+ if : ${{ true }}
190+ timeout-minutes : 10
0 commit comments