SCALAPACK
2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
blacs_exit_.c
Go to the documentation of this file.
1
#include "
Bdef.h
"
2
3
#if (INTFACE == C_CALL)
4
void
Cblacs_exit
(
Int
NotDone)
5
#else
6
F_VOID_FUNC
blacs_exit_
(
Int
*NotDone)
7
#endif
8
{
9
void
Cblacs_gridexit
(
Int
);
10
void
BI_UpdateBuffs
(
BLACBUFF
*);
11
BLACBUFF
*
BI_GetBuff
(
Int
);
12
Int
BI_BuffIsFree
(
BLACBUFF
*,
Int
);
13
BLACBUFF
*bp;
14
extern
BLACBUFF
*
BI_ReadyB
, *
BI_ActiveQ
,
BI_AuxBuff
;
15
extern
MPI_Status *
BI_Stats
;
16
Int
i;
17
extern
Int
BI_MaxNCtxt
,
BI_Np
;
18
extern
BLACSCONTEXT
**
BI_MyContxts
;
19
/*
20
* Destroy all contexts
21
*/
22
for
(i=0; i <
BI_MaxNCtxt
; i++)
if
(
BI_MyContxts
[i])
Cblacs_gridexit
(i);
23
free(
BI_MyContxts
);
24
25
if
(
BI_ReadyB
) free(
BI_ReadyB
);
26
while
(
BI_ActiveQ
!= NULL)
27
{
28
bp =
BI_ActiveQ
;
29
BI_BuffIsFree
(bp, 1);
/* wait for async sends to complete */
30
BI_ActiveQ
= bp->
next
;
31
free(bp);
32
}
33
free (
BI_AuxBuff
.
Aops
);
34
free (
BI_Stats
);
35
36
/*
37
* Reset parameters to initial values
38
*/
39
BI_MaxNCtxt
= 0;
40
BI_MyContxts
= NULL;
41
BI_Np
= -1;
42
if
(!
Mpval
(NotDone))
43
{
44
free(
BI_COMM_WORLD
);
45
BI_COMM_WORLD
= NULL;
46
MPI_Finalize();
47
}
48
BI_ReadyB
= NULL;
49
BI_ActiveQ
= NULL;
50
BI_AuxBuff
.
Aops
= NULL;
51
BI_Stats
= NULL;
52
}
BI_BuffIsFree
Int BI_BuffIsFree(BLACBUFF *bp, Int Wait)
Definition
BI_BuffIsFree.c:3
BI_GetBuff
BLACBUFF * BI_GetBuff(Int length)
Definition
BI_GetBuff.c:37
BI_Stats
MPI_Status * BI_Stats
Definition
BI_GlobalVars.c:14
BI_ReadyB
BLACBUFF * BI_ReadyB
Definition
BI_GlobalVars.c:8
BI_Np
Int BI_Np
Definition
BI_GlobalVars.c:7
BI_MyContxts
BLACSCONTEXT ** BI_MyContxts
Definition
BI_GlobalVars.c:11
BI_ActiveQ
BLACBUFF * BI_ActiveQ
Definition
BI_GlobalVars.c:9
BI_MaxNCtxt
Int BI_MaxNCtxt
Definition
BI_GlobalVars.c:5
BI_AuxBuff
BLACBUFF BI_AuxBuff
Definition
BI_GlobalVars.c:10
BI_UpdateBuffs
void BI_UpdateBuffs(BLACBUFF *Newbp)
Definition
BI_UpdateBuffs.c:3
Int
#define Int
Definition
Bconfig.h:22
BI_COMM_WORLD
Int * BI_COMM_WORLD
Definition
BI_GlobalVars.c:13
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()
Cblacs_exit
void Cblacs_exit()
blacs_exit_
F_VOID_FUNC blacs_exit_(Int *NotDone)
Definition
blacs_exit_.c:6
bLaCbUfF::Aops
MPI_Request * Aops
Definition
Bdef.h:59
bLaCbUfF::next
BLACBUFF * next
Definition
Bdef.h:62
bLaCbUfF
Definition
Bdef.h:55
bLaCsCoNtExT
Definition
Bdef.h:24
BLACS
SRC
blacs_exit_.c
Generated on Sun Jan 12 2025 15:58:37 for SCALAPACK by
1.9.8