openmpi  3.1.6
About: Open MPI is a high performance Message Passing Interface (MPI) library project combining technologies and resources from several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in order to build the best MPI library available. 3.x series.
  Fossies Dox: openmpi-3.1.6.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

errcode.h File Reference
#include "ompi_config.h"
#include "mpi.h"
#include "opal/class/opal_object.h"
#include "opal/class/opal_pointer_array.h"
Include dependency graph for errcode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ompi_mpi_errcode_t
 Back-end type for MPI error codes. More...
 

Typedefs

typedef struct ompi_mpi_errcode_t ompi_mpi_errcode_t
 

Functions

static bool ompi_mpi_errcode_is_invalid (int errcode)
 Check for a valid error code. More...
 
static int ompi_mpi_errcode_get_class (int errcode)
 Return the error class. More...
 
static int ompi_mpi_errcode_is_predefined (int errcode)
 
static int ompi_mpi_errnum_is_class (int errnum)
 
static char * ompi_mpi_errnum_get_string (int errnum)
 Return the error string. More...
 
int ompi_mpi_errcode_init (void)
 Initialize the error codes. More...
 
int ompi_mpi_errcode_finalize (void)
 Finalize the error codes. More...
 
int ompi_mpi_errcode_add (int errclass)
 Add an error code. More...
 
int ompi_mpi_errclass_add (void)
 Add an error class. More...
 
int ompi_mpi_errnum_add_string (int errnum, const char *string, int len)
 Add an error string to an error code. More...
 

Variables

opal_pointer_array_t ompi_mpi_errcodes
 
int ompi_mpi_errcode_lastused
 
int ompi_mpi_errcode_lastpredefined
 
ompi_mpi_errcode_t ompi_err_unknown
 

Typedef Documentation

◆ ompi_mpi_errcode_t

Definition at line 34 of file errcode.h.

Function Documentation

◆ ompi_mpi_errclass_add()

int ompi_mpi_errclass_add ( void  )

Add an error class.

Parameters
none
Returns
the new error class on SUCCESS (>0)
OMPI_ERROR otherwise

Definition at line 331 of file errcode.c.

References ompi_mpi_errcode_t::cls, OBJ_NEW, ompi_mpi_errcode_lastused, ompi_mpi_errcodes, and opal_pointer_array_set_item().

Referenced by MPI_Add_error_class().

◆ ompi_mpi_errcode_add()

int ompi_mpi_errcode_add ( int  errclass)

Add an error code.

Parameters
error class to which this new error code belongs to
Returns
the new error code on SUCCESS (>0)
OMPI_ERROR otherwise

Definition at line 318 of file errcode.c.

References ompi_mpi_errcode_t::cls, ompi_mpi_errcode_t::code, OBJ_NEW, ompi_mpi_errcode_lastused, ompi_mpi_errcodes, and opal_pointer_array_set_item().

Referenced by MPI_Add_error_code().

◆ ompi_mpi_errcode_finalize()

int ompi_mpi_errcode_finalize ( void  )

Finalize the error codes.

Returns
OMPI_SUCCESS Always

Invokes from ompi_mpi_finalize(); tears down the error code array.

Definition at line 225 of file errcode.c.

References OBJ_DESTRUCT, OBJ_RELEASE, ompi_err_access, ompi_err_amode, ompi_err_arg, ompi_err_assert, ompi_err_bad_file, ompi_err_base, ompi_err_buffer, ompi_err_comm, ompi_err_conversion, ompi_err_count, ompi_err_dims, ompi_err_disp, ompi_err_dup_datarep, ompi_err_file, ompi_err_file_exists, ompi_err_file_in_use, ompi_err_group, ompi_err_in_status, ompi_err_info, ompi_err_info_key, ompi_err_info_nokey, ompi_err_info_value, ompi_err_intern, ompi_err_io, ompi_err_keyval, ompi_err_locktype, ompi_err_name, ompi_err_no_mem, ompi_err_no_space, ompi_err_no_such_file, ompi_err_not_same, ompi_err_op, ompi_err_other, ompi_err_pending, ompi_err_port, ompi_err_quota, ompi_err_rank, ompi_err_read_only, ompi_err_request, ompi_err_rma_attach, ompi_err_rma_conflict, ompi_err_rma_flavor, ompi_err_rma_range, ompi_err_rma_shared, ompi_err_rma_sync, ompi_err_root, ompi_err_service, ompi_err_size, ompi_err_spawn, ompi_err_tag, ompi_err_topology, ompi_err_truncate, ompi_err_type, ompi_err_unknown, ompi_err_unsupported_datarep, ompi_err_unsupported_operation, ompi_err_win, ompi_mpi_errcode_lastpredefined, ompi_mpi_errcode_lastused, ompi_mpi_errcodes, ompi_success, OMPI_SUCCESS, ompi_t_err_cannot_init, ompi_t_err_cvar_set_never, ompi_t_err_cvar_set_not_now, ompi_t_err_invalid, ompi_t_err_invalid_handle, ompi_t_err_invalid_index, ompi_t_err_invalid_item, ompi_t_err_invalid_name, ompi_t_err_invalid_session, ompi_t_err_memory, ompi_t_err_not_initialized, ompi_t_err_out_of_handles, ompi_t_err_out_of_sessions, ompi_t_err_pvar_no_atomic, ompi_t_err_pvar_no_startstop, ompi_t_err_pvar_no_write, and opal_pointer_array_get_item().

