source: XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_init.cpp @ 1646

Last change on this file since 1646 was 1646, checked in by yushan, 5 years ago

branch merged with trunk @1645. arch file (ep&mpi) added for ADA

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