root/ompi/mpi/c/test_cancelled.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. MPI_Test_cancelled

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2005 The University of Tennessee and The University
   7  *                         of Tennessee Research Foundation.  All rights
   8  *                         reserved.
   9  * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
  10  *                         University of Stuttgart.  All rights reserved.
  11  * Copyright (c) 2004-2005 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2013      Los Alamos National Security, LLC.  All rights
  14  *                         reserved.
  15  * Copyright (c) 2015      Research Organization for Information Science
  16  *                         and Technology (RIST). All rights reserved.
  17  * $COPYRIGHT$
  18  *
  19  * Additional copyrights may follow
  20  *
  21  * $HEADER$
  22  */
  23 #include "ompi_config.h"
  24 #include <stdio.h>
  25 
  26 #include "ompi/mpi/c/bindings.h"
  27 #include "ompi/runtime/params.h"
  28 #include "ompi/communicator/communicator.h"
  29 #include "ompi/errhandler/errhandler.h"
  30 #include "ompi/memchecker.h"
  31 
  32 #if OMPI_BUILD_MPI_PROFILING
  33 #if OPAL_HAVE_WEAK_SYMBOLS
  34 #pragma weak MPI_Test_cancelled = PMPI_Test_cancelled
  35 #endif
  36 #define MPI_Test_cancelled PMPI_Test_cancelled
  37 #endif
  38 
  39 static const char FUNC_NAME[] = "MPI_Test_cancelled";
  40 
  41 
  42 int MPI_Test_cancelled(const MPI_Status *status, int *flag)
  43 {
  44     int rc = MPI_SUCCESS;
  45 
  46     MEMCHECKER (
  47         if(status != MPI_STATUSES_IGNORE)
  48             memchecker_status(status);
  49     );
  50 
  51     OPAL_CR_NOOP_PROGRESS();
  52 
  53     if (MPI_PARAM_CHECK) {
  54         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  55         if (NULL == flag || NULL == status) {
  56             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME);
  57         }
  58     }
  59 
  60     *flag = status->_cancelled;
  61     return rc;
  62 }
  63 

/* [<][>][^][v][top][bottom][index][help] */