When using magma_dgesvd I run into segfaults if I use the optimal WORK array size computed by the function in query mode.
This happens when M is at least N but not much larger (one way to reproduce is for example to use M = N). The formule used by magma_dgesvd is (M + N) * block_size + N, from my finding it seems that allocating (M + N) * block_size + 3*N elements fixes the problem.
I am not familiar enough with the code to check if the problem is really related to the optimal size formula or to an incorrect use of the work array.
Any idea on what I can be doing wrong or maybe what could be wrong on MAGMA side?
Thanks ! :)
Edit: I forgot something important, the problem only happens with N > 128.