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 #include "opal/util/output.h"
21
22 #include "mpi.h"
23 #include "ompi/constants.h"
24 #include "ompi/mca/coll/coll.h"
25 #include "ompi/mca/coll/base/base.h"
26 #include "coll_demo.h"
27
28
29 /*
30 * scatterv_intra
31 *
32 * Function: - scatterv operation
33 * Accepts: - same arguments as MPI_Scatterv()
34 * Returns: - MPI_SUCCESS or error code
35 */
36 int mca_coll_demo_scatterv_intra(void *sbuf, int *scounts,
37 int *disps, struct ompi_datatype_t *sdtype,
38 void *rbuf, int rcount,
39 struct ompi_datatype_t *rdtype, int root,
40 struct ompi_communicator_t *comm,
41 mca_coll_base_module_t *module)
42 {
43 mca_coll_demo_module_t *demo_module = (mca_coll_demo_module_t*) module;
44 opal_output_verbose(10, ompi_coll_base_framework.framework_output, "In demo scatterv_intra");
45 return demo_module->underlying.coll_scatterv(sbuf, scounts, disps,
46 sdtype, rbuf, rcount,
47 rdtype, root, comm,
48 demo_module->underlying.coll_scatterv_module);
49 }
50
51
52 /*
53 * scatterv_inter
54 *
55 * Function: - scatterv operation
56 * Accepts: - same arguments as MPI_Scatterv()
57 * Returns: - MPI_SUCCESS or error code
58 */
59 int mca_coll_demo_scatterv_inter(void *sbuf, int *scounts,
60 int *disps, struct ompi_datatype_t *sdtype,
61 void *rbuf, int rcount,
62 struct ompi_datatype_t *rdtype, int root,
63 struct ompi_communicator_t *comm,
64 mca_coll_base_module_t *module)
65 {
66 mca_coll_demo_module_t *demo_module = (mca_coll_demo_module_t*) module;
67 opal_output_verbose(10, ompi_coll_base_framework.framework_output, "In demo scatterv_inter");
68 return demo_module->underlying.coll_scatterv(sbuf, scounts, disps,
69 sdtype, rbuf, rcount,
70 rdtype, root, comm,
71 demo_module->underlying.coll_scatterv_module);
72 }