2005-02-14 01:10:07 +01:00
|
|
|
// LA and general error handler
|
2005-02-04 15:31:42 +01:00
|
|
|
#include <iostream>
|
|
|
|
#include "laerror.h"
|
2005-02-14 01:10:07 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <errno.h>
|
2005-02-04 15:31:42 +01:00
|
|
|
void laerror(const char *s1)
|
|
|
|
{
|
|
|
|
std::cerr << "LA:ERROR - ";
|
2005-02-14 01:10:07 +01:00
|
|
|
std::cout << "LA:ERROR - ";
|
|
|
|
if(s1)
|
|
|
|
{
|
|
|
|
std::cerr << s1 << "\n";
|
|
|
|
std::cout << s1 << "\n";
|
2005-02-04 15:31:42 +01:00
|
|
|
}
|
2005-02-14 01:10:07 +01:00
|
|
|
if(errno) perror("system error");
|
2005-02-04 15:31:42 +01:00
|
|
|
throw LAerror(s1);
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
2005-02-14 01:10:07 +01:00
|
|
|
//stub for f77 blas called from strassen routine
|
|
|
|
extern "C" void xerbla_(const char name[6], int *n)
|
|
|
|
{
|
|
|
|
char msg[128];
|
|
|
|
strcpy(msg,"LAPACK or BLAS error in routine ");
|
|
|
|
strncat(msg,name,6);
|
|
|
|
sprintf(msg+strlen(msg),": illegal value of parameter #%d",*n);
|
|
|
|
laerror(msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
|