Attached is a test case and screenshots where ZGESVD is sometimes computing the wrong lwork value when using MPI. This is the regular Lapack ZGESVD and not the Scalapack PZGESVD. I have not checked, but I assume it occurs for all the *GESVD and not just ZGESVD. If I remove the MPI specific code so I can run directly without using 'mpiexec', then the bug does not occur. It only occurs when running with mpiexec to load the MPI library. It also only occurs when one (or both) of the svd job types is 'N'. If both svd job types are 'S', then it doesn't occur.
My platform is Windows 7, MKL 11.0.5, MPI 4.0.3.009.