SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
blacs_pinfo_.c
Go to the documentation of this file.
1#include "Bdef.h"
2
3#if (INTFACE == C_CALL)
4void Cblacs_pinfo(Int *mypnum, Int *nprocs)
5#else
6F_VOID_FUNC blacs_pinfo_(Int *mypnum, Int *nprocs)
7#endif
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);
25 MPI_Comm_rank(MPI_COMM_WORLD, &Iam);
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
#define F_VOID_FUNC
Definition Bdef.h:232
void Cblacs_pinfo()
F_VOID_FUNC blacs_pinfo_(Int *mypnum, Int *nprocs)
Definition blacs_pinfo_.c:6
*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