ilaenv

Environmental enquiry function that returns values for tuning algorithmic performance.

Syntax

value = ilaenv( ispec, name, opts, n1, n2, n3, n4 )

Include Files

The FORTRAN 77 interfaces are specified in the mkl_lapack.fi include file (to be used in Fortran programs) and in the mkl_lapack.h include file (to be used in C programs).

Description

The enquiry function ilaenv is called from the LAPACK routines to choose problem-dependent parameters for the local environment. See ispec below for a description of the parameters.

This version provides a set of parameters that should give good, but not optimal, performance on many of the currently available computers.

This routine will not function correctly if it is converted to all lower case. Converting it to all upper case is allowed.

Optimization Notice

Intel compilers, associated libraries and associated development tools may include or utilize options that optimize for instruction sets that are available in both Intel and non-Intel microprocessors (for example SIMD instruction sets), but do not optimize equally for non-Intel microprocessors. In addition, certain compiler options for Intel compilers, including some that are not specific to Intel micro-architecture, are reserved for Intel microprocessors. For a detailed description of Intel compiler options, including the instruction sets and specific microprocessors they implicate, please refer to the "Intel Compiler User and Reference Guides" under "Compiler Options." Many library routines that are part of Intel compiler products are more highly optimized for Intel microprocessors than for other microprocessors. While the compilers and libraries in Intel compiler products offer optimizations for both Intel and Intel-compatible microprocessors, depending on the options you select, your code and other factors, you likely will get extra performance on Intel microprocessors.

Intel compilers, associated libraries and associated development tools 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 Intel® Streaming SIMD Extensions 2 (Intel® SSE2), Intel® Streaming SIMD Extensions 3 (Intel® SSE3), and Supplemental Streaming SIMD Extensions 3 (Intel 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.

While Intel believes our compilers and libraries are excellent choices to assist in obtaining the best performance on Intel and non-Intel microprocessors, Intel recommends that you evaluate other compilers and libraries to determine which best meet your requirements. We hope to win your business by striving to offer the best performance of any compiler or library; please let us know if you find we do not.

Notice revision #20110307

Input Parameters

ispec

INTEGER.

Specifies the parameter to be returned as the value of ilaenv:

= 1: the optimal blocksize; if this value is 1, an unblocked algorithm will give the best performance.

= 2: the minimum block size for which the block routine should be used; if the usable block size is less than this value, an unblocked routine should be used.

= 3: the crossover point (in a block routine, for n less than this value, an unblocked routine should be used)

= 4: the number of shifts, used in the nonsymmetric eigenvalue routines (deprecated)

= 5: the minimum column dimension for blocking to be used; rectangular blocks must have dimension at least k-by-m, where k is given by ilaenv(2,...) and m by ilaenv(5,...)

= 6: the crossover point for the SVD (when reducing an m-by-n matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds this value, a QR factorization is used first to reduce the matrix to a triangular form.)

= 7: the number of processors

= 8: the crossover point for the multishift QR and QZ methods for nonsymmetric eigenvalue problems (deprecated).

= 9: maximum size of the subproblems at the bottom of the computation tree in the divide-and-conquer algorithm (used by ?gelsd and ?gesdd)

=10: ieee NaN arithmetic can be trusted not to trap

=11: infinity arithmetic can be trusted not to trap

12 ≤ ispec ≤ 16: ?hseqr or one of its subroutines, see iparmq for detailed explanation.

name

CHARACTER*(*). The name of the calling subroutine, in either upper case or lower case.

opts

CHARACTER*(*). The character options to the subroutine name, concatenated into a single character string. For example, uplo = 'U', trans = 'T', and diag = 'N' for a triangular routine would be specified as opts = 'UTN'.

n1, n2, n3, n4

INTEGER. Problem dimensions for the subroutine name; these may not all be required.

Output Parameters

value

INTEGER.

If value 0: the value of the parameter specified by ispec;

If value = -k < 0: the k-th argument had an illegal value.

Application Notes

The following conventions have been used when calling ilaenv from the LAPACK routines:


  1. opts is a concatenation of all of the character options to subroutine name, in the same order that they appear in the argument list for name, even if they are not used in determining the value of the parameter specified by ispec.

  2. The problem dimensions n1, n2, n3, n4 are specified in the order that they appear in the argument list for name. n1 is used first, n2 second, and so on, and unused problem dimensions are passed a value of -1.

  3. The parameter value returned by ilaenv is checked for validity in the calling subroutine. For example, ilaenv is used to retrieve the optimal blocksize for strtri as follows:

    nb = ilaenv( 1, 'strtri', uplo // diag, n, -1, -1, -1> )
    if( nb.le.1 ) nb = max( 1, n )

Below is an example of ilaenv usage in C language:

#include <stdio.h>
#include "mkl.h"
int main(void)
{
   int size = 1000;
   int ispec = 1;
   int dummy = -1;
   int blockSize1 = ilaenv(&ispec, "dsytrd", "U", &size, &dummy, &dummy, &dummy);
   int blockSize2 = ilaenv(&ispec, "dormtr", "LUN", &size, &size, &dummy, &dummy);
   printf("DSYTRD blocksize = %d\n", blockSize1);
   printf("DORMTR blocksize = %d\n", blockSize2);
   return 0;
}

See Also


Submit feedback on this help topic

Copyright © 1994 - 2011, Intel Corporation. All rights reserved.