dsyevdx: Issue with small matrices

Issue #28 resolved
Simon created an issue

We have been observing issues when calling magma_dsyevdx for small matrix sizes. Looking at dsyevdx.cpp, the following part at line 281 appears to be the issue.

    /* Check if matrix is very small then just call LAPACK on CPU, no need for GPU */
    if (n <= 128) {
        #ifdef ENABLE_DEBUG
        printf("  warning matrix too small N=%lld NB=%lld, calling lapack on CPU\n", (long long) n, (long long) nb );
        lapackf77_dsyevd(jobz_, uplo_,
                         &n, A, &lda,
                         w, work, &lwork,
                         iwork, &liwork, info);
        return *info;

Calling dsyevd may be incorrect here. Removing this part solves the issues we have been observing.

Comments (7)

  1. Yaohung Mike Tsai

    @Cade Brown I believe it’s when a range is assigned (il, iu) or (vl, vu), we are not moving the requested eigenvalues and eigenvectors to the beginning or w and A.

  2. Yaohung Mike Tsai

    @Simon Could you provide your input arguments for magma_dsyevdx?

    Especially jobz, range, n, (vl, vu, il, iu). Thanks!

  3. Simon reporter

    From gdb:

    magma_dsyevdx (jobz=MagmaVec, range=MagmaRangeI, uplo=MagmaLower, n=30, A=0x7fffac2b0800, lda=60, vl=0, vu=0, il=1, iu=15, m=0x7fffffff6b4c, w=0x7137800, work=0x7fffac040000, lwork=24309,
    iwork=0x715a200, liwork=153, info=0x7fffffff6b48)

  4. Yaohung Mike Tsai

    Great thanks!

    Yes it is for the ranged case and n<=128. I am working on it. I’m also updated the testing routines as the checks are incorrect for ranged cases.

  5. Log in to comment