~ubuntu-branches/ubuntu/hardy/openmpi/hardy-updates

« back to all changes in this revision

Viewing changes to ompi/mpi/c/error_class.c

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2006-10-15 00:46:11 UTC
  • Revision ID: james.westby@ubuntu.com-20061015004611-uuhxnaxyjmuxfd5h
Tags: upstream-1.1
ImportĀ upstreamĀ versionĀ 1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
 
3
 *                         University Research and Technology
 
4
 *                         Corporation.  All rights reserved.
 
5
 * Copyright (c) 2004-2005 The University of Tennessee and The University
 
6
 *                         of Tennessee Research Foundation.  All rights
 
7
 *                         reserved.
 
8
 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 
 
9
 *                         University of Stuttgart.  All rights reserved.
 
10
 * Copyright (c) 2004-2005 The Regents of the University of California.
 
11
 *                         All rights reserved.
 
12
 * $COPYRIGHT$
 
13
 * 
 
14
 * Additional copyrights may follow
 
15
 * 
 
16
 * $HEADER$
 
17
 */
 
18
 
 
19
#include "ompi_config.h"
 
20
 
 
21
#include "ompi/mpi/c/bindings.h"
 
22
#include "ompi/errhandler/errcode.h"
 
23
 
 
24
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
 
25
#pragma weak MPI_Error_class = PMPI_Error_class
 
26
#endif
 
27
 
 
28
#if OMPI_PROFILING_DEFINES
 
29
#include "ompi/mpi/c/profile/defines.h"
 
30
#endif
 
31
 
 
32
static const char FUNC_NAME[] = "MPI_Error_class";
 
33
 
 
34
 
 
35
int MPI_Error_class(int errorcode, int *errorclass) 
 
36
{
 
37
    if ( MPI_PARAM_CHECK ) {
 
38
        OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
 
39
 
 
40
        if ( ompi_mpi_errcode_is_invalid(errorcode)) {
 
41
            return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
 
42
                                          FUNC_NAME);
 
43
        }
 
44
    }
 
45
    
 
46
    
 
47
    *errorclass = ompi_mpi_errcode_get_class(errorcode);
 
48
    return MPI_SUCCESS;
 
49
}