crash testing strsv, using OpenBLAS

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

crash testing strsv, using OpenBLAS

Postby Matt Phillips » Thu Sep 05, 2013 9:15 pm

testing_sblas crashes within this block of code:

Code: Select all
        // ----- test STRSV
        // solve A*c = c,  with A m*m triangular; c m-vector
        // try upper/lower, no-trans/trans, unit/non-unit diag
        // Factor A into LU to get well-conditioned triangles, else solve yields garbage.
        // Still can give garbage if solves aren't consistent with LU factors,
        // e.g., using unit diag for U, so copy lower triangle to upper triangle.
        // Also used for trsm later.
        lapackf77_slacpy( "Full", &maxn, &maxn, A, &ld, LU, &ld );
        lapackf77_sgetrf( &maxn, &maxn, LU, &ld, piv, &info );
        for( int j = 0; j < maxn; ++j ) {
            for( int i = 0; i < j; ++i ) {
                *LU(i,j) = *LU(j,i);
        for( int iu = 0; iu < 2; ++iu ) {
        for( int it = 0; it < 3; ++it ) {
        for( int id = 0; id < 2; ++id ) {
            magma_ssetmatrix( m, m, LU, ld, dA, ld );
            magma_ssetvector( m, C, 1, dC1, 1 );
            magma_ssetvector( m, C, 1, dC2, 1 );
            t1 = magma_sync_wtime( 0 );
            magma_strsv( uplo[iu], trans[it], diag[id], m, dA, ld, dC1, 1 );
            t1 = magma_sync_wtime( 0 ) - t1;
            t2 = magma_sync_wtime( 0 );
            cublasStrsv( uplo[iu], trans[it], diag[id], m, dA, ld, dC2, 1 );
            t2 = magma_sync_wtime( 0 ) - t2;
            // check results, storing diff between magma and cuda call in C2
            cublasSaxpy( m, c_neg_one, dC1, 1, dC2, 1 );
            magma_sgetvector( m, dC2, 1, C2, 1 );
            error = lapackf77_slange( "F", &m, &ione, C2, &ld, work );
            total_error += error;
            gflops = FLOPS_STRSM( MagmaLeft, m, 1 ) / 1e9;
            printf( "strsv( %c, %c, %c )  diff %.2g,  Gflop/s %6.2f, %6.2f\n",
                    uplo[iu], trans[it], diag[id], error, gflops/t1, gflops/t2 );
        printf( "\n" );

The console output stops just before this block, then "Segmentation fault (core dumped)". Notably, testing_dblas WORKS (as do _cblas and _zblas), so even if this is an OpenBLAS-specific issue I'd like to sort it out. And I intend on using single-precision in my programming. Running testing_strsv does *not* produce a crash, so cublas* functions are presumably not the problem. testing_sormqr* works but testing_ssytrd* crashes; both invoke magma_strsv. Does anyone know what this might be? And could some kind soul save me the trouble of working through the Makefile, and tell me the compiler command(s) required to rebuild just testing_sblas?
Matt Phillips
Posts: 8
Joined: Sat Feb 23, 2013 11:01 am

Re: crash testing strsv, using OpenBLAS

Postby mgates3 » Mon Sep 23, 2013 11:47 am

For building that file:
cd testing
make testing_sblas

That will also show you the compiler command used to build it. It varies depending on your file.

Can you give some context here -- like your file, and the complete output of testing_sblas? Particularly, that shows what magma version and GPU cards you are using.

Posts: 782
Joined: Fri Jan 06, 2012 2:13 pm

Return to User discussion

Who is online

Users browsing this forum: No registered users and 2 guests