Skip to content

Commit

Permalink
Merge pull request OpenMathLib#4977 from martin-frbg/issue4973
Browse files Browse the repository at this point in the history
Add dummy implementations of openblas_get/set_affinity for OpenMP builds
  • Loading branch information
martin-frbg authored Nov 17, 2024
2 parents 2e2f952 + 4060dd4 commit e334b79
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions driver/others/blas_server_omp.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ void openblas_set_num_threads(int num_threads) {
goto_set_num_threads(num_threads);
}

#ifdef OS_LINUX

int openblas_setaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set) {
fprintf(stderr,"OpenBLAS: use OpenMP environment variables for setting cpu affinity\n");
return -1;
}
int openblas_getaffinity(int thread_idx, size_t cpusetsize, cpu_set_t* cpu_set) {
fprintf(stderr,"OpenBLAS: use OpenMP environment variables for querying cpu affinity\n");
return -1;
}
#endif

int blas_thread_init(void){

#if defined(__FreeBSD__) && defined(__clang__)
Expand Down

0 comments on commit e334b79

Please sign in to comment.