Community
cancel
Showing results for 
Search instead for 
Did you mean: 
zalia64
New Contributor I
342 Views

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

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
mecej4
Black Belt
342 Views

Use the MKL Link Line Advisor at https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor and select threading layer = sequential. Compile and link using the options that the advisor tool gives you.

Ying_H_Intel
Employee
342 Views

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:

https://software.intel.com/en-us/mkl-linux-developer-guide-techniques-to-set-the-number-of-threads

Best Regards,

Ying

Reply