SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
pdgemr.c
Go to the documentation of this file.
1#include "redist.h"
143#define static2 static
144#if defined(Add_) || defined(f77IsF2C)
145#define fortran_mr2d pdgemr2do_
146#define fortran_mr2dnew pdgemr2d_
147#elif defined(UpCase)
148#define fortran_mr2dnew PDGEMR2D
149#define fortran_mr2d PDGEMR2DO
150#define dcopy_ DCOPY
151#define dlacpy_ DLACPY
152#else
153#define fortran_mr2d pdgemr2do
154#define fortran_mr2dnew pdgemr2d
155#define dcopy_ dcopy
156#define dlacpy_ dlacpy
157#endif
158#define Clacpy Cdgelacpy
159void Clacpy();
160typedef struct {
161 Int desctype;
162 Int ctxt;
163 Int m;
164 Int n;
165 Int nbrow;
166 Int nbcol;
167 Int sprow;
168 Int spcol;
169 Int lda;
170} MDESC;
171#define BLOCK_CYCLIC_2D 1
172typedef struct {
173 Int lstart;
174 Int len;
175} IDESC;
176#define SHIFT(row,sprow,nbrow) ((row)-(sprow)+ ((row) >= (sprow) ? 0 : (nbrow)))
177#define max(A,B) ((A)>(B)?(A):(B))
178#define min(A,B) ((A)>(B)?(B):(A))
179#define DIVUP(a,b) ( ((a)-1) /(b)+1)
180#define ROUNDUP(a,b) (DIVUP(a,b)*(b))
181#ifdef MALLOCDEBUG
182#define malloc mymalloc
183#define free myfree
184#define realloc myrealloc
185#endif
186/* Cblacs */
187extern void Cblacs_pcoord();
189extern void Csetpvmtids();
190extern void Cblacs_get();
191extern void Cblacs_pinfo();
192extern void Cblacs_gridinfo();
193extern void Cblacs_gridinit();
194extern void Cblacs_exit();
195extern void Cblacs_gridexit();
196extern void Cblacs_setup();
197extern void Cigebs2d();
198extern void Cigebr2d();
199extern void Cigesd2d();
200extern void Cigerv2d();
201extern void Cigsum2d();
202extern void Cigamn2d();
203extern void Cigamx2d();
204extern void Cdgesd2d();
205extern void Cdgerv2d();
206/* lapack */
207void dlacpy_();
208/* aux fonctions */
210extern void *mr2d_malloc();
211extern Int ppcm();
212extern Int localsize();
215extern void paramcheck();
216/* tools and others function */
217#define scanD0 dgescanD0
218#define dispmat dgedispmat
219#define setmemory dgesetmemory
220#define freememory dgefreememory
221#define scan_intervals dgescan_intervals
222extern void scanD0();
223extern void dispmat();
224extern void setmemory();
225extern void freememory();
226extern Int scan_intervals();
227extern void Cpdgemr2do();
228extern void Cpdgemr2d();
229/* some defines for Cpdgemr2do */
230#define SENDBUFF 0
231#define RECVBUFF 1
232#define SIZEBUFF 2
233#if 0
234#define DEBUG
235#endif
236#ifndef DEBUG
237#define NDEBUG
238#endif
239#include <stdio.h>
240#include <stdlib.h>
241#include <assert.h>
242#define DESCLEN 9
243void
244fortran_mr2d(Int *m, Int *n, double *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
245 double *B, Int *ib, Int *jb, Int desc_B[DESCLEN])
246{
247 Cpdgemr2do(*m, *n, A, *ia, *ja, (MDESC *) desc_A,
248 B, *ib, *jb, (MDESC *) desc_B);
249 return;
250}
251void
252fortran_mr2dnew(Int *m, Int *n, double *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
253 double *B, Int *ib, Int *jb, Int desc_B[DESCLEN], Int *gcontext)
254{
255 Cpdgemr2d(*m, *n, A, *ia, *ja, (MDESC *) desc_A,
256 B, *ib, *jb, (MDESC *) desc_B, *gcontext);
257 return;
258}
264void
266 ptrmyblock, ia, ja, ma,
267 ptrmynewblock, ib, jb, mb)
268 double *ptrmyblock, *ptrmynewblock;
269/* pointers to the memory location of the matrix and the redistributed matrix */
270 MDESC *ma;
271 MDESC *mb;
272 Int ia, ja, ib, jb, m, n;
273{
274 Int dummy, nprocs;
275 Int gcontext;
276 /* first we initialize a global grid which serve as a reference to
277 * communicate from grid a to grid b */
278 Cblacs_pinfo(&dummy, &nprocs);
279 Cblacs_get((Int)0, (Int)0, &gcontext);
280 Cblacs_gridinit(&gcontext, "R", (Int)1, nprocs);
281 Cpdgemr2d(m, n, ptrmyblock, ia, ja, ma,
282 ptrmynewblock, ib, jb, mb, gcontext);
283 Cblacs_gridexit(gcontext);
284}
285#define NBPARAM 20 /* p0,q0,p1,q1, puis ma,na,mba,nba,rowa,cola puis
286 * idem B puis ia,ja puis ib,jb */
287#define MAGIC_MAX 100000000
288void
289Cpdgemr2d(m, n,
290 ptrmyblock, ia, ja, ma,
291 ptrmynewblock, ib, jb, mb, globcontext)
292 double *ptrmyblock, *ptrmynewblock;
293/* pointers to the memory location of the matrix and the redistributed matrix */
294 MDESC *ma;
295 MDESC *mb;
296 Int ia, ja, ib, jb, m, n, globcontext;
297{
298 double *ptrsendbuff, *ptrrecvbuff, *ptrNULL = 0;
299 double *recvptr;
300 MDESC newa, newb;
301 Int *proc0, *proc1, *param;
302 Int mypnum, myprow0, mypcol0, myprow1, mypcol1, nprocs;
303 Int i, j;
304 Int nprow, npcol, gcontext;
305 Int recvsize, sendsize;
306 IDESC *h_inter; /* to store the horizontal intersections */
307 IDESC *v_inter; /* to store the vertical intersections */
308 Int hinter_nb, vinter_nb; /* number of intrsections in both directions */
309 Int dummy;
310 Int p0, q0, p1, q1;
311 Int *ra, *ca;
312 /* end of variables */
313 /* To simplify further calcul we change the matrix indexation from
314 * 1..m,1..n (fortran) to 0..m-1,0..n-1 */
315 if (m == 0 || n == 0)
316 return;
317 ia -= 1;
318 ja -= 1;
319 ib -= 1;
320 jb -= 1;
321 Cblacs_gridinfo(globcontext, &nprow, &npcol, &dummy, &mypnum);
322 gcontext = globcontext;
323 nprocs = nprow * npcol;
324 /* if the global context that is given to us has not the shape of a line
325 * (nprow != 1), create a new context. TODO: to be optimal, we should
326 * avoid this because it is an uncessary synchronisation */
327 if (nprow != 1) {
328 gridreshape(&gcontext);
329 Cblacs_gridinfo(gcontext, &dummy, &dummy, &dummy, &mypnum);
330 }
331 Cblacs_gridinfo(ma->ctxt, &p0, &q0, &myprow0, &mypcol0);
332 /* compatibility T3D, must check myprow and mypcol are within bounds */
333 if (myprow0 >= p0 || mypcol0 >= q0)
334 myprow0 = mypcol0 = -1;
335 assert((myprow0 < p0 && mypcol0 < q0) || (myprow0 == -1 && mypcol0 == -1));
336 Cblacs_gridinfo(mb->ctxt, &p1, &q1, &myprow1, &mypcol1);
337 if (myprow1 >= p1 || mypcol1 >= q1)
338 myprow1 = mypcol1 = -1;
339 assert((myprow1 < p1 && mypcol1 < q1) || (myprow1 == -1 && mypcol1 == -1));
340 /* exchange the missing parameters among the processors: shape of grids and
341 * location of the processors */
342 param = (Int *) mr2d_malloc(3 * (nprocs * 2 + NBPARAM) * sizeof(Int));
343 ra = param + nprocs * 2 + NBPARAM;
344 ca = param + (nprocs * 2 + NBPARAM) * 2;
345 for (i = 0; i < nprocs * 2 + NBPARAM; i++)
346 param[i] = MAGIC_MAX;
347 proc0 = param + NBPARAM;
348 proc1 = param + NBPARAM + nprocs;
349 /* we calulate proc0 and proc1 that will give the number of a proc in
350 * respectively a or b in the global context */
351 if (myprow0 >= 0) {
352 proc0[myprow0 * q0 + mypcol0] = mypnum;
353 param[0] = p0;
354 param[1] = q0;
355 param[4] = ma->m;
356 param[5] = ma->n;
357 param[6] = ma->nbrow;
358 param[7] = ma->nbcol;
359 param[8] = ma->sprow;
360 param[9] = ma->spcol;
361 param[10] = ia;
362 param[11] = ja;
363 }
364 if (myprow1 >= 0) {
365 proc1[myprow1 * q1 + mypcol1] = mypnum;
366 param[2] = p1;
367 param[3] = q1;
368 param[12] = mb->m;
369 param[13] = mb->n;
370 param[14] = mb->nbrow;
371 param[15] = mb->nbcol;
372 param[16] = mb->sprow;
373 param[17] = mb->spcol;
374 param[18] = ib;
375 param[19] = jb;
376 }
377 Cigamn2d(gcontext, "All", "H", 2 * nprocs + NBPARAM, (Int)1, param, 2 * nprocs + NBPARAM,
378 ra, ca, 2 * nprocs + NBPARAM, (Int)-1, (Int)-1);
379 newa = *ma;
380 newb = *mb;
381 ma = &newa;
382 mb = &newb;
383 if (myprow0 == -1) {
384 p0 = param[0];
385 q0 = param[1];
386 ma->m = param[4];
387 ma->n = param[5];
388 ma->nbrow = param[6];
389 ma->nbcol = param[7];
390 ma->sprow = param[8];
391 ma->spcol = param[9];
392 ia = param[10];
393 ja = param[11];
394 }
395 if (myprow1 == -1) {
396 p1 = param[2];
397 q1 = param[3];
398 mb->m = param[12];
399 mb->n = param[13];
400 mb->nbrow = param[14];
401 mb->nbcol = param[15];
402 mb->sprow = param[16];
403 mb->spcol = param[17];
404 ib = param[18];
405 jb = param[19];
406 }
407 for (i = 0; i < NBPARAM; i++) {
408 if (param[i] == MAGIC_MAX) {
409 fprintf(stderr, "xxGEMR2D:something wrong in the parameters\n");
410 exit(1);
411 }
412 }
413#ifndef NDEBUG
414 for (i = 0; i < p0 * q0; i++)
415 assert(proc0[i] >= 0 && proc0[i] < nprocs);
416 for (i = 0; i < p1 * q1; i++)
417 assert(proc1[i] >= 0 && proc1[i] < nprocs);
418#endif
419 /* check the validity of the parameters */
420 paramcheck(ma, ia, ja, m, n, p0, q0, gcontext);
421 paramcheck(mb, ib, jb, m, n, p1, q1, gcontext);
422 /* we change the problem so that ia < a->nbrow ... andia + m = a->m ... */
423 {
424 Int decal;
425 ia = changeorigin(myprow0, ma->sprow, p0,
426 ma->nbrow, ia, &decal, &ma->sprow);
427 ptrmyblock += decal;
428 ja = changeorigin(mypcol0, ma->spcol, q0,
429 ma->nbcol, ja, &decal, &ma->spcol);
430 ptrmyblock += decal * ma->lda;
431 ma->m = ia + m;
432 ma->n = ja + n;
433 ib = changeorigin(myprow1, mb->sprow, p1,
434 mb->nbrow, ib, &decal, &mb->sprow);
435 ptrmynewblock += decal;
436 jb = changeorigin(mypcol1, mb->spcol, q1,
437 mb->nbcol, jb, &decal, &mb->spcol);
438 ptrmynewblock += decal * mb->lda;
439 mb->m = ib + m;
440 mb->n = jb + n;
441 if (p0 == 1)
442 ma->nbrow = ma->m;
443 if (q0 == 1)
444 ma->nbcol = ma->n;
445 if (p1 == 1)
446 mb->nbrow = mb->m;
447 if (q1 == 1)
448 mb->nbcol = mb->n;
449#ifndef NDEBUG
450 paramcheck(ma, ia, ja, m, n, p0, q0, gcontext);
451 paramcheck(mb, ib, jb, m, n, p1, q1, gcontext);
452#endif
453 }
454 /* We compute the size of the memory buffer ( we choose the worst case,
455 * when the buffer sizes == the memory block sizes). */
456 if (myprow0 >= 0 && mypcol0 >= 0) {
457 /* Initialize pointer variables */
458 setmemory(&ptrsendbuff, memoryblocksize(ma));
459 }; /* if (mypnum < p0 * q0) */
460 if (myprow1 >= 0 && mypcol1 >= 0) {
461 /* Initialize pointer variables */
462 setmemory(&ptrrecvbuff, memoryblocksize(mb));
463 }; /* if (mypnum < p1 * q1) */
464 /* allocing room for the tabs, alloc for the worst case,local_n or local_m
465 * intervals, in fact the worst case should be less, perhaps half that,I
466 * should think of that one day. */
467 h_inter = (IDESC *) mr2d_malloc(DIVUP(ma->n, q0 * ma->nbcol) *
468 ma->nbcol * sizeof(IDESC));
469 v_inter = (IDESC *) mr2d_malloc(DIVUP(ma->m, p0 * ma->nbrow)
470 * ma->nbrow * sizeof(IDESC));
471 /* We go for the scanning of indices. For each processor including mypnum,
472 * we fill the sendbuff buffer (scanD0(SENDBUFF)) and when it is done send
473 * it. Then for each processor, we compute the size of message to be
474 * receive scanD0(SIZEBUFF)), post a receive and then allocate the elements
475 * of recvbuff the right place (scanD)(RECVBUFF)) */
476 recvptr = ptrrecvbuff;
477 {
478 Int tot, myrang, step, sens;
479 Int *sender, *recver;
480 Int mesending, merecving;
481 tot = max(p0 * q0, p1 * q1);
482 init_chenille(mypnum, nprocs, p0 * q0, proc0, p1 * q1, proc1,
483 &sender, &recver, &myrang);
484 if (myrang == -1)
485 goto after_comm;
486 mesending = myprow0 >= 0;
487 assert(sender[myrang] >= 0 || !mesending);
488 assert(!mesending || proc0[sender[myrang]] == mypnum);
489 merecving = myprow1 >= 0;
490 assert(recver[myrang] >= 0 || !merecving);
491 assert(!merecving || proc1[recver[myrang]] == mypnum);
492 step = tot - 1 - myrang;
493 do {
494 for (sens = 0; sens < 2; sens++) {
495 /* be careful here, when we communicating with ourselves, we must
496 * send first (myrang > step == 0) */
497 if (mesending && recver[step] >= 0 &&
498 (sens == 0)) {
499 i = recver[step] / q1;
500 j = recver[step] % q1;
501 vinter_nb = scan_intervals('r', ia, ib, m, ma, mb, p0, p1, myprow0, i,
502 v_inter);
503 hinter_nb = scan_intervals('c', ja, jb, n, ma, mb, q0, q1, mypcol0, j,
504 h_inter);
505 sendsize = block2buff(v_inter, vinter_nb, h_inter, hinter_nb,
506 ptrmyblock, ma, ptrsendbuff);
507 } /* if (mesending...) { */
508 if (mesending && recver[step] >= 0 &&
509 (sens == myrang > step)) {
510 i = recver[step] / q1;
511 j = recver[step] % q1;
512 if (sendsize > 0
513 && (step != myrang || !merecving)
514 ) {
515 Cdgesd2d(gcontext, sendsize, (Int)1, ptrsendbuff, sendsize,
516 (Int)0, proc1[i * q1 + j]);
517 } /* sendsize > 0 */
518 } /* if (mesending ... */
519 if (merecving && sender[step] >= 0 &&
520 (sens == myrang <= step)) {
521 i = sender[step] / q0;
522 j = sender[step] % q0;
523 vinter_nb = scan_intervals('r', ib, ia, m, mb, ma, p1, p0, myprow1, i,
524 v_inter);
525 hinter_nb = scan_intervals('c', jb, ja, n, mb, ma, q1, q0, mypcol1, j,
526 h_inter);
527 recvsize = inter_len(hinter_nb, h_inter, vinter_nb, v_inter);
528 if (recvsize > 0) {
529 if (step == myrang && mesending) {
530 Clacpy(recvsize, 1,
531 ptrsendbuff, recvsize,
532 ptrrecvbuff, recvsize);
533 } else {
534 Cdgerv2d(gcontext, recvsize, (Int)1, ptrrecvbuff, recvsize,
535 (Int)0, proc0[i * q0 + j]);
536 }
537 } /* recvsize > 0 */
538 } /* if (merecving ...) */
539 if (merecving && sender[step] >= 0 && sens == 1) {
540 buff2block(v_inter, vinter_nb, h_inter, hinter_nb,
541 recvptr, ptrmynewblock, mb);
542 } /* if (merecving...) */
543 } /* for (sens = 0) */
544 step -= 1;
545 if (step < 0)
546 step = tot - 1;
547 } while (step != tot - 1 - myrang);
548after_comm:
549 free(sender);
550 } /* { int tot,nr,ns ...} */
551 /* don't forget to clean up things! */
552 if (myprow1 >= 0 && mypcol1 >= 0) {
553 freememory((char *) ptrrecvbuff);
554 };
555 if (myprow0 >= 0 && mypcol0 >= 0) {
556 freememory((char *) ptrsendbuff);
557 };
558 if (nprow != 1)
559 Cblacs_gridexit(gcontext);
560 free(v_inter);
561 free(h_inter);
562 free(param);
563}/* distrib */
565init_chenille(mypnum, nprocs, n0, proc0, n1, proc1, psend, precv, myrang)
566 Int nprocs, mypnum, n0, n1;
567 Int *proc0, *proc1, **psend, **precv, *myrang;
568{
569 Int ns, nr, i, tot;
570 Int *sender, *recver, *g0, *g1;
571 tot = max(n0, n1);
572 sender = (Int *) mr2d_malloc((nprocs + tot) * sizeof(Int) * 2);
573 recver = sender + tot;
574 *psend = sender;
575 *precv = recver;
576 g0 = recver + tot;
577 g1 = g0 + nprocs;
578 for (i = 0; i < nprocs; i++) {
579 g0[i] = -1;
580 g1[i] = -1;
581 }
582 for (i = 0; i < tot; i++) {
583 sender[i] = -1;
584 recver[i] = -1;
585 }
586 for (i = 0; i < n0; i++)
587 g0[proc0[i]] = i;
588 for (i = 0; i < n1; i++)
589 g1[proc1[i]] = i;
590 ns = 0;
591 nr = 0;
592 *myrang = -1;
593 for (i = 0; i < nprocs; i++)
594 if (g0[i] >= 0 && g1[i] >= 0) {
595 if (i == mypnum)
596 *myrang = nr;
597 sender[ns] = g0[i];
598 ns += 1;
599 recver[nr] = g1[i];
600 nr += 1;
601 assert(ns <= n0 && nr <= n1 && nr == ns);
602 }
603 for (i = 0; i < nprocs; i++)
604 if (g0[i] >= 0 && g1[i] < 0) {
605 if (i == mypnum)
606 *myrang = ns;
607 sender[ns] = g0[i];
608 ns += 1;
609 assert(ns <= n0);
610 }
611 for (i = 0; i < nprocs; i++)
612 if (g1[i] >= 0 && g0[i] < 0) {
613 if (i == mypnum)
614 *myrang = nr;
615 recver[nr] = g1[i];
616 nr += 1;
617 assert(nr <= n1);
618 }
620#define Mlacpy(mo,no,ao,ldao,bo,ldbo) \
621{ \
622double *_a,*_b; \
623Int _m,_n,_lda,_ldb; \
624 Int _i,_j; \
625 _m = (mo);_n = (no); \
626 _a = (ao);_b = (bo); \
627 _lda = (ldao) - _m; \
628 _ldb = (ldbo) - _m; \
629 assert(_lda >= 0 && _ldb >= 0); \
630 for (_j=0;_j<_n;_j++) { \
631 for (_i=0;_i<_m;_i++) \
632 *_b++ = *_a++; \
633 _b += _ldb; \
634 _a += _lda; \
635 } \
636}
638block2buff(vi, vinb, hi, hinb, ptra, ma, buff)
639 Int hinb, vinb;
640 IDESC *hi, *vi;
641 MDESC *ma;
642 double *buff, *ptra;
643{
644 Int h, v, sizebuff;
645 double *ptr2;
646 sizebuff = 0;
647 for (h = 0; h < hinb; h++) {
648 ptr2 = ptra + hi[h].lstart * ma->lda;
649 for (v = 0; v < vinb; v++) {
650 Mlacpy(vi[v].len, hi[h].len,
651 ptr2 + vi[v].lstart,
652 ma->lda,
653 buff + sizebuff, vi[v].len);
654 sizebuff += hi[h].len * vi[v].len;
655 }
656 }
657 return sizebuff;
658}
660buff2block(vi, vinb, hi, hinb, buff, ptrb, mb)
661 Int hinb, vinb;
662 IDESC *hi, *vi;
663 MDESC *mb;
664 double *buff, *ptrb;
665{
666 Int h, v, sizebuff;
667 double *ptr2;
668 sizebuff = 0;
669 for (h = 0; h < hinb; h++) {
670 ptr2 = ptrb + hi[h].lstart * mb->lda;
671 for (v = 0; v < vinb; v++) {
672 Mlacpy(vi[v].len, hi[h].len,
673 buff + sizebuff, vi[v].len,
674 ptr2 + vi[v].lstart,
675 mb->lda);
676 sizebuff += hi[h].len * vi[v].len;
677 }
678 }
679}
681inter_len(Int hinb, IDESC *hi, Int vinb, IDESC *vi)
682{
683 Int hlen, vlen, h, v;
684 hlen = 0;
685 for (h = 0; h < hinb; h++)
686 hlen += hi[h].len;
687 vlen = 0;
688 for (v = 0; v < vinb; v++)
689 vlen += vi[v].len;
690 return hlen * vlen;
691}
692void
693Clacpy(Int m, Int n, double *a, Int lda, double *b, Int ldb)
694{
695 Int i, j;
696 lda -= m;
697 ldb -= m;
698 assert(lda >= 0 && ldb >= 0);
699 for (j = 0; j < n; j++) {
700 for (i = 0; i < m; i++)
701 *b++ = *a++;
702 b += ldb;
703 a += lda;
704 }
705}
707gridreshape(Int *ctxtp)
708{
709 Int ori, final; /* original context, and new context created, with
710 * line form */
711 Int nprow, npcol, myrow, mycol;
712 Int *usermap;
713 Int i, j;
714 ori = *ctxtp;
715 Cblacs_gridinfo(ori, &nprow, &npcol, &myrow, &mycol);
716 usermap = mr2d_malloc(sizeof(Int) * nprow * npcol);
717 for (i = 0; i < nprow; i++)
718 for (j = 0; j < npcol; j++) {
719 usermap[i + j * nprow] = Cblacs_pnum(ori, i, j);
720 }
721 /* Cblacs_get(0, 0, &final); */
722 Cblacs_get(ori, (Int)10, &final);
723 Cblacs_gridmap(&final, usermap, (Int)1, (Int)1, nprow * npcol);
724 *ctxtp = final;
725 free(usermap);
726}
#define Int
Definition Bconfig.h:22
void Cblacs_gridmap()
static2 Int inter_len()
Int memoryblocksize()
Int changeorigin()
#define freememory
Definition pdgemr.c:220
#define scan_intervals
Definition pdgemr.c:221
void Cblacs_gridexit()
#define max(A, B)
Definition pdgemr.c:177
void Cigsum2d()
#define static2
Definition pdgemr.c:143
#define scanD0
Definition pdgemr.c:217
Int Cblacs_pnum()
void Cdgerv2d()
static2 void gridreshape()
#define DIVUP(a, b)
Definition pdgemr.c:179
#define fortran_mr2dnew
Definition pdgemr.c:154
#define Clacpy
Definition pdgemr.c:158
void Cigamx2d()
#define Mlacpy(mo, no, ao, ldao, bo, ldbo)
Definition pdgemr.c:619
void Cblacs_pinfo()
#define NBPARAM
Definition pdgemr.c:285
void Cblacs_pcoord()
void Cigamn2d()
Int localsize()
#define setmemory
Definition pdgemr.c:219
void Cblacs_get()
#define dlacpy_
Definition pdgemr.c:156
void Cigerv2d()
void Cigebs2d()
#define dispmat
Definition pdgemr.c:218
static2 void buff2block()
void Cdgesd2d()
void paramcheck()
void Cblacs_setup()
static2 Int block2buff()
void Cblacs_gridinit()
void Cblacs_gridinfo()
#define MAGIC_MAX
Definition pdgemr.c:286
void Csetpvmtids()
Int localindice()
void Cpdgemr2do()
void Cigesd2d()
#define DESCLEN
Definition pdgemr.c:242
Int ppcm()
void Cigebr2d()
void Cblacs_exit()
void Cpdgemr2d()
#define fortran_mr2d
Definition pdgemr.c:153
void * mr2d_malloc()
static2 void init_chenille()
Int lstart
Definition pcgemr.c:176
Int len
Definition pcgemr.c:177
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