Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content

Fortran 95 Interface Conventions for LAPACK Routines

Intel® MKL
implements the Fortran 95 interface to LAPACK through wrappers that call respective FORTRAN 77 routines. This interface uses such Fortran 95 features as assumed-shape arrays and optional arguments to provide simplified calls to LAPACK routines with fewer arguments.
Intel® MKL
offers two types of the Fortran 95 interfaces:
  • using
    only through the
    include ''
    statement. Such interfaces allow you to make use of the original LAPACK routines with all their arguments
  • using
    that includes improved interfaces. This file is used to generate the module files
    . See also the section "Fortran 95 interfaces and wrappers to LAPACK and BLAS" of the
    Intel® MKL
    Developer Guide
    for details. The module files are used to process the FORTRAN use clauses referencing the LAPACK interface:
    use lapack95
    use f95_precision
The main conventions for the Fortran 95 interface are as follows:
  • The names of arguments used in Fortran 95 call are typically the same as for the respective generic (FORTRAN 77) interface. In rare cases, formal argument names may be different. For instance,
    instead of
  • Input arguments such as array dimensions are not required in Fortran 95 and are skipped from the calling sequence. Array dimensions are reconstructed from the user data that must exactly follow the required array shape.
    Another type of generic arguments that are skipped in the Fortran 95 interface are arguments that represent workspace arrays (such as
    , and so on). The only exception are cases when workspace arrays return significant information on output.
    Internally, workspace arrays are allocated by the Fortran 95 interface wrapper, and are of optimal size for the best performance of the routine.
    An argument can also be skipped if its value is completely defined by the presence or absence of another argument in the calling sequence, and the restored value is the only meaningful value for the skipped argument.
  • Some generic arguments are declared as optional in the Fortran 95 interface and may or may not be present in the calling sequence. An argument can be declared optional if it meets one of the following conditions:
    • If an argument value is completely defined by the presence or absence of another argument in the calling sequence, it can be declared optional. The difference from the skipped argument in this case is that the optional argument can have some meaningful values that are distinct from the value reconstructed by default. For example, if some argument (like
      ) can take only two values and one of these values directly implies the use of another argument, then the value of
      can be uniquely reconstructed from the actual presence or absence of this second argument, and
      can be omitted.
    • If an input argument can take only a few possible values, it can be declared as optional. The default value of such argument is typically set as the first value in the list and all exceptions to this rule are explicitly stated in the routine description.
    • If an input argument has a natural default value, it can be declared as optional. The default value of such optional argument is set to its natural default value.
  • Argument
    is declared as optional in the Fortran 95 interface. If it is present in the calling sequence, the value assigned to
    is interpreted as follows:
    • If this value is more than -1000, its meaning is the same as in the FORTRAN 77 routine.
    • If this value is equal to -1000, it means that there is not enough work memory.
    • If this value is equal to -1001, incompatible arguments are present in the calling sequence.
    • If this value is equal to -
      , the
      th parameter (counting parameters in the FORTRAN 77 interface, not the Fortran 95 interface) had an illegal value.
  • Optional arguments are given in square brackets in the Fortran 95 call syntax.
The "Fortran 95 Notes" subsection at the end of the topic describing each routine details concrete rules for reconstructing the values of the omitted optional parameters.

Product and Performance Information


Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804