root/ompi/mca/coll/self/coll_self_module.c

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

DEFINITIONS

This source file includes following definitions.
  1. mca_coll_self_init_query
  2. mca_coll_self_comm_query
  3. mca_coll_self_module_enable
  4. mca_coll_self_ft_event

   1 /*
   2  * Copyright (c) 2004-2007 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 (c) 2017      IBM Corporation.  All rights reserved.
  13  * $COPYRIGHT$
  14  *
  15  * Additional copyrights may follow
  16  *
  17  * $HEADER$
  18  */
  19 
  20 #include "ompi_config.h"
  21 #include "coll_self.h"
  22 
  23 #include <stdio.h>
  24 
  25 #include "mpi.h"
  26 #include "ompi/communicator/communicator.h"
  27 #include "ompi/mca/coll/coll.h"
  28 #include "ompi/mca/coll/base/base.h"
  29 #include "ompi/mca/coll/base/coll_base_functions.h"
  30 #include "coll_self.h"
  31 
  32 
  33 /*
  34  * Initial query function that is invoked during MPI_INIT, allowing
  35  * this module to indicate what level of thread support it provides.
  36  */
  37 int mca_coll_self_init_query(bool enable_progress_threads,
  38                              bool enable_mpi_threads)
  39 {
  40     /* Nothing to do */
  41 
  42     return OMPI_SUCCESS;
  43 }
  44 
  45 
  46 /*
  47  * Invoked when there's a new communicator that has been created.
  48  * Look at the communicator and decide which set of functions and
  49  * priority we want to return.
  50  */
  51 mca_coll_base_module_t *
  52 mca_coll_self_comm_query(struct ompi_communicator_t *comm,
  53                          int *priority)
  54 {
  55     mca_coll_self_module_t *module;
  56 
  57     /* We only work on intracommunicators of size 1 */
  58 
  59     if (!OMPI_COMM_IS_INTER(comm) && 1 == ompi_comm_size(comm)) {
  60         *priority = ompi_coll_self_priority;
  61 
  62         module = OBJ_NEW(mca_coll_self_module_t);
  63         if (NULL == module) return NULL;
  64 
  65         module->super.coll_module_enable = mca_coll_self_module_enable;
  66         module->super.ft_event        = mca_coll_self_ft_event;
  67         module->super.coll_allgather  = mca_coll_self_allgather_intra;
  68         module->super.coll_allgatherv = mca_coll_self_allgatherv_intra;
  69         module->super.coll_allreduce  = mca_coll_self_allreduce_intra;
  70         module->super.coll_alltoall   = mca_coll_self_alltoall_intra;
  71         module->super.coll_alltoallv  = mca_coll_self_alltoallv_intra;
  72         module->super.coll_alltoallw  = mca_coll_self_alltoallw_intra;
  73         module->super.coll_barrier    = mca_coll_self_barrier_intra;
  74         module->super.coll_bcast      = mca_coll_self_bcast_intra;
  75         module->super.coll_exscan     = mca_coll_self_exscan_intra;
  76         module->super.coll_gather     = mca_coll_self_gather_intra;
  77         module->super.coll_gatherv    = mca_coll_self_gatherv_intra;
  78         module->super.coll_reduce     = mca_coll_self_reduce_intra;
  79         module->super.coll_reduce_scatter = mca_coll_self_reduce_scatter_intra;
  80         module->super.coll_scan       = mca_coll_self_scan_intra;
  81         module->super.coll_scatter    = mca_coll_self_scatter_intra;
  82         module->super.coll_scatterv   = mca_coll_self_scatterv_intra;
  83 
  84         module->super.coll_reduce_local = mca_coll_base_reduce_local;
  85 
  86         return &(module->super);
  87     }
  88 
  89     return NULL;
  90 }
  91 
  92 
  93 /*
  94  * Init module on the communicator
  95  */
  96 int
  97 mca_coll_self_module_enable(mca_coll_base_module_t *module,
  98                             struct ompi_communicator_t *comm)
  99 {
 100     return OMPI_SUCCESS;
 101 }
 102 
 103 
 104 int mca_coll_self_ft_event(int state) {
 105     if(OPAL_CRS_CHECKPOINT == state) {
 106         ;
 107     }
 108     else if(OPAL_CRS_CONTINUE == state) {
 109         ;
 110     }
 111     else if(OPAL_CRS_RESTART == state) {
 112         ;
 113     }
 114     else if(OPAL_CRS_TERM == state ) {
 115         ;
 116     }
 117     else {
 118         ;
 119     }
 120 
 121     return OMPI_SUCCESS;
 122 }

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