Fortran 95 Interface Conventions for LAPACK
- usingmkl_lapack.fionly through theinclude 'mkl_lapack.fi'statement. Such interfaces allow you to make use of the original LAPACK routines with all their arguments
- usinglapack.f90that includes improved interfaces. This file is used to generate the module fileslapack95.modandf95_precision.mod. See also the section "Fortran 95 interfaces and wrappers to LAPACK and BLAS" of thefor details. The module files are used to process the FORTRAN use clauses referencing the LAPACK interface:Developer GuideIntel® MKLuse lapack95anduse f95_precision.
- 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,selectinstead ofselctg.
- 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 aswork,rwork, 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 (likejobz) can take only two values and one of these values directly implies the use of another argument, then the value ofjobzcan be uniquely reconstructed from the actual presence or absence of this second argument, andjobzcan 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.
- Argumentinfois declared as optional in the Fortran 95 interface. If it is present in the calling sequence, the value assigned toinfois 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 -i, theith 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.