Crash in cblas

View: New views
2 Messages — Rating Filter:   Alert me  

Crash in cblas

by Volker Braun :: Rate this Message:

| View Threaded | Show Only this Message

Hi Clint,

I'm looking at updating ATLAS in Sage and I get a crash at a the
cblas_dgemm call in various places in the Sage testsuite. I've
isolated a minimal testcase below. Just compile with gcc test.c -L
build/lib/ -lcblas -latlas. If I rewrite it into a f77blas call then
it works. This is with Atlas-3.9.77 on Fedora 17 x86_64 and an ivy
bridge (i7-3770K) CPU:


#include <malloc.h>

enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102 };
enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113,
                      AtlasConj=114};

void cblas_dgemm(const enum CBLAS_ORDER Order, const enum
CBLAS_TRANSPOSE TransA,
                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
                 const int K, const double alpha, const double *A,
                 const int lda, const double *B, const int ldb,
                 const double beta, double *C, const int ldc);

int main ()
{
  int n = 44;
  int m = 88;

  double *A = (double*) malloc(n*n*sizeof(double));
  double *B = (double*) malloc(n*m*sizeof(double));
  double *C = (double*) malloc(n*m*sizeof(double));

  cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
              n, m, n, 1.0,
              A, n, B, m,
              0.0, C, m);
  return 0;
}

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Math-atlas-devel mailing list
Math-atlas-devel@...
https://lists.sourceforge.net/lists/listinfo/math-atlas-devel

Re: Crash in cblas

by whaley-8 :: Rate this Message:

| View Threaded | Show Only this Message

Please post support requests to the support tracker, as outlined:
   http://math-atlas.sourceforge.net/faq.html#help

You'll need to post your error file as discussed at the link above, since
your program works fine on my desktop.

Cheers,
Clint

>From math-atlas-devel-bounces@...  Sat Jun 16 13:15:15 2012
Return-Path: <math-atlas-devel-bounces@...>
X-Original-To: whaley@...
Delivered-To: whaley@...
Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com
        designates 209.85.212.181 as permitted sender)
        client-ip=209.85.212.181; envelope-from=vbraun.name@...;
        helo=mail-wi0-f181.google.com;
Date: Sat, 16 Jun 2012 19:16:14 +0100
From: Volker Braun <vbraun.name@...>
To: "List for developer discussion,
        NOT SUPPORT." <math-atlas-devel@...>
X-Headers-End: 1SfxXo-0005n3-Eq
Subject: [atlas-devel] Crash in cblas
X-BeenThere: math-atlas-devel@...
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: "List for developer discussion,
        NOT SUPPORT." <math-atlas-devel@...>
List-Id: "List for developer discussion,
        NOT SUPPORT." <math-atlas-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/math-atlas-devel>,
        <mailto:math-atlas-devel-request@...?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=math-atlas-devel>
List-Post: <mailto:math-atlas-devel@...>
List-Help: <mailto:math-atlas-devel-request@...?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/math-atlas-devel>,
        <mailto:math-atlas-devel-request@...?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Errors-To: math-atlas-devel-bounces@...
X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on mail0.cs.utsa.edu
X-Spam-Level:
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RCVD_BY_IP
        autolearn=ham version=3.0.2
Status: RO

Hi Clint,

I'm looking at updating ATLAS in Sage and I get a crash at a the
cblas_dgemm call in various places in the Sage testsuite. I've
isolated a minimal testcase below. Just compile with gcc test.c -L
build/lib/ -lcblas -latlas. If I rewrite it into a f77blas call then
it works. This is with Atlas-3.9.77 on Fedora 17 x86_64 and an ivy
bridge (i7-3770K) CPU:


#include <malloc.h>

enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102 };
enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113,
                      AtlasConj=114};

void cblas_dgemm(const enum CBLAS_ORDER Order, const enum
CBLAS_TRANSPOSE TransA,
                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
                 const int K, const double alpha, const double *A,
                 const int lda, const double *B, const int ldb,
                 const double beta, double *C, const int ldc);

int main ()
{
  int n = 44;
  int m = 88;

  double *A = (double*) malloc(n*n*sizeof(double));
  double *B = (double*) malloc(n*m*sizeof(double));
  double *C = (double*) malloc(n*m*sizeof(double));

  cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
              n, m, n, 1.0,
              A, n, B, m,
              0.0, C, m);
  return 0;
}

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Math-atlas-devel mailing list
Math-atlas-devel@...
https://lists.sourceforge.net/lists/listinfo/math-atlas-devel


**************************************************************************
** R. Clint Whaley, PhD ** Assist Prof, UTSA ** www.cs.utsa.edu/~whaley **
**************************************************************************

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Math-atlas-devel mailing list
Math-atlas-devel@...
https://lists.sourceforge.net/lists/listinfo/math-atlas-devel