ECP-VELOC Components
User documentation for all components
Functions | Variables
shuffile_util.h File Reference

shuffile utilies More...

Go to the source code of this file.

Functions

void shuffile_err (const char *fmt,...)
 
void shuffile_warn (const char *fmt,...)
 
void shuffile_dbg (int level, const char *fmt,...)
 
void shuffile_abort (int rc, const char *fmt,...)
 
void * shuffile_malloc (size_t size, const char *file, int line)
 
void shuffile_free (void *ptr)
 
void * shuffile_align_malloc (size_t size, size_t align)
 
void shuffile_align_free (void *buf)
 
int shuffile_str_sendrecv (const char *send_str, int send_rank, char **recv_str, int recv_rank, MPI_Comm comm)
 
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)
 
int shuffile_alltrue (int flag, MPI_Comm comm)
 
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)
 

Variables

int shuffile_debug
 
int shuffile_rank
 
char * shuffile_hostname
 
int shuffile_mpi_buf_size
 
size_t shuffile_page_size
 

Function Documentation

◆ shuffile_abort()

void shuffile_abort ( int  rc,
const char *  fmt,
  ... 
)

print abort message and kill run

◆ shuffile_align_free()

void shuffile_align_free ( void *  buf)

frees a blocked allocated with a call to shuffile_align_malloc

◆ shuffile_align_malloc()

void* shuffile_align_malloc ( size_t  size,
size_t  align 
)

allocates a block of memory and aligns it to specified alignment

◆ shuffile_alltrue()

int shuffile_alltrue ( int  flag,
MPI_Comm  comm 
)

returns true (non-zero) if flag on each process in comm is true

◆ shuffile_dbg()

void shuffile_dbg ( int  level,
const char *  fmt,
  ... 
)

print message to stdout if shuffile_debug is set and it is >= level

◆ shuffile_err()

void shuffile_err ( const char *  fmt,
  ... 
)

print error message to stdout

◆ shuffile_free()

void shuffile_free ( void *  ptr)

pass address of pointer to be freed, frees memory if not NULL and sets pointer to NULL

◆ shuffile_malloc()

void* shuffile_malloc ( size_t  size,
const char *  file,
int  line 
)

◆ shuffile_str_sendrecv()

int shuffile_str_sendrecv ( const char *  send_str,
int  send_rank,
char **  recv_str,
int  recv_rank,
MPI_Comm  comm 
)

sends a NUL-terminated string to a process, allocates space and recieves a NUL-terminated string from a process, can specify MPI_PROC_NULL as either send or recv rank

◆ 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 
)

◆ 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_warn()

void shuffile_warn ( const char *  fmt,
  ... 
)

print warning message to stdout

Variable Documentation

◆ shuffile_debug

int shuffile_debug

◆ shuffile_hostname

char* shuffile_hostname

◆ shuffile_mpi_buf_size

int shuffile_mpi_buf_size

◆ shuffile_page_size

size_t shuffile_page_size

◆ shuffile_rank

int shuffile_rank