ScaLAPACK 2.1
2.1
ScaLAPACK: Scalable Linear Algebra PACKage
pslabad.f
Go to the documentation of this file.
1
SUBROUTINE
pslabad
( ICTXT, SMALL, LARGE )
2
*
3
* -- ScaLAPACK auxiliary routine (version 1.7) --
4
* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
5
* and University of California, Berkeley.
6
* May 1, 1997
7
*
8
* .. Scalar Arguments ..
9
INTEGER
ICTXT
10
REAL
LARGE, SMALL
11
* ..
12
*
13
* Purpose
14
* =======
15
*
16
* PSLABAD takes as input the values computed by PSLAMCH for underflow
17
* and overflow, and returns the square root of each of these values if
18
* the log of LARGE is sufficiently large. This subroutine is intended
19
* to identify machines with a large exponent range, such as the Crays,
20
* and redefine the underflow and overflow limits to be the square roots
21
* of the values computed by PSLAMCH. This subroutine is needed because
22
* PSLAMCH does not compensate for poor arithmetic in the upper half of
23
* the exponent range, as is found on a Cray.
24
*
25
* In addition, this routine performs a global minimization and maximi-
26
* zation on these values, to support heterogeneous computing networks.
27
*
28
* Arguments
29
* =========
30
*
31
* ICTXT (global input) INTEGER
32
* The BLACS context handle in which the computation takes
33
* place.
34
*
35
* SMALL (local input/local output) REAL
36
* On entry, the underflow threshold as computed by PSLAMCH.
37
* On exit, if LOG10(LARGE) is sufficiently large, the square
38
* root of SMALL, otherwise unchanged.
39
*
40
* LARGE (local input/local output) REAL
41
* On entry, the overflow threshold as computed by PSLAMCH.
42
* On exit, if LOG10(LARGE) is sufficiently large, the square
43
* root of LARGE, otherwise unchanged.
44
*
45
* =====================================================================
46
*
47
* .. Local Scalars ..
48
INTEGER
IDUMM
49
* ..
50
* .. External Subroutines ..
51
EXTERNAL
sgamn2d, sgamx2d
52
* ..
53
* .. Intrinsic Functions ..
54
INTRINSIC
log10, sqrt
55
* ..
56
* .. Executable Statements ..
57
*
58
* If it looks like we're on a Cray, take the square root of
59
* SMALL and LARGE to avoid overflow and underflow problems.
60
*
61
IF
( log10( large ).GT.2000. )
THEN
62
small = sqrt( small )
63
large = sqrt( large )
64
END IF
65
idumm = 0
66
*
67
CALL
sgamx2d( ictxt,
'All'
,
' '
, 1, 1, small, 1, idumm,
68
$ idumm, -1, -1, idumm )
69
CALL
sgamn2d( ictxt,
'All'
,
' '
, 1, 1, large, 1, idumm,
70
$ idumm, -1, -1, idumm )
71
*
72
RETURN
73
*
74
* End of PSLABAD
75
*
76
END
pslabad
subroutine pslabad(ICTXT, SMALL, LARGE)
Definition:
pslabad.f:2
SRC
pslabad.f
Generated by
1.8.16