ScaLAPACK 2.1  2.1
ScaLAPACK: Scalable Linear Algebra PACKage
blacs_set_.c
Go to the documentation of this file.
1 #include "Bdef.h"
2 
3 #if (INTFACE == C_CALL)
4 void Cblacs_set(int ConTxt, int what, int *val)
5 #else
6 F_VOID_FUNC blacs_set_(int *ConTxt, int *what, int *val)
7 #endif
8 {
9  BLACSCONTEXT *ctxt;
10 
11  switch( Mpval(what) )
12  {
13  case SGET_SYSCONTXT:
14  BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
15  "Cannot set BLACS system context, can only BLACS_GET");
16  break;
17  case SGET_MSGIDS:
18  BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
19  "No need to set message ID range due to MPI communicator.");
20  break;
21  case SGET_DEBUGLVL:
22  BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
23  "Cannot set BLACS debug level; must recompile to change");
24  break;
25  case SGET_BLACSCONTXT:
26  BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
27  "Cannot set BLACS context, can only BLACS_GET");
28  break;
29  case SGET_NR_BS:
30  MGetConTxt(Mpval(ConTxt), ctxt);
31  if (*val) ctxt->Nr_bs = *val;
32  else BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
33  "BSBR nrings cannot be set to zero");
34  break;
35  case SGET_NB_BS:
36  MGetConTxt(Mpval(ConTxt), ctxt);
37  if (*val > 0) ctxt->Nb_bs = *val + 1;
38  else BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
39  "Illegal BSBR nbranches (%d); must be strictly positive",
40  *val);
41  break;
42  case SGET_NR_CO:
43  MGetConTxt(Mpval(ConTxt), ctxt);
44  if (*val) ctxt->Nr_co = *val;
45  else BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
46  "COMB nrings cannot be set to zero");
47  break;
48  case SGET_NB_CO:
49  MGetConTxt(Mpval(ConTxt), ctxt);
50  if (*val > 0) ctxt->Nb_co = *val + 1;
51  else BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
52  "Illegal COMB nbranches (%d); must be strictly positive",
53  *val);
54  break;
55  case SGET_TOPSREPEAT:
56  MGetConTxt(Mpval(ConTxt), ctxt);
57  ctxt->TopsRepeat = *val;
58  break;
59  case SGET_TOPSCOHRNT:
60  MGetConTxt(Mpval(ConTxt), ctxt);
61  ctxt->TopsCohrnt = *val;
62  break;
63  default:
64  BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__, "Unknown WHAT (%d)",
65  Mpval(what));
66  }
67 }
bLaCsCoNtExT::TopsRepeat
int TopsRepeat
Definition: Bdef.h:27
Cblacs_set
void Cblacs_set()
blacs_set_
F_VOID_FUNC blacs_set_(int *ConTxt, int *what, int *val)
Definition: blacs_set_.c:6
MGetConTxt
#define MGetConTxt(Context, ctxtptr)
Definition: Bdef.h:200
SGET_NR_BS
#define SGET_NR_BS
Definition: Bdef.h:118
SGET_SYSCONTXT
#define SGET_SYSCONTXT
Definition: Bdef.h:114
SGET_NB_CO
#define SGET_NB_CO
Definition: Bdef.h:121
bLaCsCoNtExT::TopsCohrnt
int TopsCohrnt
Definition: Bdef.h:28
bLaCsCoNtExT::Nb_co
int Nb_co
Definition: Bdef.h:30
bLaCsCoNtExT::Nb_bs
int Nb_bs
Definition: Bdef.h:29
Mpval
#define Mpval(para)
Definition: Bdef.h:261
bLaCsCoNtExT
Definition: Bdef.h:23
SGET_MSGIDS
#define SGET_MSGIDS
Definition: Bdef.h:115
bLaCsCoNtExT::Nr_bs
int Nr_bs
Definition: Bdef.h:29
F_VOID_FUNC
#define F_VOID_FUNC
Definition: Bdef.h:232
Bdef.h
SGET_NB_BS
#define SGET_NB_BS
Definition: Bdef.h:119
SGET_NR_CO
#define SGET_NR_CO
Definition: Bdef.h:120
SGET_TOPSCOHRNT
#define SGET_TOPSCOHRNT
Definition: Bdef.h:123
bLaCsCoNtExT::Nr_co
int Nr_co
Definition: Bdef.h:30
BI_BlacsWarn
void BI_BlacsWarn(int ConTxt, int line, char *file, char *form,...)
Definition: BI_BlacsWarn.c:3
SGET_BLACSCONTXT
#define SGET_BLACSCONTXT
Definition: Bdef.h:117
SGET_TOPSREPEAT
#define SGET_TOPSREPEAT
Definition: Bdef.h:122
SGET_DEBUGLVL
#define SGET_DEBUGLVL
Definition: Bdef.h:116