File: mpibig.h

package info (click to toggle)
wsclean 3.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,296 kB
  • sloc: cpp: 129,246; python: 22,066; sh: 360; ansic: 230; makefile: 185
file content (31 lines) | stat: -rw-r--r-- 1,054 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef DISTRIBUTED_MPI_BIG_H_
#define DISTRIBUTED_MPI_BIG_H_

#include <mpi.h>

namespace wsclean {

/**
 * Send a big message. If count does not fit in an integer, the message is split
 * into multiple messages. The first 8 bytes of the buf are changed and used to
 * communicate the number of messages. Therefore the first 8 bytes HAVE to be
 * reserved. The parameters are equivallent to MPI_Send, except it will always
 * use the type MPI_Byte.
 * @returns MPI_SUCCESS when successful.
 */
int MPI_Send_Big(unsigned char* buf, size_t count, int dest, int tag,
                 MPI_Comm comm, size_t maximum_message_size);

/** Receives a big message.
 * The first 8 bytes of the buffer will receive the number of
 * packages. The count parameter should match the one given to @ref
 * MPI_Send_Big().
 * @returns MPI_SUCCESS when successful.
 */
int MPI_Recv_Big(unsigned char* buf, size_t count, int source, int tag,
                 MPI_Comm comm, MPI_Status* status,
                 size_t maximum_message_size);

}  // namespace wsclean

#endif