ECP-VELOC Components
User documentation for all components
shuffile_util.h
Go to the documentation of this file.
1 #ifndef SHUFFILE_UTIL_H
2 #define SHUFFILE_UTIL_H
3 
4 #include "mpi.h"
5 #include "kvtree.h"
6 
7 #define SHUFFILE_SUCCESS (0)
8 #define SHUFFILE_FAILURE (1)
9 
10 #define SHUFFILE_VERSION "0.1.0"
11 
12 #define SHUFFILE_MAX_FILENAME (1024)
13 
14 extern int shuffile_debug;
15 extern int shuffile_rank;
16 extern char* shuffile_hostname;
17 
18 extern int shuffile_mpi_buf_size;
19 extern size_t shuffile_page_size;
20 
26 void shuffile_err(const char *fmt, ...);
27 
29 void shuffile_warn(const char *fmt, ...);
30 
32 void shuffile_dbg(int level, const char *fmt, ...);
33 
35 void shuffile_abort(int rc, const char *fmt, ...);
36 
39 #define SHUFFILE_MALLOC(X) shuffile_malloc(X, __FILE__, __LINE__);
40 void* shuffile_malloc(size_t size, const char* file, int line);
41 
43 void shuffile_free(void* ptr);
44 
46 void* shuffile_align_malloc(size_t size, size_t align);
47 
49 void shuffile_align_free(void* buf);
50 
55  const char* send_str, int send_rank,
56  char** recv_str, int recv_rank,
57  MPI_Comm comm
58 );
59 
61  const char* file_send, int rank_send,
62  char* file_recv, size_t size_recv, int rank_recv,
63  const char* dir_recv, MPI_Comm comm
64 );
65 
67 int shuffile_alltrue(int flag, MPI_Comm comm);
68 
69 #include "kvtree.h"
70 
71 #define COPY_FILES (0)
72 #define MOVE_FILES (1)
73 
75  int swap_type,
76  const char* file_send, kvtree* meta_send, int rank_send,
77  const char* file_recv, kvtree* meta_recv, int rank_recv,
78  MPI_Comm comm
79 );
80 
81 #endif
shuffile_align_malloc
void * shuffile_align_malloc(size_t size, size_t align)
shuffile_debug
int shuffile_debug
shuffile_rank
int shuffile_rank
shuffile_align_free
void shuffile_align_free(void *buf)
shuffile_swap_files
int shuffile_swap_files(int swap_type, const char *file_send, kvtree *meta_send, int rank_send, const char *file_recv, kvtree *meta_recv, int rank_recv, MPI_Comm comm)
shuffile_swap_file_names
int shuffile_swap_file_names(const char *file_send, int rank_send, char *file_recv, size_t size_recv, int rank_recv, const char *dir_recv, MPI_Comm comm)
kvtree.h
This file defines the data structure for a hash, which is an unordered list of elements,...
shuffile_page_size
size_t shuffile_page_size
shuffile_abort
void shuffile_abort(int rc, const char *fmt,...)
shuffile_str_sendrecv
int shuffile_str_sendrecv(const char *send_str, int send_rank, char **recv_str, int recv_rank, MPI_Comm comm)
shuffile_hostname
char * shuffile_hostname
shuffile_mpi_buf_size
int shuffile_mpi_buf_size
shuffile_err
void shuffile_err(const char *fmt,...)
shuffile_warn
void shuffile_warn(const char *fmt,...)
shuffile_malloc
void * shuffile_malloc(size_t size, const char *file, int line)
shuffile_free
void shuffile_free(void *ptr)
shuffile_alltrue
int shuffile_alltrue(int flag, MPI_Comm comm)
shuffile_dbg
void shuffile_dbg(int level, const char *fmt,...)