OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
tc_cCsameF77.c File Reference
#include <mpi.h>

Go to the source code of this file.

Functions

int Ccommcheck (int F77World, int f77comm)
int CCOMMCHECK (int *F77World, int *f77comm)
int ccommcheck_ (int *F77World, int *f77comm)
int ccommcheck (int *F77World, int *f77comm)

Function Documentation

◆ CCOMMCHECK()

int CCOMMCHECK ( int * F77World,
int * f77comm )

Definition at line 27 of file tc_cCsameF77.c.

28{
29 return(Ccommcheck(*F77World, *f77comm));
30}
int Ccommcheck(int F77World, int f77comm)
Definition tc_cCsameF77.c:3

◆ 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 {
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}
LIBSEQ_INT LIBSEQ_CALL MPI_Comm_rank(LIBSEQ_INT comm, LIBSEQ_INT *rank)
Definition mpic.c:23
LIBSEQ_INT MPI_Comm
Definition mpi.h:50
static MPI_Comm MPI_COMM_WORLD
Definition mpi.h:51

◆ ccommcheck()

int ccommcheck ( int * F77World,
int * f77comm )

Definition at line 35 of file tc_cCsameF77.c.

36{
37 return(Ccommcheck(*F77World, *f77comm));
38}

◆ ccommcheck_()

int ccommcheck_ ( int * F77World,
int * f77comm )

Definition at line 31 of file tc_cCsameF77.c.

32{
33 return(Ccommcheck(*F77World, *f77comm));
34}