Skip to content

Commit 7d6df3e

Browse files
committed
Fix missed Cblacs_gridmap and add implicit function definition for numroc_
1 parent d8efe3f commit 7d6df3e

File tree

12 files changed

+95
-83
lines changed

12 files changed

+95
-83
lines changed

REDIST/SRC/pcgemr.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ extern void Cblacs_get( Int context, Int what, Int* val );
195195
extern void Cblacs_pinfo( Int* mypnum, Int* nprocs );
196196
extern void Cblacs_gridinfo( Int context, Int* nprow, Int* npcol, Int* myrow, Int* mycol );
197197
extern void Cblacs_gridinit( Int* context, char* order, Int nprow, Int npcol );
198+
extern void Cblacs_gridmap( Int* context, Int* usermap, Int ldumap, Int nprow, Int npcol );
198199
extern void Cblacs_exit( Int continue_blacs );
199200
extern void Cblacs_gridexit( Int context );
200201
extern void Cblacs_setup( Int* mypnum, Int* nprocs );
@@ -244,15 +245,15 @@ extern void Cpcgemr2d( Int m, Int n, complex *ptrmyblock, Int ia, Int ja, MDESC
244245
#include <stdlib.h>
245246
#include <assert.h>
246247
#define DESCLEN 9
247-
void
248+
void
248249
fortran_mr2d(Int *m, Int *n, complex *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
249250
complex *B, Int *ib, Int *jb, Int desc_B[DESCLEN])
250251
{
251252
Cpcgemr2do(*m, *n, A, *ia, *ja, (MDESC *) desc_A,
252253
B, *ib, *jb, (MDESC *) desc_B);
253254
return;
254255
}
255-
void
256+
void
256257
fortran_mr2dnew(Int *m, Int *n, complex *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
257258
complex *B, Int *ib, Int *jb, Int desc_B[DESCLEN], Int *gcontext)
258259
{
@@ -565,7 +566,7 @@ Cpcgemr2d(m, n,
565566
free(h_inter);
566567
free(param);
567568
}/* distrib */
568-
static2 void
569+
static2 void
569570
init_chenille(Int mypnum, Int nprocs, Int n0, Int *proc0, Int n1, Int *proc1, Int **psend, Int **precv, Int *myrang)
570571
{
571572
Int ns, nr, i, tot;
@@ -636,7 +637,7 @@ Int _m,_n,_lda,_ldb; \
636637
_a += _lda; \
637638
} \
638639
} (void)0
639-
static2 Int
640+
static2 Int
640641
block2buff(IDESC *vi, Int vinb, IDESC *hi, Int hinb, complex *ptra, MDESC *ma, complex *buff)
641642
{
642643
Int h, v, sizebuff;
@@ -654,7 +655,7 @@ block2buff(IDESC *vi, Int vinb, IDESC *hi, Int hinb, complex *ptra, MDESC *ma, c
654655
}
655656
return sizebuff;
656657
}
657-
static2 void
658+
static2 void
658659
buff2block(IDESC *vi, Int vinb, IDESC *hi, Int hinb, complex *buff, complex *ptrb, MDESC *mb)
659660
{
660661
Int h, v, sizebuff;
@@ -671,7 +672,7 @@ buff2block(IDESC *vi, Int vinb, IDESC *hi, Int hinb, complex *buff, complex *ptr
671672
}
672673
}
673674
}
674-
static2 Int
675+
static2 Int
675676
inter_len(Int hinb, IDESC *hi, Int vinb, IDESC *vi)
676677
{
677678
Int hlen, vlen, h, v;
@@ -683,7 +684,7 @@ inter_len(Int hinb, IDESC *hi, Int vinb, IDESC *vi)
683684
vlen += vi[v].len;
684685
return hlen * vlen;
685686
}
686-
void
687+
void
687688
Clacpy(Int m, Int n, complex *a, Int lda, complex *b, Int ldb)
688689
{
689690
Int i, j;
@@ -697,7 +698,7 @@ Clacpy(Int m, Int n, complex *a, Int lda, complex *b, Int ldb)
697698
a += lda;
698699
}
699700
}
700-
static2 void
701+
static2 void
701702
gridreshape(Int *ctxtp)
702703
{
703704
Int ori, final; /* original context, and new context created, with

REDIST/SRC/pctrmr.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ extern void Cblacs_get( Int context, Int what, Int* val );
210210
extern void Cblacs_pinfo( Int* mypnum, Int* nprocs );
211211
extern void Cblacs_gridinfo( Int context, Int* nprow, Int* npcol, Int* myrow, Int* mycol );
212212
extern void Cblacs_gridinit( Int* context, char* order, Int nprow, Int npcol );
213+
extern void Cblacs_gridmap( Int* context, Int* usermap, Int ldumap, Int nprow, Int npcol );
213214
extern void Cblacs_exit( Int continue_blacs );
214215
extern void Cblacs_gridexit( Int context );
215216
extern void Cblacs_setup( Int* mypnum, Int* nprocs );
@@ -259,15 +260,15 @@ extern void Cpctrmr2d( char* uplo, char* diag, Int m, Int n, complex *ptrmyblock
259260
#include <stdlib.h>
260261
#include <assert.h>
261262
#define DESCLEN 9
262-
void
263+
void
263264
fortran_mr2d(char *uplo, char *diag, Int *m, Int *n, complex *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
264265
complex *B, Int *ib, Int *jb, Int desc_B[DESCLEN])
265266
{
266267
Cpctrmr2do(uplo, diag, *m, *n, A, *ia, *ja, (MDESC *) desc_A,
267268
B, *ib, *jb, (MDESC *) desc_B);
268269
return;
269270
}
270-
void
271+
void
271272
fortran_mr2dnew(char *uplo, char *diag, Int *m, Int *n, complex *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
272273
complex *B, Int *ib, Int *jb, Int desc_B[DESCLEN], Int *gcontext)
273274
{
@@ -587,7 +588,7 @@ Cpctrmr2d(uplo, diag, m, n,
587588
free(h_inter);
588589
free(param);
589590
}/* distrib */
590-
static2 void
591+
static2 void
591592
init_chenille(Int mypnum, Int nprocs, Int n0, Int *proc0, Int n1, Int *proc1, Int **psend, Int **precv, Int *myrang)
592593
{
593594
Int ns, nr, i, tot;
@@ -641,7 +642,7 @@ init_chenille(Int mypnum, Int nprocs, Int n0, Int *proc0, Int n1, Int *proc1, In
641642
assert(nr <= n1);
642643
}
643644
}
644-
void
645+
void
645646
Clacpy(Int m, Int n, complex *a, Int lda, complex *b, Int ldb)
646647
{
647648
Int i, j;
@@ -655,7 +656,7 @@ Clacpy(Int m, Int n, complex *a, Int lda, complex *b, Int ldb)
655656
a += lda;
656657
}
657658
}
658-
static2 void
659+
static2 void
659660
gridreshape(Int *ctxtp)
660661
{
661662
Int ori, final; /* original context, and new context created, with

REDIST/SRC/pdgemr.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ extern void Cblacs_get( Int context, Int what, Int* val );
192192
extern void Cblacs_pinfo( Int* mypnum, Int* nprocs );
193193
extern void Cblacs_gridinfo( Int context, Int* nprow, Int* npcol, Int* myrow, Int* mycol );
194194
extern void Cblacs_gridinit( Int* context, char* order, Int nprow, Int npcol );
195+
extern void Cblacs_gridmap( Int* context, Int* usermap, Int ldumap, Int nprow, Int npcol );
195196
extern void Cblacs_exit( Int continue_blacs );
196197
extern void Cblacs_gridexit( Int context );
197198
extern void Cblacs_setup( Int* mypnum, Int* nprocs );
@@ -241,15 +242,15 @@ extern void Cpdgemr2d( Int m, Int n, double *ptrmyblock, Int ia, Int ja, MDESC *
241242
#include <stdlib.h>
242243
#include <assert.h>
243244
#define DESCLEN 9
244-
void
245+
void
245246
fortran_mr2d(Int *m, Int *n, double *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
246247
double *B, Int *ib, Int *jb, Int desc_B[DESCLEN])
247248
{
248249
Cpdgemr2do(*m, *n, A, *ia, *ja, (MDESC *) desc_A,
249250
B, *ib, *jb, (MDESC *) desc_B);
250251
return;
251252
}
252-
void
253+
void
253254
fortran_mr2dnew(Int *m, Int *n, double *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
254255
double *B, Int *ib, Int *jb, Int desc_B[DESCLEN], Int *gcontext)
255256
{
@@ -562,7 +563,7 @@ Cpdgemr2d(m, n,
562563
free(h_inter);
563564
free(param);
564565
}/* distrib */
565-
static2 void
566+
static2 void
566567
init_chenille(mypnum, nprocs, n0, proc0, n1, proc1, psend, precv, myrang)
567568
Int nprocs, mypnum, n0, n1;
568569
Int *proc0, *proc1, **psend, **precv, *myrang;
@@ -635,7 +636,7 @@ Int _m,_n,_lda,_ldb; \
635636
_a += _lda; \
636637
} \
637638
} (void)0
638-
static2 Int
639+
static2 Int
639640
block2buff(vi, vinb, hi, hinb, ptra, ma, buff)
640641
Int hinb, vinb;
641642
IDESC *hi, *vi;
@@ -657,7 +658,7 @@ block2buff(vi, vinb, hi, hinb, ptra, ma, buff)
657658
}
658659
return sizebuff;
659660
}
660-
static2 void
661+
static2 void
661662
buff2block(vi, vinb, hi, hinb, buff, ptrb, mb)
662663
Int hinb, vinb;
663664
IDESC *hi, *vi;
@@ -678,7 +679,7 @@ buff2block(vi, vinb, hi, hinb, buff, ptrb, mb)
678679
}
679680
}
680681
}
681-
static2 Int
682+
static2 Int
682683
inter_len(Int hinb, IDESC *hi, Int vinb, IDESC *vi)
683684
{
684685
Int hlen, vlen, h, v;
@@ -690,7 +691,7 @@ inter_len(Int hinb, IDESC *hi, Int vinb, IDESC *vi)
690691
vlen += vi[v].len;
691692
return hlen * vlen;
692693
}
693-
void
694+
void
694695
Clacpy(Int m, Int n, double *a, Int lda, double *b, Int ldb)
695696
{
696697
Int i, j;
@@ -704,7 +705,7 @@ Clacpy(Int m, Int n, double *a, Int lda, double *b, Int ldb)
704705
a += lda;
705706
}
706707
}
707-
static2 void
708+
static2 void
708709
gridreshape(Int *ctxtp)
709710
{
710711
Int ori, final; /* original context, and new context created, with

REDIST/SRC/pdtrmr.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ extern void Cblacs_get( Int context, Int what, Int* val );
207207
extern void Cblacs_pinfo( Int* mypnum, Int* nprocs );
208208
extern void Cblacs_gridinfo( Int context, Int* nprow, Int* npcol, Int* myrow, Int* mycol );
209209
extern void Cblacs_gridinit( Int* context, char* order, Int nprow, Int npcol );
210+
extern void Cblacs_gridmap( Int* context, Int* usermap, Int ldumap, Int nprow, Int npcol );
210211
extern void Cblacs_exit( Int continue_blacs );
211212
extern void Cblacs_gridexit( Int context );
212213
extern void Cblacs_setup( Int* mypnum, Int* nprocs );
@@ -256,15 +257,15 @@ extern void Cpdtrmr2d( char* uplo, char* diag, Int m, Int n, double *ptrmyblock,
256257
#include <stdlib.h>
257258
#include <assert.h>
258259
#define DESCLEN 9
259-
void
260+
void
260261
fortran_mr2d(char *uplo, char *diag, Int *m, Int *n, double *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
261262
double *B, Int *ib, Int *jb, Int desc_B[DESCLEN])
262263
{
263264
Cpdtrmr2do(uplo, diag, *m, *n, A, *ia, *ja, (MDESC *) desc_A,
264265
B, *ib, *jb, (MDESC *) desc_B);
265266
return;
266267
}
267-
void
268+
void
268269
fortran_mr2dnew(char *uplo, char *diag, Int *m, Int *n, double *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
269270
double *B, Int *ib, Int *jb, Int desc_B[DESCLEN], Int *gcontext)
270271
{
@@ -584,7 +585,7 @@ Cpdtrmr2d(uplo, diag, m, n,
584585
free(h_inter);
585586
free(param);
586587
}/* distrib */
587-
static2 void
588+
static2 void
588589
init_chenille(Int mypnum, Int nprocs, Int n0, Int *proc0, Int n1, Int *proc1, Int **psend, Int **precv, Int *myrang)
589590
{
590591
Int ns, nr, i, tot;
@@ -638,7 +639,7 @@ init_chenille(Int mypnum, Int nprocs, Int n0, Int *proc0, Int n1, Int *proc1, In
638639
assert(nr <= n1);
639640
}
640641
}
641-
void
642+
void
642643
Clacpy(Int m, Int n, double *a, Int lda, double *b, Int ldb)
643644
{
644645
Int i, j;
@@ -652,7 +653,7 @@ Clacpy(Int m, Int n, double *a, Int lda, double *b, Int ldb)
652653
a += lda;
653654
}
654655
}
655-
static2 void
656+
static2 void
656657
gridreshape(Int *ctxtp)
657658
{
658659
Int ori, final; /* original context, and new context created, with

REDIST/SRC/pigemr.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ extern void Cblacs_get( Int context, Int what, Int* val );
192192
extern void Cblacs_pinfo( Int* mypnum, Int* nprocs );
193193
extern void Cblacs_gridinfo( Int context, Int* nprow, Int* npcol, Int* myrow, Int* mycol );
194194
extern void Cblacs_gridinit( Int* context, char* order, Int nprow, Int npcol );
195+
extern void Cblacs_gridmap( Int* context, Int* usermap, Int ldumap, Int nprow, Int npcol );
195196
extern void Cblacs_exit( Int continue_blacs );
196197
extern void Cblacs_gridexit( Int context );
197198
extern void Cblacs_setup( Int* mypnum, Int* nprocs );
@@ -239,15 +240,15 @@ extern void Cpigemr2d( Int m, Int n, Int *ptrmyblock, Int ia, Int ja, MDESC *ma,
239240
#include <stdlib.h>
240241
#include <assert.h>
241242
#define DESCLEN 9
242-
void
243+
void
243244
fortran_mr2d(Int *m, Int *n, Int *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
244245
Int *B, Int *ib, Int *jb, Int desc_B[DESCLEN])
245246
{
246247
Cpigemr2do(*m, *n, A, *ia, *ja, (MDESC *) desc_A,
247248
B, *ib, *jb, (MDESC *) desc_B);
248249
return;
249250
}
250-
void
251+
void
251252
fortran_mr2dnew(Int *m, Int *n, Int *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
252253
Int *B, Int *ib, Int *jb, Int desc_B[DESCLEN], Int *gcontext)
253254
{
@@ -560,7 +561,7 @@ Cpigemr2d(m, n,
560561
free(h_inter);
561562
free(param);
562563
}/* distrib */
563-
static2 void
564+
static2 void
564565
init_chenille(Int mypnum, Int nprocs, Int n0, Int *proc0, Int n1, Int *proc1, Int **psend, Int **precv, Int *myrang)
565566
{
566567
Int ns, nr, i, tot;
@@ -631,7 +632,7 @@ Int _m,_n,_lda,_ldb; \
631632
_a += _lda; \
632633
} \
633634
} (void)0
634-
static2 Int
635+
static2 Int
635636
block2buff(IDESC *vi, Int vinb, IDESC *hi, Int hinb, Int *ptra, MDESC *ma, Int *buff)
636637
{
637638
Int h, v, sizebuff;
@@ -649,7 +650,7 @@ block2buff(IDESC *vi, Int vinb, IDESC *hi, Int hinb, Int *ptra, MDESC *ma, Int *
649650
}
650651
return sizebuff;
651652
}
652-
static2 void
653+
static2 void
653654
buff2block(IDESC *vi, Int vinb, IDESC *hi, Int hinb, Int *buff, Int *ptrb, MDESC *mb)
654655
{
655656
Int h, v, sizebuff;
@@ -666,7 +667,7 @@ buff2block(IDESC *vi, Int vinb, IDESC *hi, Int hinb, Int *buff, Int *ptrb, MDESC
666667
}
667668
}
668669
}
669-
static2 Int
670+
static2 Int
670671
inter_len(Int hinb, IDESC *hi, Int vinb, IDESC *vi)
671672
{
672673
Int hlen, vlen, h, v;
@@ -678,7 +679,7 @@ inter_len(Int hinb, IDESC *hi, Int vinb, IDESC *vi)
678679
vlen += vi[v].len;
679680
return hlen * vlen;
680681
}
681-
void
682+
void
682683
Clacpy(Int m, Int n, Int *a, Int lda, Int *b, Int ldb)
683684
{
684685
Int i, j;
@@ -692,7 +693,7 @@ Clacpy(Int m, Int n, Int *a, Int lda, Int *b, Int ldb)
692693
a += lda;
693694
}
694695
}
695-
static2 void
696+
static2 void
696697
gridreshape(Int *ctxtp)
697698
{
698699
Int ori, final; /* original context, and new context created, with

REDIST/SRC/pitrmr.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ extern void Cblacs_get( Int context, Int what, Int* val );
207207
extern void Cblacs_pinfo( Int* mypnum, Int* nprocs );
208208
extern void Cblacs_gridinfo( Int context, Int* nprow, Int* npcol, Int* myrow, Int* mycol );
209209
extern void Cblacs_gridinit( Int* context, char* order, Int nprow, Int npcol );
210+
extern void Cblacs_gridmap( Int* context, Int* usermap, Int ldumap, Int nprow, Int npcol );
210211
extern void Cblacs_exit( Int continue_blacs );
211212
extern void Cblacs_gridexit( Int context );
212213
extern void Cblacs_setup( Int* mypnum, Int* nprocs );
@@ -254,15 +255,15 @@ extern void Cpitrmr2d( char* uplo, char* diag, Int m, Int n, Int *ptrmyblock, In
254255
#include <stdlib.h>
255256
#include <assert.h>
256257
#define DESCLEN 9
257-
void
258+
void
258259
fortran_mr2d(char *uplo, char *diag, Int *m, Int *n, Int *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
259260
Int *B, Int *ib, Int *jb, Int desc_B[DESCLEN])
260261
{
261262
Cpitrmr2do(uplo, diag, *m, *n, A, *ia, *ja, (MDESC *) desc_A,
262263
B, *ib, *jb, (MDESC *) desc_B);
263264
return;
264265
}
265-
void
266+
void
266267
fortran_mr2dnew(char *uplo, char *diag, Int *m, Int *n, Int *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
267268
Int *B, Int *ib, Int *jb, Int desc_B[DESCLEN], Int *gcontext)
268269
{
@@ -582,7 +583,7 @@ Cpitrmr2d(uplo, diag, m, n,
582583
free(h_inter);
583584
free(param);
584585
}/* distrib */
585-
static2 void
586+
static2 void
586587
init_chenille(Int mypnum, Int nprocs, Int n0, Int *proc0, Int n1, Int *proc1, Int **psend, Int **precv, Int *myrang)
587588
{
588589
Int ns, nr, i, tot;
@@ -636,7 +637,7 @@ init_chenille(Int mypnum, Int nprocs, Int n0, Int *proc0, Int n1, Int *proc1, In
636637
assert(nr <= n1);
637638
}
638639
}
639-
void
640+
void
640641
Clacpy(Int m, Int n, Int *a, Int lda, Int *b, Int ldb)
641642
{
642643
Int i, j;
@@ -650,7 +651,7 @@ Clacpy(Int m, Int n, Int *a, Int lda, Int *b, Int ldb)
650651
a += lda;
651652
}
652653
}
653-
static2 void
654+
static2 void
654655
gridreshape(Int *ctxtp)
655656
{
656657
Int ori, final; /* original context, and new context created, with

0 commit comments

Comments
 (0)