I am wondering if anyone has had this kind of problem.
I am using CLAPACK shipped with MacOS X. For a particular matrix, CLAPACK's sgesvd_() returns NaN's in U, S and V, while Matlab's svd() returns reasonable results.
It is fairly safe to say that it is not a bug in the way I use sgesvd_(), since the code produces same result as Matlab on other matrices.
If there are some known issues about the SVD implementation in CLAPACK, I'd like to know more about it.