pcd_mpi_safe/pcs_mpi_safe_intf.cpp File Reference

#include <mpi.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <stdint.h>
#include <vector>
#include <stack>
#include <memory>
#include <deque>
#include <algorithm>
#include <limits>
#include "../include/pch_intf.h"
#include "../include/uth_log.h"
#include "../include/uth_system.h"
#include "../include/uth_io_results.h"
Include dependency graph for pcs_mpi_safe_intf.cpp:

Classes

struct  PCT_TAG
struct  PCT_MSG_DESC
struct  pct_buffer

Typedefs

typedef char PCT_BYTE

Enumerations

enum  PCE_Type {
  PCE_CHAR = 0, PCE_INT, PCE_DOUBLE, PCE_LONG_INT,
  PCE_BUFFER, PCE_LAST
}

Functions

int pcr_print_mpi_error (int error_code)
 Internal functions etc.
int PCR_HANDLE_MPI (int mpi_return_code, const char *msg)
int pcr_get_free_buffer ()
int pcr_buffer_pack_type (const int Message_id, const int Buffer_id, const int Nr_types, const PCT_BYTE *Bytes, const PCE_Type Type, const MPI_Datatype Mpi_type)
int pcr_buffer_unpack_type (int Message_id, int Buffer_id, int Nr_types, PCT_BYTE *Bytes, PCE_Type Type, MPI_Datatype Mpi_type)
template<PCE_Type T>
int pcr_do_send (const int Dest_proc_id, const int Message_id, const int Num, const PCT_BYTE *Bytes)
template<>
int pcr_do_send< PCE_BUFFER > (const int Dest_proc_id, const int Message_id, const int Buffer_id, const PCT_BYTE *)
void pcr_next_msg_desc (PCT_MSG_DESC &desc)
template<PCE_Type T>
int pcr_do_receive (const int Sender_proc_ID, const int Message_id, const int Nr_num, char *Array)
template<>
int pcr_do_receive< PCE_BUFFER > (const int Sender_proc_ID, const int Message_id, const int, char *Array)
int pcr_is_parallel_initialized (void)
int pcr_my_proc_rank (void)
int pcr_my_proc_id (void)
int pcr_nr_proc (void)
int pcr_test ()
int pcr_init_parallel (int *argc, char **argv, char *Work_dir, char *interactive_output_name, FILE **interactive_output_p, int *Nr_pr, int *My_id)
int pcr_print_master ()
int pcr_send_buffer_open (const int Message_id, int Buffer_size)
int pcr_buffer_pack_int (const int Message_id, const int Buffer_id, const int Nr_num, const int *Numbers)
int pcr_buffer_pack_double (const int Message_id, const int Buffer_id, const int Nr_num, const double *Numbers)
int pcr_buffer_pack_char (const int Message_id, const int Buffer_id, const int Nr_num, const char *Numbers)
int pcr_buffer_pack_long_int (const int Message_id, const int Buffer_id, const int Nr_num, const long int *Numbers)
int pcr_buffer_send (int Message_id, int Buffer_id, int Dest_proc)
 pcr_buffer_send
int pcr_buffer_source_id (int Buffer)
int pcr_buffer_receive (int Message_id, int Sender_proc, int Buffer_size)
 Version with support for out-of-order message recieving.
int pcr_buffer_bcast (int Message_id, int Buffer_id, int Sender_proc)
int pcr_buffer_unpack_int (int Message_id, int Buffer_id, int Nr_num, int *Numbers)
int pcr_buffer_unpack_double (int Message_id, int Buffer_id, int Nr_num, double *Numbers)
int pcr_buffer_unpack_char (int Message_id, int Buffer_id, int Nr_num, char *Numbers)
int pcr_buffer_unpack_long_int (int Message_id, int Buffer_id, int Nr_num, long int *Numbers)
int pcr_recv_buffer_close (int Message_id, int Buffer_id)
int pcr_send_int (const int Dest_proc_id, const int Message_id, const int Nr_num, const int *Numbers)
int pcr_send_double (const int Dest_proc_id, const int Message_id, const int Nr_num, const double *Numbers)
int pcr_receive_int (const int Sender_proc_id, const int Message_id, const int Nr_num, int *Numbers)
int pcr_receive_double (const int Sender_proc_id, const int Message_id, const int Nr_num, double *Numbers)
int pcr_send_long (const int Dest_proc_id, const int Message_id, const int Nr_num, const long int *Numbers)
 *---------------------------------------------------------
int pcr_receive_long (const int Sender_proc_id, const int Message_id, const int Nr_num, long int *Numbers)
int pcr_send_bytes (const int Dest_proc_id, const int Message_id, const int Nr_bytes, const uint8_t *Bytes)
int pcr_receive_bytes (const int Sender_proc_id, const int Message_id, const int Nr_bytes, uint8_t *Bytes)
int pcr_bcast_double (const int Sender_proc_id, const int Nr_num, double *Numbers)
 *---------------------------------------------------------
int pcr_bcast_int (int Sender_proc_id, int Nr_num, int *Numbers)
int pcr_bcast_char (int Sender_proc_id, int Nr_num, char *Numbers)
int pcr_allreduce_sum_int (const int Nr_num, const int *Numbers, int *Numbers_reduced)
int pcr_allreduce_sum_double (const int Nr_num, const double *Numbers, double *Numbers_reduced)
int pcr_allreduce_max_int (const int Nr_num, const int *Numbers, int *Numbers_reduced)
int pcr_allreduce_max_double (int Nr_num, double *Numbers, double *Numbers_reduced)
int pcr_exit_parallel ()
int pcr_barrier (void)
int pcr_allgather_int (int const send_values[], int const n_send_values, int gathered_values[], int const n_gathered_values)
int pcr_is_this_master ()

