1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
INTEGER FUNCTION PILAENV( ICTXT, PREC )
*
* -- PBLAS auxiliary routine (version 2.0) --
* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
* and University of California, Berkeley.
* April 1, 1998
*
* .. Scalar Arguments ..
INTEGER ICTXT
CHARACTER*1 PREC
* ..
*
* Purpose
* =======
*
* PILAENV returns the positive integer value of the logical blocking
* size. This value is machine and precision specific. This version pro-
* vides a logical blocking size which should give good but not optimal
* performance on many of the currently available distributed-memory
* concurrent computers. Users are encouraged to modify this subroutine
* to set this tuning parameter for their particular machine.
*
* Arguments
* =========
*
* ICTXT (local input) INTEGER
* On entry, ICTXT specifies the BLACS context handle, indica-
* ting the global context of the operation. The context itself
* is global, but the value of ICTXT is local.
*
* PREC (global input) CHARACTER*1
* On input, PREC specifies the precision for which the logical
* block size should be returned as follows:
* PREC = 'S' or 's' single precision real,
* PREC = 'D' or 'd' double precision real,
* PREC = 'C' or 'c' single precision complex,
* PREC = 'Z' or 'z' double precision complex,
* PREC = 'I' or 'i' integer.
*
* Notes
* =====
*
* Before modifying this routine to tune the library performance on your
* system, be aware of the following:
*
* 1) The value this function returns must be STRICTLY LARGER THAN ZERO,
*
* 2) If you are planning to link your program with different instances
* of the library, (for example on a heterogeneous machine), you MUST
* compile each instance of the library with the EXACT SAME version of
* this routine for obvious inter-operability reasons.
*
* -- Written on April 1, 1998 by
* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
* ..
* .. Executable Statements ..
*
IF( LSAME( PREC, 'S' ) ) THEN
*
* Single precision real logical block size
*
PILAENV = 32
*
ELSE IF( LSAME( PREC, 'D' ) ) THEN
*
* Double precision real logical block size
*
PILAENV = 32
*
ELSE IF( LSAME( PREC, 'C' ) ) THEN
*
* Single precision complex logical block size
*
PILAENV = 32
*
ELSE IF( LSAME( PREC, 'Z' ) ) THEN
*
* Double precision complex logical block size
*
PILAENV = 32
*
ELSE IF( LSAME( PREC, 'I' ) ) THEN
*
* Integer logical block size
*
PILAENV = 32
*
ELSE
*
* Probably unused
*
PILAENV = 32
*
END IF
*
RETURN
*
* End of PILAENV
*
END
|