Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29106 Discussions

The parallel do is not faster than the serial do.

eliopoulos
Novice
758 Views

Hi,

I have created a FORTRAN program and I would like to make it faster. So, I used the parallel do for my main loop. Although the CPU works at a much higher rate, the program is not faster, whatever number of threads I use. The speed also does not really change when I change the number of threads. Any advise?

0 Kudos
3 Replies
jimdempseyatthecove
Honored Contributor III
742 Views

It would help if you would show the code.

 

There could be any number of reasons why your code isn't running any faster.

The usual culprits are:

1) Calling support routines that serialize (contain critical section) the code. For example calling RAN (or other random number generators), performing I/O, heavy memory allocations, among others

2) Too short of runtime for the application to amortize the startup

3) Using many more threads than is practical for a small application.

4) Oversubscription of threads

...

 

Without seeing the code (or a good sketch of the code) makes it difficult to offer suggtestions.

 

Jim Dempsey

0 Kudos
eliopoulos
Novice
737 Views

I would not like to share the code in public. Could you provide an e-mail address?

0 Kudos
jimdempseyatthecove
Honored Contributor III
669 Views
0 Kudos
Reply