#include <stdio.h>
+#include "visibility.h"
#include "atomic.h"
};
+/** Thread setaffinity support status enumeration */
+enum tMPI_Thread_setaffinity_support
+{
+ TMPI_SETAFFINITY_SUPPORT_NO = 0, /*!< Setting thread affinity not
+ supported */
+ TMPI_SETAFFINITY_SUPPORT_YES = 1 /*!< Setting thread affinity supported */
+};
+
+
+
+
/** handle a fatal error.
\param file source code file name of error.
\param line source code line number of error.
\param message format string for error message.
*/
+TMPI_EXPORT
void tMPI_Fatal_error(const char *file, int line, const char *message, ...);
/** Convenience macro for the first two arguments to tMPI_Fatal_error(). */
#define TMPI_FARGS __FILE__,__LINE__
*
* \return 1 if threads are supported, 0 if not.
*/
+TMPI_EXPORT
enum tMPI_Thread_support tMPI_Thread_support(void);
If this number cannot be determined for the current architecture,
0 is returned.
*/
+TMPI_EXPORT
int tMPI_Thread_get_hw_number(void);
*
* \return Status - 0 on success, or an error code.
*/
+TMPI_EXPORT
int tMPI_Thread_create(tMPI_Thread_t *thread,
void* (*start_routine)(void *),
void* arg);
-/** Create a new thread with processor affinity
- *
- * The new thread will call start_routine() with the argument arg.
- *
- * The new thread will have processor affinity assigned in a
- * round-robin way, starting at processor 1. The first thread to call
- * this function will be assigned to processor 0.
- *
- * This means that this funtion should ONLY be called when starting a
- * thread on each processor: in any other case, this will lead to
- * imbalances because processors 0 and 1 will be oversubscribed.
- *
- * Please be careful not to change arg after calling this function.
- *
- * \param[out] thread Pointer to thread ID
- * \param[in] start_routine The function to call in the new thread
- * \param[in] arg Argument to call with
- *
- * \return Status - 0 on success, or an error code.
- */
-int tMPI_Thread_create_aff(tMPI_Thread_t *thread,
- void *(*start_routine)(void *),
- void *arg);
-
-
*
* \return 0 if the join went ok, or a non-zero error code.
*/
+TMPI_EXPORT
int tMPI_Thread_join(tMPI_Thread_t thread, void **value_ptr);
* join them can read this value if they try.
* \return
*/
+TMPI_EXPORT
void tMPI_Thread_exit(void *value_ptr);
* \param thread Handle to thread we want to see dead.
* \return 0 or a non-zero error message.
*/
+TMPI_EXPORT
int tMPI_Thread_cancel(tMPI_Thread_t thread);
* example assign thread affinities to any thread.
*
* \return A thread ID of the calling thread */
+TMPI_EXPORT
tMPI_Thread_t tMPI_Thread_self(void);
* \param[in] t2 Thread ID 2
* \return non-zero if the thread structs refer to the same thread,
0 if the threads are different*/
+TMPI_EXPORT
int tMPI_Thread_equal(tMPI_Thread_t t1, tMPI_Thread_t t2);
+/** Check whether this platform supports setting of thread affinity
+ *
+ * This function returns TMPI_SETAFFINITY_SUPPORT_YES if setting thread
+ * affinity is supported by the platform, and TMPI_SETAFFINITY_SUPPORT_NO
+ * if not. If this function returns 0, the function
+ * tMPI_Thread_setaffinity_single will simply return 0 itself, effectively
+ * ignoring the request.
+ *
+ * \return TMPI_SETAFFINITY_SUPPORT_YES if setting affinity is supported,
+ TMPI_SETAFFINITY_SUPPORT_NO otherwise */
+TMPI_EXPORT
+enum tMPI_Thread_setaffinity_support tMPI_Thread_setaffinity_support(void);
+
+
/** Set thread affinity to a single core
*
* This function sets the thread affinity of a thread to a a specific
* by tMPI_Thread_get_hw_number().
*
* \param[in] thread Thread ID of the thread to set affinity for
- * \param[in] nr Processor number to set affinity to */
+ * \param[in] nr Processor number to set affinity to
+ * \return zero on success, non-zero on error */
+TMPI_EXPORT
int tMPI_Thread_setaffinity_single(tMPI_Thread_t thread, unsigned int nr);
* \param mtx Pointer to a mutex opaque type.
* \return 0 or an error code.
*/
+TMPI_EXPORT
int tMPI_Thread_mutex_init(tMPI_Thread_mutex_t *mtx);
* \param mtx Pointer to a mutex variable to get rid of.
* \return 0 or a non-zero error code.
*/
+TMPI_EXPORT
int tMPI_Thread_mutex_destroy(tMPI_Thread_mutex_t *mtx);
* \param mtx Pointer to the mutex to lock
* \return 0 or a non-zero error code.
*/
+TMPI_EXPORT
int tMPI_Thread_mutex_lock(tMPI_Thread_mutex_t *mtx);
* \param mtx Pointer to the mutex to try and lock
* \return 0 or a non-zero return error code.
*/
+TMPI_EXPORT
int tMPI_Thread_mutex_trylock(tMPI_Thread_mutex_t *mtx);
* \param mtx Pointer to the mutex to release
* \return 0 or a non-zero error code.
*/
+TMPI_EXPORT
int tMPI_Thread_mutex_unlock(tMPI_Thread_mutex_t *mtx);
* \return status - 0 on sucess or a standard error code.
*
*/
+TMPI_EXPORT
int tMPI_Thread_key_create(tMPI_Thread_key_t *key, void (*destructor)(void *));
* \param key Opaque key type to destroy
* \return 0 or a non-zero error message.
*/
+TMPI_EXPORT
int tMPI_Thread_key_delete(tMPI_Thread_key_t key);
* \param key Thread-specific-storage handle.
* \return Pointer-to-void, the value of the data in this thread.
*/
+TMPI_EXPORT
void * tMPI_Thread_getspecific(tMPI_Thread_key_t key);
* \param value What to set the data to (pointer-to-void).
* \return 0 or a non-zero error message.
*/
+TMPI_EXPORT
int tMPI_Thread_setspecific(tMPI_Thread_key_t key, void *value);
* \param init_routine Function to call exactly once
* \return 0 or a non-zero error message.
*/
+TMPI_EXPORT
int tMPI_Thread_once(tMPI_Thread_once_t *once_data,
void (*init_routine)(void));
* \param cond Pointer to previously allocated condition variable
* \return 0 or a non-zero error message.
*/
+TMPI_EXPORT
int tMPI_Thread_cond_init(tMPI_Thread_cond_t *cond);
* \param cond Pointer to condition variable.
* \return 0 or a non-zero error message.
*/
+TMPI_EXPORT
int tMPI_Thread_cond_destroy(tMPI_Thread_cond_t *cond);
*
* \return 0 or a non-zero error message.
*/
+TMPI_EXPORT
int tMPI_Thread_cond_wait(tMPI_Thread_cond_t *cond,
tMPI_Thread_mutex_t *mtx);
*
* \return 0 or a non-zero error message.
*/
+TMPI_EXPORT
int tMPI_Thread_cond_signal(tMPI_Thread_cond_t *cond);
*
* \return 0 or a non-zero error message.
*/
+TMPI_EXPORT
int tMPI_Thread_cond_broadcast(tMPI_Thread_cond_t *cond);
* will be released after \a count calls to
* tMPI_Thread_barrier_wait().
*/
+TMPI_EXPORT
int tMPI_Thread_barrier_init(tMPI_Thread_barrier_t *barrier, int count);
* \param barrier Pointer to previously
* initialized barrier.
*/
+TMPI_EXPORT
int tMPI_Thread_barrier_destroy(tMPI_Thread_barrier_t *barrier);
*
* \return The last thread returns -1, all the others 0.
*/
+TMPI_EXPORT
int tMPI_Thread_barrier_wait(tMPI_Thread_barrier_t *barrier);
/*! \} */
library for this is in C. */
#include <stddef.h>
+#include "visibility.h"
#ifdef __cplusplus
extern "C"
These are MPI data types as specified by the MPI standard.
Note that not all are available. */
/*! \{ */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_CHAR; /**< char */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_SHORT; /**< short */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_INT; /**< int */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_LONG; /**< long */
#ifdef SIZEOF_LONG_LONG_INT
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_LONG_LONG; /**< long long */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_LONG_LONG_INT; /**< long long int */
#endif
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_SIGNED_CHAR; /**< signed char */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_UNSIGNED_CHAR; /**< unsigned char */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_UNSIGNED_SHORT; /**< unsigned short */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_UNSIGNED; /**< unsigned int */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_UNSIGNED_LONG; /**< unsigned long */
#ifdef SIZEOF_LONG_LONG_INT
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_UNSIGNED_LONG_LONG; /**< unsigned long long */
#endif
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_FLOAT; /**< float */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_DOUBLE; /**< double */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_LONG_DOUBLE; /**< long double */
/*extern tMPI_Datatype tMPI_UNSIGNED_WCHAR */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_BYTE; /**< byte (for binary
xmissions) */
+TMPI_EXPORT
extern const tMPI_Datatype TMPI_POINTER; /**< pointer (thread_mpi
specific) */
/** Pre-initialized communicator with all available threads. */
+TMPI_EXPORT
extern tMPI_Comm TMPI_COMM_WORLD;
int start_function(int argc, char *argv[]);
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Init(int *argc, char ***argv,
int (*start_function)(int, char**));
\return TMPI_FAILURE on failure, TMPI_SUCCESS on succes (after all
threads have finished if main_thread_returns=true). */
+TMPI_EXPORT
int tMPI_Init_fn(int main_thread_returns, int N,
tMPI_Affinity_strategy aff_strategy,
void (*start_function)(void*), void *arg);
\param[out] nthreads the number of threads
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Get_N(int *argc, char ***argv, const char *optname, int *nthreads);
/** Waits for all other threads to finish and cleans up
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Finalize(void);
\param[in] errorcode Error code to exit with
\return Never returns. */
+TMPI_EXPORT
int tMPI_Abort(tMPI_Comm comm, int errorcode);
/** whether tMPI_Init, but not yet tMPI_Finalize, has been run
FALSE if not.
\return always returns TMPI_SUCCESS. */
+TMPI_EXPORT
int tMPI_Initialized(int *flag);
/** Determine whether tMPI_Finalize has been run.
called, FALSE if not.
\return always returns TMPI_SUCCESS. */
+TMPI_EXPORT
int tMPI_Finalized(int *flag);
/** \} */
\param[out] errhandler The error handler.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Create_errhandler(tMPI_Errhandler_fn *function,
tMPI_Errhandler *errhandler);
\param[in] errhandler The error handler.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Errhandler_free(tMPI_Errhandler *errhandler);
/** Set the error handler.
\param[in] errhandler the error handler.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
-
+TMPI_EXPORT
int tMPI_Comm_set_errhandler(tMPI_Comm comm, tMPI_Errhandler errhandler);
+
/** get the error handler.
Gets the error handler associated with a comm
\param[out] errhandler the error handler.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
-
+TMPI_EXPORT
int tMPI_Comm_get_errhandler(tMPI_Comm comm, tMPI_Errhandler *errhandler);
/** get the error string associated with an error code.
never be longer than TMPI_MAX_ERROR_STRING.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Error_string(int errorcode, char *string, size_t *resultlen);
/** \} */
for some reason defines all sizes as int
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Get_processor_name(char *name, int *resultlen);
/** get a time value as a double, in seconds.
\return time value.
*/
+TMPI_EXPORT
double tMPI_Wtime(void);
/** get the resolution of tMPI_Wtime as a double, in seconds
\return time resolution. */
+TMPI_EXPORT
double tMPI_Wtick(void);
#ifndef DOXYGEN
\param[in] group The group.
\param[out] size Size.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Group_size(tMPI_Group group, int *size);
/** Get the rank of a thread in a group
\param[out] rank Variable for the rank, or TMPI_UNDEFINED
if not in group.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Group_rank(tMPI_Group group, int *rank);
/** Create a new group as a the collection of threads with given ranks.
\param[out] newgroup The new group.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Group_incl(tMPI_Group group, int n, int *ranks, tMPI_Group *newgroup);
/** Get a pointer to the group in the comm.
\param[out] group The comm's group.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Comm_group(tMPI_Comm comm, tMPI_Group *group);
/** De-allocate a group
\param[in] group The group to de-allocate.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Group_free(tMPI_Group *group);
/*! \} */
\param[in] comm The comm to query.
\param[out] size The comm size.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Comm_size(tMPI_Comm comm, int *size);
/** get the rank in comm of the current process
\param[in] comm The comm to query.
\param[out] rank Thread rank in comm.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Comm_rank(tMPI_Comm comm, int *rank);
/** Compare two comms. Returns TMPI_IDENT if the two comms point to
\param[out] result The output result, one of the values
described above.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Comm_compare(tMPI_Comm comm1, tMPI_Comm comm2, int *result);
\param[in] comm The comm to free.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Comm_free(tMPI_Comm *comm);
/** Create a comm based on group membership.
\param[out] newcomm The new comm.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Comm_create(tMPI_Comm comm, tMPI_Group group, tMPI_Comm *newcomm);
/** Split up a group into same-colored sub-groups ordered by key.
\param[in] key This thread's key (determines rank).
\param[out] newcomm The new comm.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Comm_split(tMPI_Comm comm, int color, int key, tMPI_Comm *newcomm);
/** Make a duplicate of a comm.
\param[in] comm The originating comm.
\param[in] newcomm The new comm.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Comm_dup(tMPI_Comm comm, tMPI_Comm *newcomm);
/*! \} */
\param[out] status The type of topology.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Topo_test(tMPI_Comm comm, int *status);
/** Get the dimensionality of a comm with a topology.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Cartdim_get(tMPI_Comm comm, int *ndims);
/** Get the size and pbc a of a comm with a Cartesian topology has.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Cart_get(tMPI_Comm comm, int maxdims, int *dims, int *periods,
int *coords);
\param[out] rank The rank associated with the coordinates.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Cart_rank(tMPI_Comm comm, int *coords, int *rank);
/** Get coordinates of a process rank in a Cartesian topology.
\param[out] coords The coordinates in each dimension.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Cart_coords(tMPI_Comm comm, int rank, int maxdims, int *coords);
/** Get optimal rank this process would have in a Cartesian topology.
\param[out] newrank The rank the thread would have given the topology.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Cart_map(tMPI_Comm comm, int ndims, int *dims, int *periods,
int *newrank);
\param[out] comm_cart The new comm with Cartesian topology.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Cart_create(tMPI_Comm comm_old, int ndims, int *dims, int *periods,
int reorder, tMPI_Comm *comm_cart);
\param[out] newcomm The new split communicator
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Cart_sub(tMPI_Comm comm, int *remain_dims, tMPI_Comm *newcomm);
/*! \} */
\param[in] oldtype The old data type.
\param[out] newtype The new data type (still needs to be committed).
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Type_contiguous(int count, tMPI_Datatype oldtype,
tMPI_Datatype *newtype);
\param[in,out] datatype The new datatype.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Type_commit(tMPI_Datatype *datatype);
/*! \} */
\param[in] tag The message tag.
\param[in] comm The shared communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Send(void* buf, int count, tMPI_Datatype datatype, int dest,
int tag, tMPI_Comm comm);
\param[in] comm The shared communicator.
\param[out] status The message status.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Recv(void* buf, int count, tMPI_Datatype datatype, int source,
int tag, tMPI_Comm comm, tMPI_Status *status);
\param[in] comm The shared communicator.
\param[out] status The received message status.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Sendrecv(void *sendbuf, int sendcount, tMPI_Datatype sendtype,
int dest, int sendtag, void *recvbuf, int recvcount,
tMPI_Datatype recvtype, int source, int recvtag,
\param[out] request The request object that can be used in tMPI_Wait(),
tMPI_Test, etc.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Isend(void* buf, int count, tMPI_Datatype datatype, int dest,
int tag, tMPI_Comm comm, tMPI_Request *request);
\param[out] request The request object that can be used in tMPI_Wait(),
tMPI_Test, etc.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Irecv(void* buf, int count, tMPI_Datatype datatype, int source,
int tag, tMPI_Comm comm, tMPI_Request *request);
\param[out] status Message status (can be set to TMPI_STATUS_IGNORE).
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Test(tMPI_Request *request, int *flag, tMPI_Status *status);
/** Wait until a message is transferred.
\param[out] status Message status.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Wait(tMPI_Request *request, tMPI_Status *status);
be set to TMPI_STATUSES_IGNORE).
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Waitall(int count, tMPI_Request *array_of_requests,
tMPI_Status *array_of_statuses);
be set to TMPI_STATUSES_IGNORE).
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Testall(int count, tMPI_Request *array_of_requests, int *flag,
tMPI_Status *array_of_statuses);
associated with completed request.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Waitany(int count, tMPI_Request *array_of_requests,
int *index, tMPI_Status *status);
associated with completed request.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Testany(int count, tMPI_Request *array_of_requests,
int *index, int *flag, tMPI_Status *status);
be set to TMPI_STATUSES_IGNORE).
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Waitsome(int incount, tMPI_Request *array_of_requests,
int *outcount, int *array_of_indices,
tMPI_Status *array_of_statuses);
be set to TMPI_STATUSES_IGNORE).
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Testsome(int incount, tMPI_Request *array_of_requests,
int *outcount, int *array_of_indices,
tMPI_Status *array_of_statuses);
\param[out] count The number of items actually received.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Get_count(tMPI_Status *status, tMPI_Datatype datatype, int *count);
/*! \} */
\param[in] comm The comm object.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Barrier(tMPI_Comm comm);
/*! \} */
\param[in] comm The communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Bcast(void* buffer, int count, tMPI_Datatype datatype, int root,
tMPI_Comm comm);
\param[in] comm The communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Gather(void* sendbuf, int sendcount, tMPI_Datatype sendtype,
void* recvbuf, int recvcount, tMPI_Datatype recvtype, int root,
tMPI_Comm comm);
\param[in] comm The communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Gatherv(void* sendbuf, int sendcount, tMPI_Datatype sendtype,
void* recvbuf, int *recvcounts, int *displs,
tMPI_Datatype recvtype, int root, tMPI_Comm comm);
\param[in] comm The communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Scatter(void* sendbuf, int sendcount, tMPI_Datatype sendtype,
void* recvbuf, int recvcount, tMPI_Datatype recvtype, int root,
tMPI_Comm comm);
\param[in] comm The communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Scatterv(void* sendbuf, int *sendcounts, int *displs,
tMPI_Datatype sendtype, void* recvbuf, int recvcount,
tMPI_Datatype recvtype, int root, tMPI_Comm comm);
\param[in] comm The communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Alltoall(void* sendbuf, int sendcount, tMPI_Datatype sendtype,
void* recvbuf, int recvcount, tMPI_Datatype recvtype,
tMPI_Comm comm);
\param[in] comm The communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Alltoallv(void* sendbuf, int *sendcounts, int *sdispls,
tMPI_Datatype sendtype, void* recvbuf, int *recvcounts,
int *rdispls, tMPI_Datatype recvtype, tMPI_Comm comm);
\param[in] comm The communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Reduce(void* sendbuf, void* recvbuf, int count,
tMPI_Datatype datatype, tMPI_Op op, int root, tMPI_Comm comm);
\param[in] comm The communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Allreduce(void* sendbuf, void* recvbuf, int count,
tMPI_Datatype datatype, tMPI_Op op, tMPI_Comm comm);
\param[in] comm The communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Reduce_fast(void* sendbuf, void* recvbuf, int count,
tMPI_Datatype datatype, tMPI_Op op, int root,
tMPI_Comm comm);
\param[in] comm The communicator.
\return TMPI_SUCCESS on success, TMPI_FAILURE on failure. */
+TMPI_EXPORT
int tMPI_Scan(void* sendbuf, void* recvbuf, int count,
tMPI_Datatype datatype, tMPI_Op op, tMPI_Comm comm);