I'm currently working on a finite element program I wrote by myself. It will try to avoid the cores which has taken by other threads even if those cores are not busy at all.Hello to all, I'm new to this forum and I got a question on the MKL dss. So looks like MKL does not allow overlap binding cores. In this case, thread 0 can get the peak performance of the remaining 57 cores. Now, thread 0 can get the peak performance of 60 cores.Ĭase 3, thread 0 mkl_set_num_threads_local(240-3*4), thread 1-3 mkl_set_num_threads_local(0), and send them to sleep, I did 3 experinment, the results are pretty interesting:Ĭase 1, thread 0 mkl_set_num_threads_local(240), thread 1-3 mkl_set_num_threads_local(0), and send them to sleep.Ĭase 2, thread 0 mkl_set_num_threads_local(240), thread 1-3 mkl_set_num_threads_local(0), and send them to sleep, BUT thread 1-3 are NEVER bound to any cores, I just create them and let them there. At some point, I am going to send thread 1-3 to sleep, and let thread 0 call MKL funtion like dgemm with MKL_NUM_THREADS=240(4HT per core), but I am not able to use all the 60 cores even if thread 1-3 have already slept. There are 4 threads, thread 1-3 are bound to core 1-3 (each thread is bound to 1 core), and thread 0 is bound to all cores (60 in intel MIC). Right now, I have a another issue with MKL. BTW, in your program, there is only 1 MKL runs, since it is outside the pragma, right? but the MKL_NUM_THREADS=2. I already fix the problem, my solution is similar to yours, but I use kmp set affnity. Seethe Linux Programmer's Manual(in man pages format)forparticulars of thesched_setaffinityfunction used in the above example. Run it intwothreads, for example, by using the environmentvariable to set the number of threads: Wheretest_application.cis the filename for the application.īuild the application. #define _GNU_SOURCE //for using the GNU CPUaffinity // (works with the appropriate kernel and glibc) // Setaffinity mask #include #include #include #include int main(void) Ĭompile the application with the Intel compiler using the following command: The code calls the system functionsched_setaffinityto bind the threads tothecoreson different sockets. The following code example shows how to resolve this issue by setting anaffinitymask by operating system means using the Intel compiler.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |