MATLAB: Convolution – Parfor loops not giving speedup on 12 core than 4 core machine

cpu usagematlab coderParallel Computing Toolboxparfor

Hello,
I am using "Matcovnet" to work on the Imagenet dataset for training and inference using fixed point operands. I am working on two machines simultaneously, both having different number of cores
1) 4 cores
2) 12 cores
I am running same dataset and same fixed point training code on both the machines simultaneously. I am getting 0.2 Hz frequency (0.2 images/sec) on both the machines, which ideally should not happen as the number of cores are different for both machines. I am having various parfor loops in the code.
The parfor loops are in the codegen files which are converted in the MEX functions by Matlabcoder toolbox.
My main question is:
1) Even if I use for loops instead of parfor my both machines uses all the cores by default with around 90% CPU-Utilization (just having parallel computing toolbox has this effect?) and also, my speed of computation/training is still the same that is 0.2 Hz, Can you please let me know about it ?
2) My 2nd question is, if I use parfor loop and run the code on this two machines why am I not getting any speedup on the machine with 12 cores compared to 4 cores ? Also, here on both machines I am getting the same training speed, that is 0.2 Hz.
Thank you in advance for your help !
Bhushan

Best Answer

Hello,
I am answering my own question.
After doing some research I found out that my compiler(Microsoft Windows SDK 7.1) does not support openMP according to the link.
For using parfor loop while generating MEX file the compiler must support openMP. Below link gives this explanation.
So my question is, can you provide me the compiler which will support
1) Matcovnet 2) Parallel Computing toolbox 3) OpenMP 4) Matlab coder
I am not able to get the clear explanation about the compiler supporting openMP from the link.
https://www.mathworks.com/support/compilers.html
Thank you for your kind help.