Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

How to run a single-thread, single-core version?

New Contributor I

I am new to the forum. I have a most trivial question:

In order to gain some insight into Parallel Gain, I would like to run the basic form of the algorithm, on my computer.

For example, I would like to compare the timing of  ( using my own timing loop) :  a single-core, single-thread version of FFT, compared to the best multi-thread, multi-core version.

I will measure the time (in clocks) for one piece of code, and compared it to the other. If the number of clocks exceeds 10 K, any out-of-order-execution effects will be negligible. If a piece of code is too quick, I execute it multiple times.  Likewise, I will run each code a few times and use the lowest 50% results - against cases of interrupts.

How Do I Disable Parallel Execution In MKL ? 

0 Kudos
2 Replies
Honored Contributor III

Use the MKL Link Line Advisor at and select threading layer = sequential. Compile and link using the options that the advisor tool gives you.

0 Kudos

Hi zalia64,

You may simply control the thread by export OMP_NUM_THREAD=1  or 2, 4  to change the parallel thread number.

and see more methods in MKL user guide:

Best Regards,


0 Kudos