OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
BI_TransUserComm.c
Go to the documentation of this file.
1#include "Bdef.h"
2
4{
5 MPI_Comm bcomm, ucomm;
6 MPI_Group bgrp, ugrp;
7 Int i;
8
9 MpiInt *mpmap = (MpiInt *)malloc(Np * sizeof(MpiInt));
10 for (i=0; i<Np; i++) mpmap[i] = pmap[i];
11
12 ucomm = MPI_Comm_f2c(Ucomm);
13 i=MPI_Comm_group(ucomm, &ugrp);
14 i=MPI_Group_incl(ugrp, Np, mpmap, &bgrp);
15 i=MPI_Comm_create(ucomm, bgrp, &bcomm);
16 i=MPI_Group_free(&ugrp);
17 i=MPI_Group_free(&bgrp);
18
19 free(mpmap);
20
21 return(bcomm);
22}
MPI_Comm BI_TransUserComm(Int Ucomm, Int Np, Int *pmap)
#define Int
Definition Bconfig.h:22
#define MpiInt
Definition Bconfig.h:25
LIBSEQ_INT MPI_Comm
Definition mpi.h:50