SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
blacs2sys_.c
Go to the documentation of this file.
1#include "Bdef.h"
2#if (INTFACE == C_CALL)
3MPI_Comm Cblacs2sys_handle(Int BlacsCtxt)
4#else
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}
Int BI_MaxNSysCtxt
MPI_Comm * BI_SysContxts
#define Int
Definition Bconfig.h:22
void BI_BlacsErr(Int ConTxt, Int line, char *file, char *form,...)
Definition BI_BlacsErr.c:3
Int * BI_COMM_WORLD
void Cblacs_pinfo()
Int blacs2sys_handle_(Int *BlacsCtxt)
Definition blacs2sys_.c:5