OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
blacs_pinfo_.c File Reference
#include "Bdef.h"

Go to the source code of this file.

Functions

F_VOID_FUNC blacs_pinfo_ (Int *mypnum, Int *nprocs)

Function Documentation

◆ blacs_pinfo_()

F_VOID_FUNC blacs_pinfo_ ( Int * mypnum,
Int * nprocs )

Definition at line 6 of file blacs_pinfo_.c.

8{
9 Int ierr;
10 extern Int BI_Iam, BI_Np;
11 MpiInt flag, Iam = BI_Iam, Np = BI_Np;
12 MpiInt argc=0;
13 char **argv=NULL;
14 if (BI_COMM_WORLD == NULL)
15 {
16 MPI_Initialized(&flag);
17
18 if (!flag)
19 ierr = MPI_Init(&argc,&argv); // call Init and ignore argc and argv
20
21 BI_COMM_WORLD = (Int *) malloc(sizeof(Int));
22 *BI_COMM_WORLD = MPI_Comm_c2f(MPI_COMM_WORLD);
23 }
24 MPI_Comm_size(MPI_COMM_WORLD, &Np);
26 *mypnum = BI_Iam = Iam;
27 *nprocs = BI_Np = Np;
28}
Int BI_Iam
Int BI_Np
#define Int
Definition Bconfig.h:22
#define MpiInt
Definition Bconfig.h:25
Int * BI_COMM_WORLD
LIBSEQ_INT LIBSEQ_CALL MPI_Comm_rank(LIBSEQ_INT comm, LIBSEQ_INT *rank)
Definition mpic.c:23
static MPI_Comm MPI_COMM_WORLD
Definition mpi.h:51
LIBSEQ_INT LIBSEQ_CALL MPI_Init(LIBSEQ_INT *pargc, char ***pargv)
Definition mpic.c:18
integer, save, private nprocs
Definition cmumps_load.F:57
*fortran !University of Stuttgart All rights reserved Inc All rights reserved ! $COPYRIGHT$ !Additional copyrights may follow ! $HEADER$ !WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING !Do ***not ***copy this file to the directory where your Fortran !fortran application is compiled unless it is absolutely necessary !Most !modern Fortran compilers now support the I command line flag
Definition mpif.h:26