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 * scatter_intra
31 *
32 * Function: - scatter operation
33 * Accepts: - same arguments as MPI_Scatter()
34 * Returns: - MPI_SUCCESS or error code
35 */
36 int mca_coll_demo_scatter_intra(void *sbuf, int scount,
37 struct ompi_datatype_t *sdtype,
38 void *rbuf, int rcount,
39 struct ompi_datatype_t *rdtype,
40 int root,
41 struct ompi_communicator_t *comm,
42 mca_coll_base_module_t *module)
43 {
44 mca_coll_demo_module_t *demo_module = (mca_coll_demo_module_t*) module;
45 opal_output_verbose(10, ompi_coll_base_framework.framework_output, "In demo scatter_intra");
46 return demo_module->underlying.coll_scatter(sbuf, scount, sdtype,
47 rbuf, rcount, rdtype,
48 root, comm,
49 demo_module->underlying.coll_scatter_module);
50 }
51
52
53 /*
54 * scatter_inter
55 *
56 * Function: - scatter operation
57 * Accepts: - same arguments as MPI_Scatter()
58 * Returns: - MPI_SUCCESS or error code
59 */
60 int mca_coll_demo_scatter_inter(void *sbuf, int scount,
61 struct ompi_datatype_t *sdtype,
62 void *rbuf, int rcount,
63 struct ompi_datatype_t *rdtype,
64 int root,
65 struct ompi_communicator_t *comm,
66 mca_coll_base_module_t *module)
67 {
68 mca_coll_demo_module_t *demo_module = (mca_coll_demo_module_t*) module;
69 opal_output_verbose(10, ompi_coll_base_framework.framework_output, "In demo scatter_inter");
70 return demo_module->underlying.coll_scatter(sbuf, scount, sdtype,
71 rbuf, rcount, rdtype,
72 root, comm,
73 demo_module->underlying.coll_scatter_module);
74 }