Variables

const int PCC_DEFAULT_BUFFER_SIZE = 1*1000000 + MPI_BSEND_OVERHEAD
const int PCC_MPI_ATTACHED_BUFFER_SIZE = 1000*1000000+ MPI_BSEND_OVERHEAD
const int PCC_ANY_PROC = MPI_ANY_SOURCE
const int PCC_USE_CURRENT_BUFFER = -1
const int PCC_MASTER_PROC_ID = 1
const int PCC_DEFAULT_COMM = 0
const int PCC_NEIGH_GROUP = 1
const int PCC_OK = MPI_SUCCESS
const MPI_Datatype PCE_Type2MPI_TYPE [PCE_LAST]
const PCE_Type PCE_Type_sizeof [PCE_LAST]
FILE * pcv_output_stream
std::vector< PCT_BYTEpcv_MPI_buffer
std::vector< pct_bufferpcv_buffers
std::stack< int > pcv_empty_buffers
std::deque< PCT_MSG_DESCpcv_recieved_and_waiting_msgs
std::deque< char * > pcv_recieved_and_waiting_data
int pcv_my_rank = -1
int pcv_nr_proc = -1
int pcv_my_proc_id = -1

Typedef Documentation

typedef char PCT_BYTE

Enumeration Type Documentation

enum PCE_Type
Enumerator:
PCE_CHAR 
PCE_INT 
PCE_DOUBLE 
PCE_LONG_INT 
PCE_BUFFER 
PCE_LAST 

Function Documentation

int pcr_buffer_pack_long_int ( const int  Message_id,
const int  Buffer_id,
const int  Nr_num,
const long int *  Numbers 
)

Here is the call graph for this function:

int pcr_buffer_pack_type ( const int  Message_id,
const int  Buffer_id,
const int  Nr_types,
const PCT_BYTE Bytes,
const PCE_Type  Type,
const MPI_Datatype  Mpi_type 
) [inline]

Here is the call graph for this function:

Here is the caller graph for this function:

int pcr_buffer_unpack_long_int ( int  Message_id,
int  Buffer_id,
int  Nr_num,
long int *  Numbers 
)

Here is the call graph for this function:

int pcr_buffer_unpack_type ( int  Message_id,
int  Buffer_id,
int  Nr_types,
PCT_BYTE Bytes,
PCE_Type  Type,
MPI_Datatype  Mpi_type 
) [inline]

Here is the call graph for this function:

Here is the caller graph for this function:

template<PCE_Type T>
int pcr_do_receive ( const int  Sender_proc_ID,
const int  Message_id,
const int  Nr_num,
char *  Array 
) [inline]

Here is the call graph for this function:

template<>
int pcr_do_receive< PCE_BUFFER > ( const int  Sender_proc_ID,
const int  Message_id,
const   int,
char *  Array 
) [inline]

Here is the caller graph for this function:

template<PCE_Type T>
int pcr_do_send ( const int  Dest_proc_id,
const int  Message_id,
const int  Num,
const PCT_BYTE Bytes 
) [inline]

Here is the call graph for this function:

template<>
int pcr_do_send< PCE_BUFFER > ( const int  Dest_proc_id,
const int  Message_id,
const int  Buffer_id,
const PCT_BYTE  
) [inline]

Here is the caller graph for this function:

int pcr_get_free_buffer (  )  [inline]

Here is the caller graph for this function:

int PCR_HANDLE_MPI ( int  mpi_return_code,
const char *  msg 
) [inline]

Here is the caller graph for this function:

int pcr_my_proc_rank ( void   ) 
void pcr_next_msg_desc ( PCT_MSG_DESC desc  )  [inline]

Here is the call graph for this function:

Here is the caller graph for this function:

int pcr_print_mpi_error ( int  error_code  ) 

Internal functions etc.

int pcr_receive_long ( const int  Sender_proc_id,
const int  Message_id,
const int  Nr_num,
long int *  Numbers 
)
int pcr_send_long ( const int  Dest_proc_id,
const int  Message_id,
const int  Nr_num,
const long int *  Numbers 
)

*---------------------------------------------------------

*--------------------------------------------------------- *---------------------------------------------------------

int pcr_test (  ) 

Variable Documentation

const int PCC_MPI_ATTACHED_BUFFER_SIZE = 1000*1000000+ MPI_BSEND_OVERHEAD
const MPI_Datatype PCE_Type2MPI_TYPE[PCE_LAST]
Initial value:
{
    MPI_BYTE,       
    MPI_INT,        
    MPI_DOUBLE,     
    MPI_LONG_INT,   
    MPI_PACKED     
}
const PCE_Type PCE_Type_sizeof[PCE_LAST]
Initial value:
{
    static_cast<PCE_Type>( sizeof(char) ),
    static_cast<PCE_Type>( sizeof(int) ),
    static_cast<PCE_Type>( sizeof(double) ),
    static_cast<PCE_Type>( sizeof(long int) ),
    static_cast<PCE_Type>( sizeof(char) )
}
std::vector<pct_buffer> pcv_buffers
std::stack<int> pcv_empty_buffers
std::vector<PCT_BYTE> pcv_MPI_buffer
int pcv_my_rank = -1
std::deque<char*> pcv_recieved_and_waiting_data
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Jun 2020 for ModFEM by  doxygen 1.6.1