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

passing large array to subroutines and speed-up

diedro
Beginner
337 Views

Dear all,

I have a question about code speed due to different strategy in passing array to subroutines.

Recently, I have rewritten an old code where only small arrays are passed to subroutines. In my new version, I usually pass all the array with modules.

Unfortunately, I have noticed that my new version of the code is very very much slower than the initial version. I am wondering if this is due to the new way in passing the arrays to subroutine or if the problem is related to something else.

Really, Really

Thanks

0 Kudos
2 Replies
Steve_Lionel
Honored Contributor III
337 Views

Something else, probably. Obviously you changed more than just how arrays were passed in. You've now made them global module variables and taken them out of the argument list? In that case there is no "passing" at all.

The usual advice is to do performance analysis using a tool such as Intel Vtune Amplifier XE and see where the program is spending most of its time. In most cases it's not where you think.

0 Kudos
diedro
Beginner
337 Views

Dear Steve,

I will check with the Intel Vtune Amplifier XE.

Thanks a lot for the suggestion.

0 Kudos
Reply