root/ompi/mpiext/cr/c/quiesce_end.c

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

DEFINITIONS

This source file includes following definitions.
  1. OMPI_CR_Quiesce_end

   1 /*
   2  * Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2012 Cisco Systems, Inc.  All rights reserved.
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  */
  12 #include "ompi_config.h"
  13 #include <stdio.h>
  14 
  15 #include "ompi/mpi/c/bindings.h"
  16 #include "ompi/info/info.h"
  17 #include "ompi/runtime/params.h"
  18 #include "ompi/communicator/communicator.h"
  19 #include "orte/mca/snapc/snapc.h"
  20 
  21 #include "ompi/mpiext/cr/c/mpiext_cr_c.h"
  22 
  23 static const char FUNC_NAME[] = "OMPI_CR_Quiesce_end";
  24 
  25 int OMPI_CR_Quiesce_end(MPI_Comm commP, MPI_Info *info)
  26 {
  27     int ret = MPI_SUCCESS;
  28     MPI_Comm comm = MPI_COMM_WORLD; /* Currently ignore provided comm */
  29     orte_snapc_base_request_op_t *datum = NULL;
  30     int my_rank;
  31 
  32     /* argument checking */
  33     if (MPI_PARAM_CHECK) {
  34         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  35     }
  36 
  37     /*
  38      * Setup the data structure for the operation
  39      */
  40     datum = OBJ_NEW(orte_snapc_base_request_op_t);
  41     datum->event = ORTE_SNAPC_OP_QUIESCE_END;
  42     datum->is_active = true;
  43 
  44     MPI_Comm_rank(comm, &my_rank);
  45     if( 0 == my_rank ) {
  46         datum->leader = OMPI_PROC_MY_NAME->vpid;
  47     } else {
  48         datum->leader = -1; /* Unknown from non-root ranks */
  49     }
  50 
  51     /*
  52      * Leader sends the request
  53      */
  54     OPAL_CR_ENTER_LIBRARY();
  55     ret = orte_snapc.request_op(datum);
  56     /*ret = ompi_crcp_base_quiesce_end(info);*/
  57     if( OMPI_SUCCESS != ret ) {
  58         OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OTHER,
  59                                FUNC_NAME);
  60     }
  61     OPAL_CR_EXIT_LIBRARY();
  62 
  63     /*
  64      * All processes must make this call before it can complete
  65      */
  66     MPI_Barrier(comm);
  67 
  68     /*
  69      * (Old) info logic
  70      */
  71     /*cur_datum.epoch = -1;*/
  72 
  73     return ret;
  74 }
  75 

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