Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4975 Discussions

deadlock when using advisor+openblas+threading

FabioL_
Beginner
743 Views

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 myprogram.py

Thanks

-- Fabio

0 Kudos
2 Replies
FabioL_
Beginner
743 Views

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.

0 Kudos
Egor_K_Intel
Employee
743 Views

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?

0 Kudos
Reply