Ice Sheet System Model
4.18
Code documentation
src
c
main
EnvironmentInit.cpp
Go to the documentation of this file.
1
4
#ifdef HAVE_CONFIG_H
5
#include <config.h>
6
#else
7
#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
8
#endif
9
#include <stdio.h>
10
#include "../toolkits/toolkits.h"
11
12
ISSM_MPI_Comm
EnvironmentInit
(
int
argc,
char
** argv){
13
14
/*Output*/
15
ISSM_MPI_Comm
comm = 0;
16
17
/*Initialize MPI environment: */
18
#if defined(_HAVE_MPI_)
19
ISSM_MPI_Init
(&argc,&argv);
20
comm =
ISSM_MPI_COMM_WORLD
;
21
#else
22
comm = 1;
//bogus number for comm, which does not exist anyway.
23
#endif
24
25
/*Print Banner*/
26
int
my_rank = 0;
27
ISSM_MPI_Comm_rank
(comm,&my_rank);
28
if
(!my_rank) printf(
"\n"
);
29
if
(!my_rank) printf(
"%s version %s\n"
,PACKAGE_NAME,PACKAGE_VERSION);
30
if
(!my_rank) printf(
"(website: %s contact: %s)\n"
,PACKAGE_URL,PACKAGE_BUGREPORT);
31
if
(!my_rank) printf(
"\n"
);
32
33
/*Return communicator*/
34
return
comm;
35
}
EnvironmentInit
ISSM_MPI_Comm EnvironmentInit(int argc, char **argv)
Definition:
EnvironmentInit.cpp:12
ISSM_MPI_COMM_WORLD
#define ISSM_MPI_COMM_WORLD
Definition:
issmmpi.h:137
ISSM_MPI_Comm_rank
int ISSM_MPI_Comm_rank(ISSM_MPI_Comm comm, int *rank)
Definition:
issmmpi.cpp:198
ISSM_MPI_Init
int ISSM_MPI_Init(int *argc, char ***argv)
Definition:
issmmpi.cpp:319
ISSM_MPI_Comm
int ISSM_MPI_Comm
Definition:
issmmpi.h:118
Generated on Thu Jul 2 2020 08:09:19 for Ice Sheet System Model by
1.8.19