123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- #ifndef __STARPU_MPI_PRIVATE_H__
- #define __STARPU_MPI_PRIVATE_H__
- #include <starpu.h>
- #include <common/config.h>
- #include "starpu_mpi.h"
- #include "starpu_mpi_fxt.h"
- #include <common/list.h>
- #include <common/utils.h>
- #include <pthread.h>
- #ifdef STARPU_MPI_VERBOSE
- # define _STARPU_MPI_DEBUG(fmt, args ...) { if (!getenv("STARPU_SILENT")) { \
- int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); \
- int yyy; for(yyy=0 ; yyy<=rank ; yyy++) fprintf(stderr, " "); \
- fprintf(stderr, "[%d][starpu_mpi][%s] " fmt , rank, __func__ ,##args); \
- fflush(stderr); }}
- #else
- # define _STARPU_MPI_DEBUG(fmt, args ...)
- #endif
- #ifdef STARPU_MPI_VERBOSE0
- # define _STARPU_MPI_LOG_IN() { if (!getenv("STARPU_SILENT")) { \
- int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); \
- int yyy; for(yyy=0 ; yyy<=rank ; yyy++) fprintf(stderr, " "); \
- fprintf(stderr, "[%d][starpu_mpi][%s] -->\n", rank, __func__ ); \
- fflush(stderr); }}
- # define _STARPU_MPI_LOG_OUT() { if (!getenv("STARPU_SILENT")) { \
- int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); \
- int yyy; for(yyy=0 ; yyy<=rank ; yyy++) fprintf(stderr, " "); \
- fprintf(stderr, "[%d][starpu_mpi][%s] <--\n", rank, __func__ ); \
- fflush(stderr); }}
- #else
- # define _STARPU_MPI_LOG_IN()
- # define _STARPU_MPI_LOG_OUT()
- #endif
- #define SEND_REQ 0
- #define RECV_REQ 1
- #define WAIT_REQ 2
- #define TEST_REQ 3
- #define BARRIER_REQ 4
- LIST_TYPE(_starpu_mpi_req,
-
- starpu_data_handle_t data_handle;
-
- MPI_Datatype datatype;
-
- int srcdst;
- int mpi_tag;
- MPI_Comm comm;
- void (*func)(struct _starpu_mpi_req *);
- MPI_Status *status;
- MPI_Request request;
- int *flag;
- int ret;
- pthread_mutex_t req_mutex;
- pthread_cond_t req_cond;
- unsigned request_type;
- unsigned submitted;
- unsigned completed;
-
- struct _starpu_mpi_req *other_request;
-
- unsigned detached;
- void *callback_arg;
- void (*callback)(void *);
- );
- #endif // __STARPU_MPI_PRIVATE_H__
|