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

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

save dev

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