Referenced by ompi_mpi_finalize().

◆ ompi_mpi_errcode_get_class()

static int ompi_mpi_errcode_get_class ( int  errcode)
inlinestatic

Return the error class.

Definition at line 72 of file errcode.h.

References ompi_mpi_errcode_t::cls, err, NULL, ompi_err_unknown, ompi_mpi_errcodes, and opal_pointer_array_get_item().

Referenced by MPI_Error_class(), and ompi_java_exceptionCheck().

◆ ompi_mpi_errcode_init()

int ompi_mpi_errcode_init ( void  )

Initialize the error codes.

Returns
OMPI_SUCCESS Upon success
OMPI_ERROR Otherwise

Invoked from ompi_mpi_init(); sets up all static MPI error codes,

Definition at line 131 of file errcode.c.

References CONSTRUCT_ERRCODE, OBJ_CONSTRUCT, ompi_err_access, ompi_err_amode, ompi_err_arg, ompi_err_assert, ompi_err_bad_file, ompi_err_base, ompi_err_buffer, ompi_err_comm, ompi_err_conversion, ompi_err_count, ompi_err_dims, ompi_err_disp, ompi_err_dup_datarep, ompi_err_file, ompi_err_file_exists, ompi_err_file_in_use, ompi_err_group, ompi_err_in_status, ompi_err_info, ompi_err_info_key, ompi_err_info_nokey, ompi_err_info_value, ompi_err_intern, ompi_err_io, ompi_err_keyval, ompi_err_locktype, ompi_err_name, ompi_err_no_mem, ompi_err_no_space, ompi_err_no_such_file, ompi_err_not_same, ompi_err_op, ompi_err_other, ompi_err_pending, ompi_err_port, ompi_err_quota, ompi_err_rank, ompi_err_read_only, ompi_err_request, ompi_err_rma_attach, ompi_err_rma_conflict, ompi_err_rma_flavor, ompi_err_rma_range, ompi_err_rma_shared, ompi_err_rma_sync, ompi_err_root, ompi_err_service, ompi_err_size, ompi_err_spawn, ompi_err_tag, ompi_err_topology, ompi_err_truncate, ompi_err_type, ompi_err_unknown, ompi_err_unsupported_datarep, ompi_err_unsupported_operation, ompi_err_win, OMPI_ERROR, ompi_mpi_errcode_lastpredefined, ompi_mpi_errcode_lastused, ompi_mpi_errcodes, ompi_success, OMPI_SUCCESS, ompi_t_err_cannot_init, ompi_t_err_cvar_set_never, ompi_t_err_cvar_set_not_now, ompi_t_err_invalid, ompi_t_err_invalid_handle, ompi_t_err_invalid_index, ompi_t_err_invalid_item, ompi_t_err_invalid_name, ompi_t_err_invalid_session, ompi_t_err_memory, ompi_t_err_not_initialized, ompi_t_err_out_of_handles, ompi_t_err_out_of_sessions, ompi_t_err_pvar_no_atomic, ompi_t_err_pvar_no_startstop, ompi_t_err_pvar_no_write, opal_pointer_array_init(), and OPAL_SUCCESS.

Referenced by ompi_mpi_init().

◆ ompi_mpi_errcode_is_invalid()

static bool ompi_mpi_errcode_is_invalid ( int  errcode)
inlinestatic

Check for a valid error code.

Definition at line 61 of file errcode.h.

References ompi_mpi_errcode_lastused.

Referenced by MPI_Add_error_code(), MPI_Add_error_string(), MPI_Error_class(), and MPI_Error_string().

◆ ompi_mpi_errcode_is_predefined()

static int ompi_mpi_errcode_is_predefined ( int  errcode)
inlinestatic

Definition at line 89 of file errcode.h.

References ompi_mpi_errcode_lastpredefined.

Referenced by MPI_Add_error_string().

◆ ompi_mpi_errnum_add_string()

int ompi_mpi_errnum_add_string ( int  errnum,
const char *  string,
int  len 
)

Add an error string to an error code.

Parameters
error code for which the string is defined
error string to add
length of the string
Returns
OMPI_SUCCESS on success
OMPI_ERROR on error

Definition at line 343 of file errcode.c.

References ompi_errcode_intern_t::errstring, ompi_mpi_errcode_t::errstring, NULL, OMPI_ERROR, ompi_mpi_errcodes, OMPI_SUCCESS, opal_pointer_array_get_item(), and strncpy.

Referenced by MPI_Add_error_string().

◆ ompi_mpi_errnum_get_string()

static char* ompi_mpi_errnum_get_string ( int  errnum)
inlinestatic

◆ ompi_mpi_errnum_is_class()

static int ompi_mpi_errnum_is_class ( int  errnum)
inlinestatic

Variable Documentation

◆ ompi_err_unknown

ompi_mpi_errcode_t ompi_err_unknown
extern

◆ ompi_mpi_errcode_lastpredefined

int ompi_mpi_errcode_lastpredefined
extern

◆ ompi_mpi_errcode_lastused

◆ ompi_mpi_errcodes