source: XIOS/dev/branch_openmp/extern/src_ep_dev/ep_init.cpp @ 1620

Last change on this file since 1620 was 1539, checked in by yushan, 6 years ago

update intercomm_merge and remove redundant files

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