27#ifndef MPISYNC_H_INCLUDED
28#define MPISYNC_H_INCLUDED
31#error MPI not available
92 const std::string mask,
93 const std::vector<std::string>
fields,
94 const std::vector<unsigned int> procs,
110 cl_event
_execute(
const std::vector<cl_event> events);
140 void setupReceivers();
143 std::string _mask_name;
148 std::vector<std::string> _field_names;
150 std::vector<InputOutput::ArrayVariable*> _fields;
152 std::vector<InputOutput::ArrayVariable*> _fields_sorted;
155 std::vector<uicl> _procs;
171 std::vector<UnSort*> _field_sorters;
200 const std::string vars_prefix,
202 const std::vector<InputOutput::ArrayVariable*>
fields,
203 const std::vector<void*> field_hosts,
213 inline const std::string
name()
const {
return _name; }
250 std::vector<InputOutput::ArrayVariable*>
_fields;
291 const std::string vars_prefix,
293 const std::vector<InputOutput::ArrayVariable*>
fields,
294 const std::vector<void*> field_hosts,
309 void setupSubMaskMems();
315 void setupOpenCL(
const std::string kernel_name);
320 void setupReduction(
const std::string var_name);
329 cl_kernel _n_offset_kernel;
341 cl_kernel _n_send_kernel;
347 size_t _global_work_size;
349 size_t _local_work_size;
375 const std::string vars_prefix,
377 const std::vector<InputOutput::ArrayVariable*>
fields,
378 const std::vector<void*> field_hosts,
403 size_t _local_work_size;
408 std::vector<void*> _fields_send;
411 std::vector<Sender*> _senders;
423 std::vector<void*> _fields_recv;
426 std::vector<Receiver*> _receivers;
The calculation main entry point. (See Aqua::CalcServer::CalcServer for details)
OpenCL kernel kernel based tool. (see Aqua::CalcServer::Kernel for details)
Methods to perform a radix sort using the GPU (or any device supported by OpenCL)....
Reductions, like scans, prefix sums, maximum or minimum, etc... (See Aqua::CalcServer::Reduction for ...
Set a scalar variable. (See Aqua::CalcServer::SetScalar for details)
Set all the components of an array with the desired value. (See Aqua::CalcServer::Set for details)
UnSort Recover the original id of each particle. (See Aqua::CalcServer::UnSort for details)
Profiler for tools based on OpenCL enqueued commands.
Definition Kernel.hpp:54
Exchanger(const std::string name, const std::string vars_prefix, InputOutput::ArrayVariable *mask, const std::vector< InputOutput::ArrayVariable * > fields, const std::vector< void * > field_hosts, const uicl proc)
size_t _n
Total number of elements.
Definition MPISync.hpp:256
static const MPIType typeToMPI(std::string t)
MPI type descriptor.
uicl proc() const
Processor.
Definition MPISync.hpp:218
~Exchanger()
Definition MPISync.hpp:208
std::string _var_prefix
Variables prefix.
Definition MPISync.hpp:244
std::vector< InputOutput::ArrayVariable * > _fields
Field.
Definition MPISync.hpp:250
InputOutput::ArrayVariable * _mask
Mask.
Definition MPISync.hpp:247
std::vector< void * > _fields_host
Host memory arrays to download, send, receive and upload the data.
Definition MPISync.hpp:259
const std::string name() const
Parent tool name.
Definition MPISync.hpp:213
uicl _proc
Processor.
Definition MPISync.hpp:253
void execute(EventProfile *profiler)
Receive the information.
Receiver(const std::string name, const std::string vars_prefix, InputOutput::ArrayVariable *mask, const std::vector< InputOutput::ArrayVariable * > fields, const std::vector< void * > field_hosts, const uicl proc, InputOutput::Variable *n_offset)
Sender(const std::string name, const std::string vars_prefix, InputOutput::ArrayVariable *mask, const std::vector< InputOutput::ArrayVariable * > fields, const std::vector< void * > field_hosts, const uicl proc)
void execute(EventProfile *profiler)
Send the information.
MPISync(const std::string name, const std::string mask, const std::vector< std::string > fields, const std::vector< unsigned int > procs, bool once=false)
cl_event _execute(const std::vector< cl_event > events)
void name(const std::string tool_name)
Definition Tool.hpp:66
Methods to perform a radix sort using the GPU (or any device supported by OpenCL)....
Definition RadixSort.hpp:94
Reductions, like scans, prefix sums, maximum or minimum, etc...
Definition Reduction.hpp:45
Set a scalar variable.
Definition SetScalar.hpp:176
Set all the components of an array with the desired value.
Definition Set.hpp:40
__kernel void fields(__global const unsigned int *iset, __global const uint *isplit, __global const usize *mybuffer, __global const unsigned int *ilevel, __global const float *split_weight, __global float *m0, __global float *m, __global vec *r, __global vec *u, __global vec *dudt, __global float *rho, __global float *drhodt, __constant float *dr_level0, usize N, LINKLIST_LOCAL_PARAMS)
Collect the children, and the seed itself, in order to compute the field values of the buffer partner...
Definition Coalesce.cl:426
Calculation server name space.
Definition Assert.cpp:32
Main AQUAgpusph namespace.
Definition ArgumentsManager.cpp:50
#define uicl
Unsigned integer number.
Definition sphPrerequisites.hpp:85
Data structure to store the type information required by MPI.
Definition MPISync.hpp:228
size_t n
Number of components.
Definition MPISync.hpp:230
MPI_Datatype t
Underlying type, in MPI format.
Definition MPISync.hpp:232