From 4060dd43e308e4dfa32a7024b98ef62314e9ed18 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Fri, 15 Nov 2024 15:16:17 -0800 Subject: [PATCH] Add dummy implementations of openblas_get/set_affinity --- driver/others/blas_server_omp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/driver/others/blas_server_omp.c b/driver/others/blas_server_omp.c index 4341389d81..38b48fc842 100644 --- a/driver/others/blas_server_omp.c +++ b/driver/others/blas_server_omp.c @@ -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__)