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

◆ Ccommcheck()

int Ccommcheck ( int  F77World,
int  f77comm 
)

Definition at line 3 of file tc_cCsameF77.c.

4{
5 int Np, Iam, i, OK=1;
6
7 if (sizeof(int) != sizeof(MPI_Comm)) OK=0;
8 else if ((MPI_Comm) F77World != MPI_COMM_WORLD) OK=0;
9 else
10 {
11 MPI_Comm_rank(MPI_COMM_WORLD, &Iam);
12 if (Iam > 1) OK = ((MPI_Comm) f77comm == MPI_COMM_NULL);
13 else
14 {
15 i = MPI_Comm_size((MPI_Comm) f77comm, &Np);
16 if (i != MPI_SUCCESS) OK = 0;
17 else if (Np != 2) OK = 0;
18 }
19 }
20 MPI_Allreduce(&OK, &i, 1, MPI_INT, MPI_MIN, MPI_COMM_WORLD);
21 return(i);
22}
Here is the caller graph for this function: