#include "Bdef.h"

#if (INTFACE == C_CALL)
void Cblacs_abort(ConTxt, ErrNo)
int  ConTxt;
int  ErrNo;
#else
void blacs_abort_(ConTxt, ErrNo)
int  *ConTxt;
int  *ErrNo;
#endif
{
   void BlacsAbort00();
   int myrow, mycol;
   BLACSCONTEXT *ctxt;
   extern int Iam00;

   if (Mpval(ConTxt) > -1)
   {
      MGetConTxt(Mpval(ConTxt), ctxt);
      myrow = ctxt->myrow;
      mycol = ctxt->mycol;
   }
   else myrow = mycol = -1;

   fprintf(stderr,
"{%d,%d}, pnum=%d, Contxt=%d, killed other procs, exiting with error #%d.\n\n",
           myrow, mycol, Iam00, Mpval(ConTxt), Mpval(ErrNo));

   BlacsAbort00(Mpval(ErrNo));
}
