Last change
on this file since 13532 was 13532, checked in by Eric.Larour, 12 years ago |
CHG: missing Config.h, which created a problem during issm initialization
|
File size:
632 bytes
|
Line | |
---|
1 | /*!\file: EnvironmentInit.cpp
|
---|
2 | * \brief: initialize Petsc, MPI, you name it
|
---|
3 | */
|
---|
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 |
|
---|
10 |
|
---|
11 | void EnvironmentInit(int argc,char** argv){
|
---|
12 |
|
---|
13 | /*Initialize environments: Petsc, MPI, etc...: */
|
---|
14 | #ifdef _HAVE_PETSC_
|
---|
15 | ierr=PetscInitialize(&argc,&argv,(char*)0,"");
|
---|
16 | if(ierr) _error_("Could not initialize Petsc");
|
---|
17 | #else
|
---|
18 | #ifdef _HAVE_MPI_
|
---|
19 | MPI_Init(&argc,&argv);
|
---|
20 | #endif
|
---|
21 | #endif
|
---|
22 |
|
---|
23 | /*Size and rank: */
|
---|
24 | #ifdef _HAVE_MPI_
|
---|
25 | MPI_Comm_rank(MPI_COMM_WORLD,&my_rank);
|
---|
26 | MPI_Comm_size(MPI_COMM_WORLD,&num_procs);
|
---|
27 | #endif
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.