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 ?
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.
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: