Ice Sheet System Model
4.18
Code documentation
src
c
toolkits
mpi
commops
DetermineGlobalSize.cpp
Go to the documentation of this file.
1
/* \file DetermineGlobalSize.cpp
2
* \brief: routine to determine global size from local size
3
*/
4
5
#include <stdio.h>
6
#include <math.h>
7
#include "../../../shared/shared.h"
8
#include "../../../shared/Numerics/types.h"
9
10
int
DetermineGlobalSize
(
int
local_size,
ISSM_MPI_Comm
comm){
11
12
/*output: */
13
int
global_size;
14
15
ISSM_MPI_Reduce
(&local_size, &global_size, 1,
ISSM_MPI_INT
,
ISSM_MPI_SUM
, 0, comm);
16
ISSM_MPI_Bcast
(&global_size,1,
ISSM_MPI_INT
,0,comm);
17
18
return
global_size;
19
20
}
ISSM_MPI_SUM
#define ISSM_MPI_SUM
Definition:
issmmpi.h:134
ISSM_MPI_INT
#define ISSM_MPI_INT
Definition:
issmmpi.h:127
ISSM_MPI_Bcast
int ISSM_MPI_Bcast(void *buffer, int count, ISSM_MPI_Datatype datatype, int root, ISSM_MPI_Comm comm)
Definition:
issmmpi.cpp:162
DetermineGlobalSize
int DetermineGlobalSize(int local_size, ISSM_MPI_Comm comm)
Definition:
DetermineGlobalSize.cpp:10
ISSM_MPI_Comm
int ISSM_MPI_Comm
Definition:
issmmpi.h:118
ISSM_MPI_Reduce
int ISSM_MPI_Reduce(void *sendbuf, void *recvbuf, int count, ISSM_MPI_Datatype datatype, ISSM_MPI_Op op, int root, ISSM_MPI_Comm comm)
Definition:
issmmpi.cpp:373
Generated on Thu Jul 2 2020 08:09:22 for Ice Sheet System Model by
1.8.19