16#ifndef Comm_Group_MPI_included
17#define Comm_Group_MPI_included
19#include <Comm_Group_Noparallel.h>
38 Declare_instanciable_sans_constructeur_ni_destructeur(
Comm_Group_MPI);
42 void abort()
const override;
55 void barrier(
int tag)
const override;
57 const ArrOfInt& send_size,
58 const char *
const *
const send_buffers,
59 const ArrOfInt& recv_list,
60 const ArrOfInt& recv_size,
61 char *
const *
const recv_buffers,
64 void send(
int pe,
const void *buffer,
int size,
int tag)
const override;
65 void recv(
int pe,
void *buffer,
int size,
int tag)
const override;
66 void broadcast(
void *buffer,
int size,
int pe_source)
const override;
67 void all_to_all(
const void *src_buffer,
void *dest_buffer,
int data_size)
const override;
68 void all_gather(
const void *src_buffer,
void *dest_buffer,
int data_size)
const override;
69 void gather(
const void *src_buffer,
void *dest_buffer,
int data_size,
int root)
const override;
70 void all_gatherv(
const void *src_buffer,
void *dest_buffer,
int send_size,
const int* recv_size,
const int* displs)
const override;
74 void init_comm_on_numa_node();
75 void init_comm_on_node_master();
78 void all_to_allv(
const void *src_buffer,
int *send_data_size,
int *send_data_offset,
79 void *dest_buffer,
int *recv_data_size,
int *recv_data_offset)
const;
80 static void set_trio_u_world(MPI_Comm world);
81 static MPI_Comm get_trio_u_world();
82 static void set_must_mpi_initialize(
bool flag);
84 void ptop_send_recv(
const void * send_buf,
int send_buf_size,
int send_proc,
85 void * recv_buf,
int recv_buf_size,
int recv_proc)
const;
87 void set_must_finalize(
int flag) { must_finalize_=flag; }
88 MPI_Comm get_mpi_comm()
const {
return mpi_comm_; }
90 void init_group(
const ArrOfInt& pe_list)
override;
91 void internal_collective(
const int *x,
int *resu,
int nx,
const Collective_Op *op,
int nop,
int level)
const;
93 void internal_collective(
const trustIdType *x, trustIdType *resu,
int nx,
const Collective_Op *op,
int nop,
int level)
const;
95 void internal_collective(
const double *x,
double *resu,
int nx,
const Collective_Op *op,
int nop,
int level)
const;
96 void internal_collective(
const float *x,
float *resu,
int nx,
const Collective_Op *op,
int nop,
int level)
const;
101 template <
typename _TYPE_,
int TYP_IDX>
103 trustIdType mppartial_sum_impl(trustIdType x)
const;
106 static bool must_mpi_initialize_;
109 static MPI_Comm trio_u_world_;
110 static MPI_Status * mpi_status_;
111 static MPI_Request * mpi_requests_;
112 static int mpi_nrequests_;
113 static int mpi_maxrequests_;
114 static int current_msg_size_;
116 MPI_Group mpi_group_;
void recv(int pe, void *buffer, int size, int tag) const override
Reception blocante d'un message.
void all_to_all(const void *src_buffer, void *dest_buffer, int data_size) const override
void all_gather(const void *src_buffer, void *dest_buffer, int data_size) const override
void abort() const override
appel a MPI_Abort et rend la main
void send(int pe, const void *buffer, int size, int tag) const override
Envoi blocant.
void broadcast(void *buffer, int size, int pe_source) const override
void all_gatherv(const void *src_buffer, void *dest_buffer, int send_size, const int *recv_size, const int *displs) const override
~Comm_Group_MPI() override
void send_recv_finish() const override
Attend que l'ensemble des communications lancees par send_recv_start soient finie.
void send_recv_start(const ArrOfInt &send_list, const ArrOfInt &send_size, const char *const *const send_buffers, const ArrOfInt &recv_list, const ArrOfInt &recv_size, char *const *const recv_buffers, TypeHint typehint=CHAR) const override
Demarre l'envoi et la reception des buffers.
Comm_Group_MPI()
Constructeur par defaut.
void gather(const void *src_buffer, void *dest_buffer, int data_size, int root) const override
void mp_collective_op(const double *x, double *resu, int n, Collective_Op op) const override
: Cette classe decrit un groupe de processeurs sur lesquels
virtual void init_group(const ArrOfInt &pe_list)
Cette fonction doit etre appelee simultanement par tous les PEs du groupe current_group avec les meme...
void init_group_trio(int nproc, int rank)
Initialise le groupe_TRUST().
static void barrier()
Synchronise tous les processeurs du groupe courant (attend que tous les processeurs soient arrives a ...