00001
00002
00003 #include <stdio.h>
00004 #include <stdlib.h>
00005 #include "cblas.h"
00006 #include "cblas_f77.h"
00007
00008 #define INVALID -1
00009
00010 int main (int argc, char **argv )
00011 {
00012 int rout=-1,info=0,m,n,k,lda,ldb,ldc;
00013 double A[2] = {0.0,0.0},
00014 B[2] = {0.0,0.0},
00015 C[2] = {0.0,0.0},
00016 ALPHA=0.0, BETA=0.0;
00017
00018 if (argc > 2){
00019 rout = atoi(argv[1]);
00020 info = atoi(argv[2]);
00021 }
00022
00023 if (rout == 1) {
00024 if (info==0) {
00025 printf("Checking if cblas_dgemm fails on parameter 4\n");
00026 cblas_dgemm( CblasRowMajor, CblasTrans, CblasNoTrans, INVALID, 0, 0,
00027 ALPHA, A, 1, B, 1, BETA, C, 1 );
00028 }
00029 if (info==1) {
00030 printf("Checking if cblas_dgemm fails on parameter 5\n");
00031 cblas_dgemm( CblasRowMajor, CblasNoTrans, CblasTrans, 0, INVALID, 0,
00032 ALPHA, A, 1, B, 1, BETA, C, 1 );
00033 }
00034 if (info==2) {
00035 printf("Checking if cblas_dgemm fails on parameter 9\n");
00036 cblas_dgemm( CblasRowMajor, CblasNoTrans, CblasNoTrans, 0, 0, 2,
00037 ALPHA, A, 1, B, 1, BETA, C, 2 );
00038 }
00039 if (info==3) {
00040 printf("Checking if cblas_dgemm fails on parameter 11\n");
00041 cblas_dgemm( CblasRowMajor, CblasNoTrans, CblasNoTrans, 0, 2, 2,
00042 ALPHA, A, 1, B, 1, BETA, C, 1 );
00043 }
00044 } else {
00045 if (info==0) {
00046 printf("Checking if F77_dgemm fails on parameter 3\n");
00047 m=INVALID; n=0; k=0; lda=1; ldb=1; ldc=1;
00048 F77_dgemm( "T", "N", &m, &n, &k,
00049 &ALPHA, A, &lda, B, &ldb, &BETA, C, &ldc );
00050 }
00051 if (info==1) {
00052 m=0; n=INVALID; k=0; lda=1; ldb=1; ldc=1;
00053 printf("Checking if F77_dgemm fails on parameter 4\n");
00054 F77_dgemm( "N", "T", &m, &n, &k,
00055 &ALPHA, A, &lda, B, &ldb, &BETA, C, &ldc );
00056 }
00057 if (info==2) {
00058 printf("Checking if F77_dgemm fails on parameter 8\n");
00059 m=2; n=0; k=0; lda=1; ldb=1; ldc=2;
00060 F77_dgemm( "N", "N" , &m, &n, &k,
00061 &ALPHA, A, &lda, B, &ldb, &BETA, C, &ldc );
00062 }
00063 if (info==3) {
00064 printf("Checking if F77_dgemm fails on parameter 10\n");
00065 m=0; n=0; k=2; lda=1; ldb=1; ldc=1;
00066 F77_dgemm( "N", "N" , &m, &n, &k,
00067 &ALPHA, A, &lda, B, &ldb, &BETA, C, &ldc );
00068 }
00069 }
00070
00071 return 1;
00072 }