#include "Bdef.h"

#if (INTFACE == C_CALL)
void Cblacs_pinfo(mypnum, nprocs)
int  *mypnum;
int  *nprocs;
#else
void blacs_pinfo_(mypnum, nprocs)
int  *mypnum;
int  *nprocs;
#endif
{
   extern int Np00, Iam00, *pvmtids00;

   if (pvmtids00)
   {
      *nprocs = Np00;
      *mypnum = Iam00;
   }
   else
   {
      pvm_mytid();			/* enroll in virtual machine */
      if (pvm_parent() == PvmNoParent) *mypnum = 0;
      else *mypnum = -1;
      *nprocs = -1;
   }
}
