ScaLAPACK  2.0.2
ScaLAPACK: Scalable Linear Algebra PACKage
PB_Cabort.c File Reference
#include "../pblas.h"
#include "../PBpblas.h"
#include "../PBtools.h"
#include "../PBblacs.h"
#include "../PBblas.h"
Include dependency graph for PB_Cabort.c:

Go to the source code of this file.

Defines

#define PB_NoAbort   pb_noabort_
#define PB_NoAbort   PB_NOABORT
#define PB_NoAbort   pb_noabort
#define PB_NoAbort   pb_noabort__

Functions/Subroutines

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

Define Documentation

#define PB_NoAbort   pb_noabort_

Definition at line 57 of file PB_Cabort.c.

#define PB_NoAbort   PB_NOABORT

Definition at line 57 of file PB_Cabort.c.

#define PB_NoAbort   pb_noabort

Definition at line 57 of file PB_Cabort.c.

#define PB_NoAbort   pb_noabort__

Definition at line 57 of file PB_Cabort.c.


Function/Subroutine Documentation

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

Definition at line 63 of file PB_Cabort.c.

{
/*
*  Purpose
*  =======
*
*  PB_Cabort is an error handler for the PBLAS  routines.  This  routine
*  displays an error message on  stderr  by calling  PB_Cwarn, and halts
*  execution by calling Cblacs_abort().
*
*  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.
*
*  ROUT    (global input) pointer to CHAR
*          On entry, ROUT specifies the name of the routine calling this
*          error handler.
*
*  INFO    (local input) INTEGER
*          The error code computed by the calling PBLAS routine.
*          = 0:  no error found
*          < 0:  If the  i-th  argument is an array and the j-entry  had
*                an illegal value, then  INFO = -(i*100+j),  if the i-th
*                argument  is  a  scalar  and had an illegal value, then
*                INFO = -i.
*
*  -- Written on April 1, 1998 by
*     R. Clint Whaley, University of Tennessee, Knoxville 37996, USA.
*
*  ---------------------------------------------------------------------
*/
/*
*  .. Local Scalars ..
*/
   int            mycol, myrow, npcol, nprow;
/* ..
*  .. External Functions ..
*/
#ifdef TestingPblas
#ifdef __STDC__
   int            PB_NoAbort( int * );
#else
   int            PB_NoAbort();
#endif
#endif
/* ..
*  .. Executable Statements ..
*
*/
   Cblacs_gridinfo( ICTXT, &nprow, &npcol, &myrow, &mycol );
#ifdef TestingPblas
/*
*  For testing purpose only, the error is reported, but the program execution
*  is not terminated
*/
   if( PB_NoAbort( &INFO ) ) return;
#endif
   if( INFO < 0 )
   {
/*
*  Display an error message
*/
      if( INFO < DESCMULT )
         PB_Cwarn( ICTXT, -1, ROUT,
                   "Parameter number %d had an illegal value", -INFO );
      else
         PB_Cwarn( ICTXT, -1, ROUT,
                   "Parameter number %d, entry number %d had an illegal value",
                   (-INFO) / DESCMULT, (-INFO) % DESCMULT );
   }
   else
   {
/*
*  Error code is incorrect, it should be negative
*/
      PB_Cwarn( ICTXT, -1, ROUT,
                "Positive error code %d returned by %s!!!", INFO );
   }
   Cblacs_abort( ICTXT, INFO );
/*
*  End of PB_Cabort
*/
}

Here is the call graph for this function: