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

◆ globchk()

subroutine globchk ( integer  ictxt,
integer  n,
integer, dimension( ldx, 2 )  x,
integer  ldx,
integer, dimension( n )  iwork,
integer  info 
)

Definition at line 402 of file pchkxmat.f.

403*
404* -- ScaLAPACK tools routine (version 1.7) --
405* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
406* and University of California, Berkeley.
407* May 1, 1997
408*
409* .. Scalar Arguments ..
410 INTEGER ICTXT, INFO, LDX, N
411* ..
412* .. Array Arguments ..
413 INTEGER IWORK( N ), X( LDX, 2 )
414* ..
415*
416* Purpose
417* =======
418*
419* GLOBCHK checks that values in X(i,1) are the same on all processes
420* in the process grid indicated by ICTXT.
421*
422* Arguments
423* =========
424*
425* ICTXT (global input) INTEGER
426* The BLACS context handle indicating the context over which
427* the values are to be the same.
428*
429* N (global input) INTEGER
430* The number of values to be compared.
431*
432* X (local input) INTEGER array, dimension (N,2)
433* The 1st column contains the values which should be the same
434* on all processes. The 2nd column indicates where in the
435* calling routine's parameter list the corresponding value
436* from column 1 came from.
437*
438* LDX (local input) INTEGER
439* The leading dimension of the array X. LDX >= MAX(1,N).
440*
441* IWORK (local workspace) INTEGER array, dimension (N)
442* Used to receive other processes' values for comparing with X.
443*
444* INFO (local input/global output) INTEGER
445* On entry, the smallest error flag so far generated, or BIGNUM
446* for no error. On exit:
447* = BIGNUM : no error
448* < 0: if INFO = -i*100, the i-th argument had an illegal
449* value, or was different between processes.
450*
451* =====================================================================
452*
453* .. Local Scalars ..
454 INTEGER K, MYROW, MYCOL
455* ..
456* .. External Subroutines ..
457 EXTERNAL blacs_gridinfo, igamn2d, igebr2d, igebs2d
458* ..
459* .. Intrinsic Functions ..
460 INTRINSIC min
461* ..
462* .. Executable Statements ..
463*
464 CALL blacs_gridinfo( ictxt, iwork, k, myrow, mycol )
465*
466 IF( myrow.EQ.0 .AND. mycol.EQ.0 ) THEN
467 CALL igebs2d( ictxt, 'All', ' ', n, 1, x, n )
468 ELSE
469 CALL igebr2d( ictxt, 'All', ' ', n, 1, iwork, n, 0, 0 )
470 DO 10 k = 1, n
471 IF( x( k, 1 ).NE.iwork( k ) )
472 $ info = min( info, x( k, 2 ) )
473 10 CONTINUE
474 END IF
475*
476 CALL igamn2d( ictxt, 'All', ' ', 1, 1, info, 1, k, k, -1, -1, 0 )
477*
478 RETURN
479*
480* End GLOBCHK
481*
#define min(A, B)
Definition pcgemr.c:181