Several tests were failing because of the incorrect assumption that the "magnitude" is the complex norm (L2).  In these blas functions, the magnitude is as stated here (an L1 norm, see the cublas docs for example.)  These ``argmax`` etc. functions fail randomly in the old tests because usually this L1 norm gives the same ordering as the L2 norm, but not always.