2004-06-18 02:40:16 +04:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-06-18 02:40:16 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "mpi.h"
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/errhandler/errclass.h"
|
|
|
|
#include "ompi/constants.h"
|
2004-06-18 02:40:16 +04:00
|
|
|
|
|
|
|
/* Table holding all error codes */
|
|
|
|
ompi_pointer_array_t ompi_errclasses;
|
|
|
|
int ompi_errclass_lastused=0;
|
|
|
|
int ompi_errclass_lastpredefined=0;
|
|
|
|
|
|
|
|
ompi_errclass_t ompi_errclass_success;
|
|
|
|
ompi_errclass_t ompi_errclass_buffer;
|
|
|
|
ompi_errclass_t ompi_errclass_count;
|
|
|
|
ompi_errclass_t ompi_errclass_type;
|
|
|
|
ompi_errclass_t ompi_errclass_tag;
|
|
|
|
ompi_errclass_t ompi_errclass_comm;
|
|
|
|
ompi_errclass_t ompi_errclass_rank;
|
|
|
|
ompi_errclass_t ompi_errclass_request;
|
|
|
|
ompi_errclass_t ompi_errclass_root;
|
|
|
|
ompi_errclass_t ompi_errclass_group;
|
|
|
|
ompi_errclass_t ompi_errclass_op;
|
|
|
|
ompi_errclass_t ompi_errclass_topology;
|
|
|
|
ompi_errclass_t ompi_errclass_dims;
|
|
|
|
ompi_errclass_t ompi_errclass_arg;
|
|
|
|
ompi_errclass_t ompi_errclass_unknown;
|
|
|
|
ompi_errclass_t ompi_errclass_truncate;
|
|
|
|
ompi_errclass_t ompi_errclass_other;
|
|
|
|
ompi_errclass_t ompi_errclass_intern;
|
|
|
|
ompi_errclass_t ompi_errclass_in_status;
|
|
|
|
ompi_errclass_t ompi_errclass_pending;
|
|
|
|
|
|
|
|
ompi_errclass_t ompi_errclass_access;
|
|
|
|
ompi_errclass_t ompi_errclass_amode;
|
|
|
|
ompi_errclass_t ompi_errclass_assert;
|
|
|
|
ompi_errclass_t ompi_errclass_bad_file;
|
|
|
|
ompi_errclass_t ompi_errclass_base;
|
|
|
|
ompi_errclass_t ompi_errclass_conversion;
|
|
|
|
ompi_errclass_t ompi_errclass_disp;
|
|
|
|
ompi_errclass_t ompi_errclass_dup_datarep;
|
|
|
|
ompi_errclass_t ompi_errclass_file_exists;
|
|
|
|
ompi_errclass_t ompi_errclass_file_in_use;
|
|
|
|
ompi_errclass_t ompi_errclass_file;
|
|
|
|
ompi_errclass_t ompi_errclass_info_key;
|
|
|
|
ompi_errclass_t ompi_errclass_info_nokey;
|
|
|
|
ompi_errclass_t ompi_errclass_info_value;
|
|
|
|
ompi_errclass_t ompi_errclass_info;
|
|
|
|
ompi_errclass_t ompi_errclass_io;
|
|
|
|
ompi_errclass_t ompi_errclass_keyval;
|
|
|
|
ompi_errclass_t ompi_errclass_locktype;
|
|
|
|
ompi_errclass_t ompi_errclass_name;
|
|
|
|
ompi_errclass_t ompi_errclass_no_mem;
|
|
|
|
ompi_errclass_t ompi_errclass_not_same;
|
|
|
|
ompi_errclass_t ompi_errclass_no_space;
|
|
|
|
ompi_errclass_t ompi_errclass_no_such_file;
|
|
|
|
ompi_errclass_t ompi_errclass_port;
|
|
|
|
ompi_errclass_t ompi_errclass_quota;
|
|
|
|
ompi_errclass_t ompi_errclass_read_only;
|
|
|
|
ompi_errclass_t ompi_errclass_rma_conflict;
|
|
|
|
ompi_errclass_t ompi_errclass_rma_sync;
|
|
|
|
ompi_errclass_t ompi_errclass_service;
|
|
|
|
ompi_errclass_t ompi_errclass_size;
|
|
|
|
ompi_errclass_t ompi_errclass_spawn;
|
|
|
|
ompi_errclass_t ompi_errclass_unsupported_datarep;
|
|
|
|
ompi_errclass_t ompi_errclass_unsupported_operation;
|
|
|
|
ompi_errclass_t ompi_errclass_win;
|
|
|
|
|
|
|
|
static void ompi_errclass_construct(ompi_errclass_t* errcode);
|
|
|
|
static void ompi_errclass_destruct(ompi_errclass_t* errcode);
|
|
|
|
|
2005-07-03 20:06:07 +04:00
|
|
|
OBJ_CLASS_INSTANCE(ompi_errclass_t,opal_object_t,ompi_errclass_construct, ompi_errclass_destruct);
|
2004-06-18 02:40:16 +04:00
|
|
|
|
|
|
|
int ompi_errclass_init (void)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Initialize the pointer array, which will hold the references to
|
|
|
|
* the error objects
|
|
|
|
*/
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclasses, ompi_pointer_array_t);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initialize now each predefined error class and register
|
|
|
|
* it in the pointer-array.
|
|
|
|
*/
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_success, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_success.cls = MPI_SUCCESS;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_SUCCESS, &ompi_errclass_success);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_buffer, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_buffer.cls = MPI_ERR_BUFFER;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_BUFFER, &ompi_errclass_buffer);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_count, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_count.cls = MPI_ERR_COUNT;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_COUNT, &ompi_errclass_count);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_type, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_type.cls = MPI_ERR_TYPE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_TYPE, &ompi_errclass_type);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_tag, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_tag.cls = MPI_ERR_TAG;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_TAG, &ompi_errclass_tag);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_comm, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_comm.cls = MPI_ERR_COMM;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_COMM, &ompi_errclass_comm);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_rank, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_rank.cls = MPI_ERR_RANK;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_RANK, &ompi_errclass_rank);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_request, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_request.cls = MPI_ERR_REQUEST;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_REQUEST, &ompi_errclass_request);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_root, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_root.cls = MPI_ERR_ROOT;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_ROOT, &ompi_errclass_root);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_group, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_group.cls = MPI_ERR_GROUP;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_GROUP, &ompi_errclass_group);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_op, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_op.cls = MPI_ERR_OP;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_OP, &ompi_errclass_op);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_topology, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_topology.cls = MPI_ERR_TOPOLOGY;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_TOPOLOGY, &ompi_errclass_topology);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_dims, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_dims.cls = MPI_ERR_DIMS;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_DIMS, &ompi_errclass_dims);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_arg, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_arg.cls = MPI_ERR_ARG;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_ARG, &ompi_errclass_arg);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_unknown, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_unknown.cls = MPI_ERR_UNKNOWN;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_UNKNOWN, &ompi_errclass_unknown);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_truncate, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_truncate.cls = MPI_ERR_TRUNCATE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_TRUNCATE, &ompi_errclass_truncate);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_other, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_other.cls = MPI_ERR_OTHER;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_OTHER, &ompi_errclass_other);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_intern, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_intern.cls = MPI_ERR_INTERN;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_INTERN, &ompi_errclass_intern);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_in_status, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_in_status.cls = MPI_ERR_IN_STATUS;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_IN_STATUS, &ompi_errclass_in_status);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_pending, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_pending.cls = MPI_ERR_PENDING;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_PENDING, &ompi_errclass_pending);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_access, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_access.cls = MPI_ERR_ACCESS;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_ACCESS, &ompi_errclass_access);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_amode, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_amode.cls = MPI_ERR_AMODE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_AMODE, &ompi_errclass_amode);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_assert, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_assert.cls = MPI_ERR_ASSERT;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_ASSERT, &ompi_errclass_assert);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_bad_file, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_bad_file.cls = MPI_ERR_BAD_FILE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_BAD_FILE, &ompi_errclass_bad_file);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_base, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_base.cls = MPI_ERR_BASE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_BASE, &ompi_errclass_base);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_conversion, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_conversion.cls = MPI_ERR_CONVERSION;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_CONVERSION, &ompi_errclass_conversion);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_disp, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_disp.cls = MPI_ERR_DISP;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_DISP, &ompi_errclass_disp);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_dup_datarep, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_dup_datarep.cls = MPI_ERR_DUP_DATAREP;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_DUP_DATAREP, &ompi_errclass_dup_datarep);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_file_exists, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_file_exists.cls = MPI_ERR_FILE_EXISTS;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_FILE_EXISTS, &ompi_errclass_file_exists);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_file_in_use, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_file_in_use.cls = MPI_ERR_FILE_IN_USE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_FILE_IN_USE, &ompi_errclass_file_in_use);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_file, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_file.cls = MPI_ERR_FILE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_FILE, &ompi_errclass_file);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_info_key, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_info_key.cls = MPI_ERR_INFO_KEY;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_INFO_KEY, &ompi_errclass_info_key);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_info_nokey, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_info_nokey.cls = MPI_ERR_INFO_NOKEY;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_INFO_NOKEY, &ompi_errclass_info_nokey);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_info_value, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_info_value.cls = MPI_ERR_INFO_VALUE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_INFO_VALUE, &ompi_errclass_info_value);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_info, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_info.cls = MPI_ERR_INFO;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_INFO, &ompi_errclass_info);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_io, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_io.cls = MPI_ERR_IO;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_IO, &ompi_errclass_io);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_keyval, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_keyval.cls = MPI_ERR_KEYVAL;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_KEYVAL, &ompi_errclass_keyval);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_locktype, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_locktype.cls = MPI_ERR_LOCKTYPE;
|
2004-06-25 01:09:55 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_LOCKTYPE, &ompi_errclass_locktype);
|
2004-06-18 02:40:16 +04:00
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_name, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_name.cls = MPI_ERR_NAME;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_NAME, &ompi_errclass_name);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_no_mem, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_no_mem.cls = MPI_ERR_NO_MEM;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_NO_MEM, &ompi_errclass_no_mem);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_not_same, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_not_same.cls = MPI_ERR_NOT_SAME;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_NOT_SAME, &ompi_errclass_not_same);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_no_space, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_no_space.cls = MPI_ERR_NO_SPACE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_NO_SPACE, &ompi_errclass_no_space);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_no_such_file, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_no_such_file.cls = MPI_ERR_NO_SUCH_FILE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_NO_SUCH_FILE, &ompi_errclass_no_such_file);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_port, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_port.cls = MPI_ERR_PORT;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_PORT, &ompi_errclass_port);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_quota, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_quota.cls = MPI_ERR_QUOTA;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_QUOTA, &ompi_errclass_quota);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_read_only, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_read_only.cls = MPI_ERR_READ_ONLY;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_READ_ONLY, &ompi_errclass_read_only);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_rma_conflict, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_rma_conflict.cls = MPI_ERR_RMA_CONFLICT;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_RMA_CONFLICT, &ompi_errclass_rma_conflict);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_rma_sync, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_rma_sync.cls = MPI_ERR_RMA_SYNC;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_RMA_SYNC, &ompi_errclass_rma_sync);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_service, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_service.cls = MPI_ERR_SERVICE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_SERVICE, &ompi_errclass_service);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_size, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_size.cls = MPI_ERR_SIZE;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_SIZE, &ompi_errclass_size);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_spawn, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_spawn.cls = MPI_ERR_SPAWN;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_SPAWN, &ompi_errclass_spawn);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_unsupported_datarep, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_unsupported_datarep.cls = MPI_ERR_UNSUPPORTED_DATAREP;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_UNSUPPORTED_DATAREP,
|
|
|
|
&ompi_errclass_unsupported_datarep);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_unsupported_operation, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_unsupported_operation.cls = MPI_ERR_UNSUPPORTED_OPERATION;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_UNSUPPORTED_OPERATION,
|
|
|
|
&ompi_errclass_unsupported_operation);
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&ompi_errclass_win, ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_errclass_win.cls = MPI_ERR_WIN;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, MPI_ERR_WIN, &ompi_errclass_win);
|
|
|
|
|
|
|
|
ompi_errclass_lastused=MPI_ERR_WIN+1;
|
|
|
|
ompi_errclass_lastpredefined=MPI_ERR_WIN+1;
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
int ompi_errclass_finalize(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
ompi_errclass_t *errc;
|
|
|
|
|
|
|
|
for (i=ompi_errclass_lastpredefined; i < ompi_errclass_lastused; i++) {
|
|
|
|
/*
|
|
|
|
* Release user defined error classes
|
|
|
|
*/
|
2004-10-18 20:55:20 +04:00
|
|
|
errc = (ompi_errclass_t *)ompi_pointer_array_get_item(&ompi_errclasses, i);
|
2004-06-18 02:40:16 +04:00
|
|
|
OBJ_RELEASE (errc);
|
|
|
|
}
|
|
|
|
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_success);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_buffer);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_count);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_type);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_tag);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_comm);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_rank);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_request);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_root);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_group);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_op);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_topology);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_dims);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_arg);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_unknown);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_truncate);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_other);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_intern);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_in_status);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_pending);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_access);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_amode);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_assert);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_bad_file);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_base);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_conversion);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_disp);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_dup_datarep);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_file_exists);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_file_in_use);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_file);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_info_key);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_info_nokey);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_info_value);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_info);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_io);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_keyval);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_locktype);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_name);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_no_mem);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_not_same);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_no_space);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_no_such_file);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_port);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_quota);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_read_only);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_rma_conflict);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_rma_sync);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_service);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_size);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_spawn);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_unsupported_datarep);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_unsupported_operation);
|
|
|
|
OBJ_DESTRUCT(&ompi_errclass_win);
|
|
|
|
|
|
|
|
OBJ_DESTRUCT(&ompi_errclasses);
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
int ompi_errclass_add(void)
|
|
|
|
{
|
|
|
|
ompi_errclass_t *newerrclass;
|
|
|
|
|
|
|
|
newerrclass = OBJ_NEW(ompi_errclass_t);
|
2004-10-18 20:55:20 +04:00
|
|
|
newerrclass->cls = ompi_errclass_lastused;
|
2004-06-18 02:40:16 +04:00
|
|
|
ompi_errclass_lastused++;
|
Submitted by: Jeff "I love MPI attributes" Squyres
Reviewed by: Brian "MPI attributes ROCK" Barrett
Bunches of changes to the attribute engine:
- After many hours of discussion about MPI attributes, we came to the
conclusion that MPI-2 Example 4.13 (the C->Fortran example) is just
wrong. If you accept that, the rest of the text makes much more
sense.
- There are 9 inter-language cases: all combinations of (read, write)
with C, Fortran MPI-1, and Fortran MPI-2 for each value. Each of
the 9 cases have specific code for what is supposed to happen (and
is labeled in the code with comments). There is a *lengthy* comment
at the top of src/attribute/attribute.c that describes all of this.
- All predefined attributes are now treated as if they were put from
MPI-1 Fortran calls, with the exception of the window predefined
attributes (which are irrelevant on the beta, because there is no
one-sided support; preliminary fixes included in this patch, but
will be fully addressed on the trunk)
- MPI API calls (particularly the Fortran wrappers) are now
fundamentally simpler -- they do *not* call the back-end MPI C API
calls; instead, they call directly back into the attribute engine.
- The MPI_LASTUSEDCODE attribute only exists on MPI_COMM_WORLD and is
updated appropriately when user error classes are added.
--> Note: Edgar made a suggestion that for communicator attributes,
we ignore the communicator argument when retrieving attributes
and simply return the value. This will likely only happen on
the trunk, and will alleviate (from the user's perspective) the
restriction that LASTUSEDCODE is only on MPI_COMM_WORLD.
- The predefined attributes are now "better". We create keyvals
separately than assigning values, and correctly distinguish between
comm, type, and win attributes. Initial values are now set as if
they were called from MPI-1 fortran.
- Added a comment to the top of src/attribute/attribute_predefined.c
explaining what each of the predefined attributes were and what OMPI
sets them to be.
This commit was SVN r6193.
2005-06-27 23:17:11 +04:00
|
|
|
|
|
|
|
/* Now need to reset the MPI_LASTUSEDCODE attribute on
|
|
|
|
MPI_COMM_WORLD */
|
|
|
|
|
|
|
|
|
2004-06-18 02:40:16 +04:00
|
|
|
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, newerrclass->cls, newerrclass);
|
2004-06-18 02:40:16 +04:00
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void ompi_errclass_construct(ompi_errclass_t *errclass)
|
|
|
|
{
|
2004-10-18 20:55:20 +04:00
|
|
|
errclass->cls = MPI_UNDEFINED;
|
2004-06-18 02:40:16 +04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void ompi_errclass_destruct(ompi_errclass_t *errclass)
|
|
|
|
{
|
2004-10-18 20:55:20 +04:00
|
|
|
ompi_pointer_array_set_item(&ompi_errclasses, errclass->cls, NULL);
|
2004-06-18 02:40:16 +04:00
|
|
|
return;
|
|
|
|
}
|