SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ PB_Cabort()

void PB_Cabort ( Int  ICTXT,
char *  ROUT,
Int  INFO 
)

Definition at line 63 of file PB_Cabort.c.

73{
74/*
75* Purpose
76* =======
77*
78* PB_Cabort is an error handler for the PBLAS routines. This routine
79* displays an error message on stderr by calling PB_Cwarn, and halts
80* execution by calling Cblacs_abort().
81*
82* Arguments
83* =========
84*
85* ICTXT (local input) INTEGER
86* On entry, ICTXT specifies the BLACS context handle, indica-
87* ting the global context of the operation. The context itself
88* is global, but the value of ICTXT is local.
89*
90* ROUT (global input) pointer to CHAR
91* On entry, ROUT specifies the name of the routine calling this
92* error handler.
93*
94* INFO (local input) INTEGER
95* The error code computed by the calling PBLAS routine.
96* = 0: no error found
97* < 0: If the i-th argument is an array and the j-entry had
98* an illegal value, then INFO = -(i*100+j), if the i-th
99* argument is a scalar and had an illegal value, then
100* INFO = -i.
101*
102* -- Written on April 1, 1998 by
103* R. Clint Whaley, University of Tennessee, Knoxville 37996, USA.
104*
105* ---------------------------------------------------------------------
106*/
107/*
108* .. Local Scalars ..
109*/
110 Int mycol, myrow, npcol, nprow;
111/* ..
112* .. External Functions ..
113*/
114#ifdef TestingPblas
115#ifdef __STDC__
116 Int PB_NoAbort( Int * );
117#else
118 Int PB_NoAbort();
119#endif
120#endif
121/* ..
122* .. Executable Statements ..
123*
124*/
125 Cblacs_gridinfo( ICTXT, &nprow, &npcol, &myrow, &mycol );
126#ifdef TestingPblas
127/*
128* For testing purpose only, the error is reported, but the program execution
129* is not terminated
130*/
131 if( PB_NoAbort( &INFO ) ) return;
132#endif
133 if( INFO < 0 )
134 {
135/*
136* Display an error message
137*/
138 if( INFO < DESCMULT )
139 PB_Cwarn( ICTXT, -1, ROUT,
140 "Parameter number %d had an illegal value", -INFO );
141 else
142 PB_Cwarn( ICTXT, -1, ROUT,
143 "Parameter number %d, entry number %d had an illegal value",
144 (-INFO) / DESCMULT, (-INFO) % DESCMULT );
145 }
146 else
147 {
148/*
149* Error code is incorrect, it should be negative
150*/
151 PB_Cwarn( ICTXT, -1, ROUT,
152 "Positive error code %d returned by %s!!!", INFO );
153 }
154 Cblacs_abort( ICTXT, INFO );
155/*
156* End of PB_Cabort
157*/
158}
#define Int
Definition Bconfig.h:22
#define PB_NoAbort
Definition PB_Cabort.c:48
void Cblacs_abort()
void Cblacs_gridinfo()
void PB_Cwarn()
#define DESCMULT
Definition PBtools.h:68
Here is the call graph for this function: