deadlock when using advisor+openblas+threading

deadlock when using advisor+openblas+threading

Hope this is the right place to report the following issue.

Context: I'm using Advisor with a Python/C code (Python calls C functions to speed up expensive code sections).

Issue: I get non-deterministic deadlocks (the program stops executing) unless I disable threading. No problems w/o Advisor.

More insights: Initially, I (empirically) observed that no deadlock happening when setting OMP_NUM_THREADS=1. Then, I observed (again empirically) no deadlock w/o importing NumPy. My NumPy uses OpenBLAS underneath. So I tried disabling both OpenBLAS threading (OPENBLAS_NUM_THREADS=1) and Numaexpr threading (NUMEXPR_NUM_THREADS=1), leaving OMP_NUM_THREADS unset. Result: no deadlock (hence the thread title).

Unfortunately, I couldn't come up with a minimal reproducible example (or better, I do have one which is only five lines, but it requires importing my own Python modules). Before trying harder, I wonder whether there's an explanation off top of your head, or whether I'm doing something stupid (entirely possible)?

my command line is no special:

advixe-cl -data-limit=500  -collect survey  -project-dir myprojdir -search-dir src:r=/tmp -run-pass-thru=--no-altstack -- python


-- Fabio

Fabio Luporini, lead developer of the IPCC funded project Devito:
3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Forgot one important detail. The issue above is from the latest stable release

amplxe-cl --version
Intel(R) VTune(TM) Amplifier 2018 Update 3 (build 558279) Command Line Tool
Copyright (C) 2009-2018 Intel Corporation. All rights reserved.

Fabio Luporini, lead developer of the IPCC funded project Devito:

Ideally Advisor should work with multiple threads in underlying libraries, so most probably it is a bug.

Could you try to run survey collection by attaching to running python process and see if this helps?

Leave a Comment

Please sign in to add a comment. Not a member? Join today