trouble with descinit_(...)

trouble with descinit_(...)

I'm trying to use descinit function. (I use c compiler)
I think there is no error in syntax but it doesn't work.
The code is like this.

izero = 0;
Cblacs_get(0, 0, &ictxt);
Cblacs_gridinit(&ictxt, "R", nprow, npcol);
Cblacs_gridinfo(ictxt, &nprow, &npcol, &myrow, &mycol);

locr = numroc_(&np, &MB_, &myrow, &izero, &nprow);
locc = numroc_(&np, &NB_, &mycol, &izero, &npcol);

descinit_(desca, &np, &np, &MB_, &NB_, &izero, &izero,
&ictxt, &maxa, &info);

if (ProcID == 0) printf("%d %d %d %d %d %d %d\n",nprow,npcol,myrow,mycol,locr,locc,izero);

The error message is "{ 0, 0}: On entry to DESCINIT parameter number 6 had an illegal value".
Each processor shows the message above.

Could you give me some advice?
Thanks in advance.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

According to the examples, nprow (and other parameters) must be set to suitable values. descinit is documented as presenting the error message when "paramater 6" >= nprow.

Leave a Comment

Please sign in to add a comment. Not a member? Join today