SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ blacs_gridexit_()

F_VOID_FUNC blacs_gridexit_ ( Int ConTxt)

Definition at line 6 of file blacs_grid_.c.

8{
9 Int i;
10 BLACSCONTEXT *ctxt;
11 extern Int BI_MaxNCtxt;
13
14 if ( (Mpval(ConTxt) < 0) || (Mpval(ConTxt) >= BI_MaxNCtxt) )
15 BI_BlacsErr(Mpval(ConTxt), __LINE__, __FILE__,
16 "Trying to exit non-existent context");
17
18 if (BI_MyContxts[Mpval(ConTxt)] == NULL)
19 BI_BlacsErr(Mpval(ConTxt), __LINE__, __FILE__,
20 "Trying to exit an already freed context");
21
22 MGetConTxt(Mpval(ConTxt), ctxt);
23/*
24 * Destroy context
25 */
26 MPI_Comm_free(&ctxt->pscp.comm);
27 MPI_Comm_free(&ctxt->ascp.comm);
28 MPI_Comm_free(&ctxt->rscp.comm);
29 MPI_Comm_free(&ctxt->cscp.comm);
30 free(ctxt);
31 BI_MyContxts[Mpval(ConTxt)] = NULL;
32}
BLACSCONTEXT ** BI_MyContxts
Int BI_MaxNCtxt
#define Int
Definition Bconfig.h:22
void BI_BlacsErr(Int ConTxt, Int line, char *file, char *form,...)
Definition BI_BlacsErr.c:3
#define MGetConTxt(Context, ctxtptr)
Definition Bdef.h:200
#define Mpval(para)
Definition Bdef.h:261
BLACSSCOPE pscp
Definition Bdef.h:25
BLACSSCOPE ascp
Definition Bdef.h:25
BLACSSCOPE rscp
Definition Bdef.h:25
BLACSSCOPE cscp
Definition Bdef.h:25
MPI_Comm comm
Definition Bdef.h:15
Here is the call graph for this function: