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

Speeding up Fortran Programs?

briansss
Beginner
877 Views
I believe that Fortran 90 contained many more functions than previously contained in Fortran 77. These functions would generally be quicker than the subroutines that were needed to perform the same functions in Fortran 77, for example MATMUL can now be used in place of a GMPRD routine. Just wondering if anyone knows any other such functions which could be used in place of old Fortran 77 subroutines.
0 Kudos
2 Replies
anthonyrichards
New Contributor III
877 Views
Quoting - briansss
I believe that Fortran 90 contained many more functions than previously contained in Fortran 77. These functions would generally be quicker than the subroutines that were needed to perform the same functions in Fortran 77, for example MATMUL can now be used in place of a GMPRD routine. Just wondering if anyone knows any other such functions which could be used in place of old Fortran 77 subroutines.

Why not list here the F77 functions you are interested in replacing, along with brief description of what each does?
0 Kudos
TimP
Honored Contributor III
877 Views
Quoting - briansss
I believe that Fortran 90 contained many more functions than previously contained in Fortran 77. These functions would generally be quicker than the subroutines that were needed to perform the same functions in Fortran 77, for example MATMUL can now be used in place of a GMPRD routine. Just wondering if anyone knows any other such functions which could be used in place of old Fortran 77 subroutines.
dot_product is probably the most frequently useful f90 intrinsic for substitution into f77 code. It doesn't necessarily run faster.
minval, maxval, minloc, maxloc also may be used frequently.
The most common legacy alternative to MATMUL is BLAS ?GEMM. The Intel Math Kernel Library version of it is updated frequently to optimize for new CPUs, and uses techniques such as tiling and threading to speed up large cases. Possibly on account of some analysis or thought being useful, MATMUL substitution is not so popular, although it may improve maintainability.
It's hard to imagine how one could set limits on which f90 intrinsic functions would be suitable for replacing legacy code.
It seems that when you say "old F77 subroutine" it seems, by your example, you may mean other old libraries with less broad support than BLAS.
0 Kudos
Reply