SCALAPACK
2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
blacs_grid_.c
Go to the documentation of this file.
1
#include "
Bdef.h
"
2
3
#if (INTFACE == C_CALL)
4
void
Cblacs_gridexit
(
Int
ConTxt)
5
#else
6
F_VOID_FUNC
blacs_gridexit_
(
Int
*ConTxt)
7
#endif
8
{
9
Int
i;
10
BLACSCONTEXT
*ctxt;
11
extern
Int
BI_MaxNCtxt
;
12
extern
BLACSCONTEXT
**
BI_MyContxts
;
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
}
BI_MyContxts
BLACSCONTEXT ** BI_MyContxts
Definition
BI_GlobalVars.c:11
BI_MaxNCtxt
Int BI_MaxNCtxt
Definition
BI_GlobalVars.c:5
Int
#define Int
Definition
Bconfig.h:22
BI_BlacsErr
void BI_BlacsErr(Int ConTxt, Int line, char *file, char *form,...)
Definition
BI_BlacsErr.c:3
MGetConTxt
#define MGetConTxt(Context, ctxtptr)
Definition
Bdef.h:200
F_VOID_FUNC
#define F_VOID_FUNC
Definition
Bdef.h:232
Mpval
#define Mpval(para)
Definition
Bdef.h:261
Bdef.h
Cblacs_gridexit
void Cblacs_gridexit()
blacs_gridexit_
F_VOID_FUNC blacs_gridexit_(Int *ConTxt)
Definition
blacs_grid_.c:6
bLaCsCoNtExT::pscp
BLACSSCOPE pscp
Definition
Bdef.h:25
bLaCsCoNtExT::ascp
BLACSSCOPE ascp
Definition
Bdef.h:25
bLaCsCoNtExT::rscp
BLACSSCOPE rscp
Definition
Bdef.h:25
bLaCsCoNtExT::cscp
BLACSSCOPE cscp
Definition
Bdef.h:25
bLaCsCoNtExT
Definition
Bdef.h:24
bLaCsScOpE::comm
MPI_Comm comm
Definition
Bdef.h:15
BLACS
SRC
blacs_grid_.c
Generated on Sun Jan 12 2025 15:58:37 for SCALAPACK by
1.9.8