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

◆ paramcheck() [2/2]

void paramcheck ( MDESC a,
Int  i,
Int  j,
Int  m,
Int  n,
Int  p,
Int  q,
Int  gcontext 
)

Definition at line 204 of file pgemraux.c.

205{
206 Int p2, q2, myprow, mypcol;
207#ifndef NDEBUG
208 checkequal(gcontext, p);
209 checkequal(gcontext, q);
210 checkequal(gcontext, a->sprow);
211 checkequal(gcontext, a->spcol);
212 checkequal(gcontext, a->m);
213 checkequal(gcontext, a->n);
214 checkequal(gcontext, i);
215 checkequal(gcontext, j);
216 checkequal(gcontext, a->nbrow);
217 checkequal(gcontext, a->nbcol);
218#endif
219 Cblacs_gridinfo(a->ctxt, &p2, &q2, &myprow, &mypcol);
220 /* compatibility T3D, must check myprow and mypcol are within bounds */
221 if (myprow >= p2 || mypcol >= q2)
222 myprow = mypcol = -1;
223 if ((myprow >= 0 || mypcol >= 0) && (p2 != p && q2 != q)) {
224 fprintf(stderr, "??MR2D:incoherent p,q parameters\n");
225 exit(1);
226 }
227 assert(myprow < p && mypcol < q);
228 if (a->sprow < 0 || a->sprow >= p || a->spcol < 0 || a->spcol >= q) {
229 fprintf(stderr, "??MR2D:Bad first processor coordinates\n");
230 exit(1);
231 }
232 if (i < 0 || j < 0 || i + m > a->m || j + n > a->n) {
233 fprintf(stderr, "??MR2D:Bad submatrix:i=%d,j=%d,\
234m=%d,n=%d,M=%d,N=%d\n",
235 i, j, m, n, a->m, a->n);
236 exit(1);
237 }
238 if ((myprow >= 0 || mypcol >= 0) &&
239 localsize(SHIFT(myprow, a->sprow, p), p, a->nbrow, a->m) > a->lda) {
240 fprintf(stderr, "??MR2D:bad lda arg:row=%d,m=%d,p=%d,\
241nbrow=%d,lda=%d,sprow=%d\n",
242 myprow, a->m, p, a->nbrow, a->lda, a->sprow);
243 exit(1);
244 }
245}
#define Int
Definition Bconfig.h:22
void checkequal(Int ctxt, Int a)
Definition pgemraux.c:186
#define SHIFT(row, sprow, nbrow)
Definition pgemraux.c:41
Int localsize()
void Cblacs_gridinfo()
Int m
Definition pcgemr.c:166
Int spcol
Definition pcgemr.c:171
Int nbcol
Definition pcgemr.c:169
Int sprow
Definition pcgemr.c:170
Int nbrow
Definition pcgemr.c:168
Int ctxt
Definition pcgemr.c:165
Int n
Definition pcgemr.c:167
Int lda
Definition pcgemr.c:172
Here is the call graph for this function: