Skip to content

Commit 59b713e

Browse files
committed
Use the properly-capitalized C-ABI MKL threading interface
It appears that the all-lowercase threading symbols are actually all FORTRAN ABI, as can be seen through `dlsym()`: ``` julia> dlsym(libmkl_rt, "mkl_set_num_threads") Ptr{Nothing} @0x00007fa64f24e3b0 julia> dlsym(libmkl_rt, "mkl_set_num_threads_") Ptr{Nothing} @0x00007fa64f24e3b0 ``` The C-ABI versions are not the non-underscore-suffixed ones, but the capitalized ones, e.g. `MKL_Set_Num_Threads`. The more you know.
1 parent e132e64 commit 59b713e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/threading.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
*/
1111
static char * getter_names[MAX_THREADING_NAMES] = {
1212
"openblas_get_num_threads",
13-
"mkl_get_max_threads",
13+
"MKL_Get_Max_Threads",
1414
"bli_thread_set_num_threads",
1515
NULL
1616
};
1717

1818
static char * setter_names[MAX_THREADING_NAMES] = {
1919
"openblas_set_num_threads",
20-
"mkl_set_num_threads",
20+
"MKL_Set_Num_Threads",
2121
"bli_thread_get_num_threads",
2222
NULL
2323
};

0 commit comments

Comments
 (0)