dgesdd gets stuck for size 40+
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lapack (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
On Ubuntu 20.04 (Focal Fossa), the following code:
gets stuck on the LAPACKE_dgesdd call using liblapacke-dev (3.9.0-1build1). It seems to get stuck for every matrix size N>=40. I've unsuccessfully tried out the following variations:
* Different compilers (gcc-9, gcc-10, clang-10)
* Linking to different BLAS implementations (libopenblas-dev, libblas-dev)
* With and without Different optimization settings (-ffast-math, -march=native, -O3)
The CPU is an AMD Ryzen9 3900X (in case that's relevant).
What I've then tried is to build LAPACK(E) 3.9.0 from source directly using cmake and the "make.inc.example" file included in the LAPACK source code. And that compiled version works just fine!
Maybe there is bad optimization done by the compiler used for the Ubuntu package?
My C/C++ (let alone Fortran) knowledge is quite limited, which means I am going to need some help if I am to provide further debug information.
Here's the GDB stack trace:
#0 0x00007ffff3aec70b in sched_yield () at ../sysdeps/ unix/syscall- template. S:78 async_wait () from /lib/x86_ 64-linux- gnu/liblapack. so.3 64-linux- gnu/liblapack. so.3 64-linux- gnu/liblapack. so.3 64-linux- gnu/liblapack. so.3 64-linux- gnu/liblapack. so.3 64-linux- gnu/liblapack. so.3 64-linux- gnu/liblapack. so.3 64-linux- gnu/liblapack. so.3 64-linux- gnu/liblapacke. so.3 64-linux- gnu/liblapacke. so.3 error.cpp: 40
#1 0x00007ffff4d749a5 in exec_blas_
#2 0x00007ffff4d74a7c in exec_blas () from /lib/x86_
#3 0x00007ffff4c42392 in dtrmv_thread_NUN () from /lib/x86_
#4 0x00007ffff4c19c7a in dtrmv_ () from /lib/x86_
#5 0x00007ffff486e74b in dlarft_ () from /lib/x86_
#6 0x00007ffff48aa758 in dormqr_ () from /lib/x86_
#7 0x00007ffff48a83a6 in dormbr_ () from /lib/x86_
#8 0x00007ffff47ff9a6 in dgesdd_ () from /lib/x86_
#9 0x00007ffff43eb179 in LAPACKE_dgesdd_work () from /lib/x86_
#10 0x00007ffff43eac28 in LAPACKE_dgesdd () from /lib/x86_
#11 0x00000000004c78e5 in main () at src/lapacke_