source: issm/trunk-jpl/src/c/solutions/EnvironmentInit.cpp@ 13530

Last change on this file since 13530 was 13530, checked in by Eric.Larour, 12 years ago

CHG and NEW:
macros.h: changed name of ISSMBOOT and ISSMEND macros to IssmBoot and IssmEnd.
AdolcEdf: moved adolc_edf to src/c/classes and renamed it AdolcEdf. Updated all headers and Makefile.am
accordingly.
Noticed dual existence of objects.h in src/c/classes and src/c/classes/objects! Deleted first one and
fixed references accordingly in bamg and kriging.
Created new EnvironmentInit routine to initialize Petsc and MPI. Updated issm.cpp and kriging.cpp accordingly.

File size: 504 bytes
RevLine 
[13530]1/*!\file: EnvironmentInit.cpp
2 * \brief: initialize Petsc, MPI, you name it
3 */
4
5void EnvironmentInit(int argc,char** argv){
6
7 /*Initialize environments: Petsc, MPI, etc...: */
8 #ifdef _HAVE_PETSC_
9 ierr=PetscInitialize(&argc,&argv,(char*)0,"");
10 if(ierr) _error_("Could not initialize Petsc");
11 #else
12 #ifdef _HAVE_MPI_
13 MPI_Init(&argc,&argv);
14 #endif
15 #endif
16
17 /*Size and rank: */
18 #ifdef _HAVE_MPI_
19 MPI_Comm_rank(MPI_COMM_WORLD,&my_rank);
20 MPI_Comm_size(MPI_COMM_WORLD,&num_procs);
21 #endif
22}
Note: See TracBrowser for help on using the repository browser.