Intel(R) - Computational and Systems Biology at MIT
Intel(R) - Computational and Systems Biology at MIT
Intel(R) - Computational and Systems Biology at MIT
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
6 <strong>Intel</strong>® M<strong>at</strong>h Kernel Library User’s GuideUsing Additional Threading Control<strong>Intel</strong> MKL 10.0 introduces new optional threading controls, th<strong>at</strong> is, the environmentvariables <strong>and</strong> service functions. They behave similar to their OpenMP equivalents, but takeprecedence over them. By using these controls along with OpenMP variables, you canthread the part of the applic<strong>at</strong>ion th<strong>at</strong> does not call <strong>Intel</strong> MKL <strong>and</strong> the library independentlyfrom each other.These controls enable you to specify the number of threads for <strong>Intel</strong> MKL independently ofthe OpenMP settings. Although <strong>Intel</strong> MKL may actually use the number of threads th<strong>at</strong>differs from the one suggested, the controls will also enable you to instruct the library totry using the suggested number in the event of undetectable threading behavior in theapplic<strong>at</strong>ion calling the library.NOTE. <strong>Intel</strong> MKL does not always have a choice on the number ofthreads for certain reasons, such as system resources.Employing <strong>Intel</strong> MKL threading controls in your applic<strong>at</strong>ion is optional. If you do not usethem, the library will mainly behave the same way as <strong>Intel</strong> MKL 9.1 in wh<strong>at</strong> rel<strong>at</strong>es tothreading with the possible exception of a different default number of threads. See Note onFFT Usage for the usage differences.Table 6-2 lists the <strong>Intel</strong> MKL environment variables for threading control, their equivalentfunctions, <strong>and</strong> OMP counterparts:Table 6-2<strong>Intel</strong>® MKL environment variables for threading controlsEnvironment Variable Service Function CommentMKL_NUM_THREADS mkl_set_num_threads Suggests the number ofthreads to use.MKL_DOMAIN_NUM_THREADSmkl_domain_set_num_threadsSuggests the number ofthreads for a particularfunction domain.MKL_DYNAMIC mkl_set_dynamic Enables <strong>Intel</strong> MKL todynamically change thenumber of threads.Equivalent OMPEnvironmentVariableOMP_NUM_THREADSOMP_DYNAMIC6-8