SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
tc_cCsameF77.c
Go to the documentation of this file.
1#include <mpi.h>
2
3int Ccommcheck(int F77World, int f77comm)
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}
23
24/*
25 * Fortran interfaces
26 */
27int CCOMMCHECK(int *F77World, int *f77comm)
28{
29 return(Ccommcheck(*F77World, *f77comm));
30}
31int ccommcheck_(int *F77World, int *f77comm)
32{
33 return(Ccommcheck(*F77World, *f77comm));
34}
35int ccommcheck(int *F77World, int *f77comm)
36{
37 return(Ccommcheck(*F77World, *f77comm));
38}
int Ccommcheck(int F77World, int f77comm)
Definition tc_cCsameF77.c:3
int ccommcheck(int *F77World, int *f77comm)
int ccommcheck_(int *F77World, int *f77comm)
int CCOMMCHECK(int *F77World, int *f77comm)