Last change
on this file since 13621 was 13621, checked in by Mathieu Morlighem, 12 years ago |
CHG: cosmetics, removing all deboule blank lines and indent single white lines correctly
|
File size:
692 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 | #include "../include/include.h"
|
---|
10 | #include "../toolkits/toolkits.h"
|
---|
11 |
|
---|
12 | COMM EnvironmentInit(int argc,char** argv){
|
---|
13 |
|
---|
14 | /*Initialize environments: Petsc, MPI, etc...: */
|
---|
15 | #ifdef _HAVE_PETSC_
|
---|
16 | int ierr=PetscInitialize(&argc,&argv,(char*)0,"");
|
---|
17 | if(ierr) _error_("Could not initialize Petsc");
|
---|
18 | return MPI_COMM_WORLD;
|
---|
19 | #else
|
---|
20 | #ifdef _HAVE_MPI_
|
---|
21 | MPI_Init(&argc,&argv);
|
---|
22 | return MPI_COMM_WORLD;
|
---|
23 | #else
|
---|
24 | return 1; //return bogus number for comm, which does not exist anyway.
|
---|
25 | #endif
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.