source: XIOS/dev/branch_openmp/extern/ep_dev/ep_init.cpp @ 1517

Last change on this file since 1517 was 1517, checked in by yushan, 3 years ago

save dev

File size: 617 bytes
Line 
1#include "ep_lib.hpp"
2#include <mpi.h>
3#include "ep_declaration.hpp"
4
5
6namespace ep_lib
7{
8
9
10
11  int MPI_Init_thread(int *argc, char*** argv, int required, int*provided)
12  {
13    Debug("MPI_Init_thread with EP/MPI\n");
14
15    if(omp_get_thread_num() == 0)
16    {
17      ::MPI_Init_thread(argc, argv, required, provided);
18    }
19  }
20
21  int MPI_Init(int *argc, char ***argv)
22  {
23    Debug("MPI_Init with EP/MPI\n");
24
25    if(omp_get_thread_num() == 0)
26    {
27      ::MPI_Init(argc, argv);
28    }
29  }
30
31  int MPI_Initialized(int *flag)
32  {
33    Debug("MPI_Initialized with EP/MPI\n");
34
35    return ::MPI_Initialized(flag);
36  }
37
38
39
40}
41
42
Note: See TracBrowser for help on using the repository browser.