Fixed a bug when P<N. Added a test case to fix it.

12 jobs for fix-gsvd in 3 minutes and 10 seconds (queued for 8 seconds)