|
|
| |
| # lines: |
75 | | # code: |
75 | | # comment: | 0 | |
# blank: | 0 |
| # Variables: | 4 |
| # Callers: | 5 |
| # Callings: | 0 |
| # Words: | 27 |
| # Keywords: | 13 |
|
|
|
|
|
..
Purpose
=======
PDLABAD takes as input the values computed by PDLAMCH for underflow
and overflow, and returns the square root of each of these values if
the log of LARGE is sufficiently large. This subroutine is intended
to identify machines with a large exponent range, such as the Crays,
and redefine the underflow and overflow limits to be the square roots
of the values computed by PDLAMCH. This subroutine is needed because
PDLAMCH does not compensate for poor arithmetic in the upper half of
the exponent range, as is found on a Cray.
In addition, this routine performs a global minimization and maximi-
zation on these values, to support heterogeneous computing networks.
Arguments
=========
ICTXT (global input) INTEGER
The BLACS context handle in which the computation takes
place.
SMALL (local input/local output) DOUBLE PRECISION
On entry, the underflow threshold as computed by PDLAMCH.
On exit, if LOG10(LARGE) is sufficiently large, the square
root of SMALL, otherwise unchanged.
LARGE (local input/local output) DOUBLE PRECISION
On entry, the overflow threshold as computed by PDLAMCH.
On exit, if LOG10(LARGE) is sufficiently large, the square
root of LARGE, otherwise unchanged.
=====================================================================
.. Local Scalars ..
|
|
|
|
01 SUBROUTINE PDLABAD( ICTXT , SMALL , LARGE )
02
03 * -- ScaLAPACK auxiliary routine(version 1.7) --
04 * University of Tennessee , Knoxville , Oak Ridge National Laboratory ,
05 * and University of California , Berkeley.
06 * May 1 , 1997
07
08 * .. Scalar Arguments ..
09 INTEGER ICTXT
10 DOUBLE PRECISION LARGE , SMALL
11 INTEGER IDUMM
12 * ..
13 * .. External Subroutines ..
14 EXTERNAL DGAMN2D , DGAMX2D
15 * ..
16 * .. Intrinsic Functions ..
17 INTRINSIC LOG10 , SQRT
18 * ..
19 * .. Executable Statements ..
20
21 * If it looks like we're on a Cray , take the square root of
22 * SMALL and LARGE to avoid overflow and underflow problems.
23
24 IF( LOG10( LARGE ).GT.2000.D0 ) THEN
24
25 SMALL = SQRT( SMALL )
26 LARGE = SQRT( LARGE )
27 END IF
28
29 CALL DGAMX2D( ICTXT , 'All' , ' ' , 1 , 1 , SMALL , 1 , IDUMM ,
30 $IDUMM , - 1 , - 1 , IDUMM )
31 CALL DGAMN2D( ICTXT , 'All' , ' ' , 1 , 1 , LARGE , 1 , IDUMM ,
32 $IDUMM , - 1 , - 1 , IDUMM )
33
34 RETURN
35
36 * End of PDLABAD
37
38 END8
1
|
|
Variables in Routine PDLABAD()
| Summary Report |
| Data Type | Quantity | Size(byte) |
| DOUBLE PRECISION | 2 | 8 |
| INTEGER | 2 | 8 |
| TOTAL | 4 | 16 |
List of Variables
DOUBLE PRECISION
INTEGER
Variables Dependence Graph Put the mouse over a right hand side variable to display the corresponding line of the dependence | | - | | - | - | | LARGE | <--- | LARGELARGE = SQRT( LARGE ) |
| SMALL | <--- | SMALLSMALL = SQRT( SMALL ) |
|
|
| List of variables | ICTXT IDUMM LARGE SMALL | | close
| |
ICTXT
IDUMM
LARGE
SMALL
| |