ScaLAPACK 2.1  2.1
ScaLAPACK: Scalable Linear Algebra PACKage
blacs2sys_.c
Go to the documentation of this file.
1 #include "Bdef.h"
2 #if (INTFACE == C_CALL)
3 MPI_Comm Cblacs2sys_handle(int BlacsCtxt)
4 #else
5 int blacs2sys_handle_(int *BlacsCtxt)
6 #endif
7 {
8 #if (INTFACE == C_CALL)
9  int i[2];
10  extern int BI_MaxNSysCtxt;
11  extern MPI_Comm *BI_SysContxts;
12 
13  if (BI_COMM_WORLD == NULL) Cblacs_pinfo(i, &i[1]);
14  if ( (BlacsCtxt >= BI_MaxNSysCtxt) || (BlacsCtxt < 0) )
15  {
16  BI_BlacsErr(-1, __LINE__, __FILE__,
17  "No system context corresponding to BLACS system context handle %d\n",
18  BlacsCtxt);
19  }
20  else if (BI_SysContxts[BlacsCtxt] == MPI_COMM_NULL)
21  {
22  BI_BlacsErr(-1, __LINE__, __FILE__,
23  "No system context corresponding to BLACS system context handle %d\n",
24  BlacsCtxt);
25  }
26  return(BI_SysContxts[BlacsCtxt]);
27 #else
28  return(*BlacsCtxt);
29 #endif
30 }
Cblacs_pinfo
void Cblacs_pinfo()
BI_SysContxts
MPI_Comm * BI_SysContxts
Definition: BI_GlobalVars.c:12
blacs2sys_handle_
int blacs2sys_handle_(int *BlacsCtxt)
Definition: blacs2sys_.c:5
Bdef.h
BI_BlacsErr
void BI_BlacsErr(int ConTxt, int line, char *file, char *form,...)
Definition: BI_BlacsErr.c:3
BI_MaxNSysCtxt
int BI_MaxNSysCtxt
Definition: BI_GlobalVars.c:6
BI_COMM_WORLD
int * BI_COMM_WORLD
Definition: BI_GlobalVars.c:13