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

◆ makegrids()

subroutine makegrids ( integer, dimension(ngrids)  contexts,
integer  outnum,
integer  ngrids,
integer, dimension(ngrids)  p,
integer, dimension(ngrids)  q 
)

Definition at line 639 of file blacstest.f.

640 INTEGER NGRIDS, OUTNUM
641 INTEGER CONTEXTS(NGRIDS), P(NGRIDS), Q(NGRIDS)
642 INTEGER IBTMYPROC
643 EXTERNAL ibtmyproc
644 INTEGER NPROW, NPCOL, MYROW, MYCOL, I
645*
646 DO 10 i = 1, ngrids
647 CALL blacs_get( 0, 0, contexts(i) )
648 CALL blacs_gridinit( contexts(i), 'r', p(i), q(i) )
649 10 CONTINUE
650*
651 DO 20 i = 1, ngrids
652 CALL blacs_gridinfo( contexts(i), nprow, npcol, myrow, mycol )
653 IF( nprow .GT. 0 ) THEN
654 IF( nprow.NE.p(i) .OR. npcol.NE.q(i) ) THEN
655 IF( ibtmyproc() .NE. 0 ) outnum = 6
656 WRITE(outnum,1000) i
657 IF( outnum .NE. 6 .AND. outnum .NE. 0 ) CLOSE(outnum)
658 CALL blacs_abort( contexts(i), -1 )
659 END IF
660 END IF
661 20 CONTINUE
662*
663 1000 FORMAT('Grid creation error trying to create grid #',i3)
664 RETURN
integer function ibtmyproc()
Definition btprim.f:47
Here is the caller graph for this function: