Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

Problem with AMD processor




I hope you are fine and safe.

I am using Visual Studio community 2019 with Intel oneAPI to run FORTRAN codes while using Intel math kernel library.

I have a problem that when I run the code on an AMD processor it only uses around 50% of the processor, but when I run the same code on a PC with intel processor, it uses around 90% of the processor.

Is there any solution to this program?


OS : Windows 10

CPU: Ryzen 2600/2700/3600


0 Kudos
8 Replies
Valued Contributor II

You said

but when I run the same code on a PC with intel processor, it uses around 90% of the processor.


I would be surprised if a process in Fortran on an Intel Processor used 90% of the CPU, I am running a heavy FFT process and it uses less than 10% -- 


How are you measuring it, are you running multiple threads, you need to provide more information.  


Thank you for your reply.

I am using functions or libraries in MKL, like, PARDISO for solving sparse linear systems, MKL_dcsrgemv. 

PARDISO is a parallelized solver which uses multi-threads.


While running the code on an AMD processor, the processor utilization for the code doesn't exceed 55%, on cpu such as i5 6500 it uses around 70%. I don't understand why the utilization on intel processors are higher than AMD processor ( I tested this on Ryzen 2600,2700,3600).

Black Belt Retired Employee

You could ask in the MKL forum, as this isn't a Fortran compiler issue. 

Black Belt

Your i5 6500 has 4 cores/4 HW threads, your Ryzen 2600 has 6 cores/12 hardware threads.

The 70% on the i5 indicates that about 30%+ of your code is serial (one thread) and/or I/O bound for that amount of time (on the i5).

The Ryzen with more threads (assuming same thread execution rate) will complete the MKL parallel region in 1/3rd the time (probably more like 1/2 the time). IOW the serial portion of the execution time now has a greater portion of the execution time vs MKL as compared to the portions on the Ryzen CPUs.


Jim Dempsey

Valued Contributor II

I use Pardiso a lot.  Even when it is super fast and efficient, all of the other processes can slow your program.  You have no control over what is running in the background, so if you access SQL for instance then the log files it builds as it runs are huge and will fill a hard drive in matter of a week,  Windows can be doing things, downloading updates.  One of my main codes tracks the cycle time for the FFT process it can vary from 2 to 10 seconds,  I have measured this over years and we record the result in the cloud.

Steve is right the MKL forum is the correct place, if you are lucky @mecej4 might chime in if @mecej4  has any ideas, probably the person with the best skills in this area.  

Good luck, but I think you are hunting a furphy.  


I really appreciate your replies, thank you very much.

The reason for posting this issue that I tried running my code on two machines, the old machine with i5 6500 and a new machine which I have just bought with Ryzen 3600. it is the same code with the same parameters and functions. I write a file every 1000 time step or iteration or whatever you call it, and what was astonishing was that both machines print a file every 3 minutes, which was something I couldn't understand as the Ryzen process is a far better processor than the 6500. 


I really appreciate your patience, I am not an expert in compilers, I am a graduate student and I am still learning FORTRAN

Valued Contributor II

Thinking you have a faster processor is a furphy.  You have a machine, a von Neumann device, so it has many parts and some are slow and some are not.  I use corei3 and core i5 and core i7 machines,  they do not have significant differences in speeds, not as much as you would think.  

If you are running Windows download a program called winaerotweaker, it is a great little program for tweaking your computer and run the speed test thing, it ranks computers from about 1 to 10, you will see less difference than you think.  The greatest difference is the speed of the hard drive.  

You never stop learning Fortran, it is still faster by a long way than anything else you will use MATLAB Mathematica Python etc...

Black Belt

Have you run your program under VTune?

Run it on both systems. This will show you why the runtimes are not what you expect. Also, it can show you how to address the (perceived) performance issue.

Jim Dempsey