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

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

save dev : intercomm_create via intracomm. To do : modif related intercomm communication routines, barrier, free, rank, size...

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