Skip to content

Instantly share code, notes, and snippets.

@thrasibule
Created July 20, 2023 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thrasibule/394425dee40b2b852513c47f1b737ad6 to your computer and use it in GitHub Desktop.
Save thrasibule/394425dee40b2b852513c47f1b737ad6 to your computer and use it in GitHub Desktop.
blas test for bug #4017
#include <cblas.h>
#include <omp.h>
#include <stdio.h>
#define DATASIZE 100
double A[DATASIZE*DATASIZE];
double B[DATASIZE*DATASIZE];
double C[DATASIZE*DATASIZE];
void main()
{
printf("%d\n", omp_get_max_threads());
cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
DATASIZE, DATASIZE, DATASIZE, 1, A, DATASIZE, B, DATASIZE, 0, C, DATASIZE);
printf("%d\n", omp_get_max_threads());
omp_set_num_threads(4);
cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
DATASIZE, DATASIZE, DATASIZE, 1, A, DATASIZE, B, DATASIZE, 0, C, DATASIZE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment