OpenMPI  0.1.1
coll_tuned_dynamic_rules.h
1 
2 /*
3  * Copyright (c) 2004-2005 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-2005 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) 2011-2012 FUJITSU LIMITED. All rights reserved.
14  * $COPYRIGHT$
15  *
16  * Additional copyrights may follow
17  *
18  * $HEADER$
19  */
20 
21 #ifndef MCA_COLL_TUNED_DYNAMIC_RULES_H_HAS_BEEN_INCLUDED
22 #define MCA_COLL_TUNED_DYNAMIC_RULES_H_HAS_BEEN_INCLUDED
23 
24 #include "ompi_config.h"
25 
26 BEGIN_C_DECLS
27 
28 
29 typedef struct msg_rule_s {
30  /* paranoid / debug */
31  int mpi_comsize; /* which MPI comm size this is is for */
32 
33  /* paranoid / debug */
34  int alg_rule_id; /* unique alg rule id */
35  int com_rule_id; /* unique com rule id */
36  int msg_rule_id; /* unique msg rule id */
37 
38  /* RULE */
39  size_t msg_size; /* message size */
40 
41  /* RESULT */
42  int result_alg; /* result algorithm to use */
43  int result_topo_faninout; /* result topology fan in/out to use (if applicable) */
44  long result_segsize; /* result segment size to use */
45  int result_max_requests; /* maximum number of outstanding requests (if applicable) */
46 } ompi_coll_msg_rule_t;
47 
48 
49 typedef struct com_rule_s {
50  /* paranoid / debug */
51  int mpi_comsize; /* which MPI comm size this is is for */
52 
53  /* paranoid / debug */
54  int alg_rule_id; /* unique alg rule id */
55  int com_rule_id; /* unique com rule id */
56 
57  /* RULE */
58  int n_msg_sizes;
59  ompi_coll_msg_rule_t *msg_rules;
60 
62 
63 
64 typedef struct alg_rule_s {
65  /* paranoid / debug */
66  int alg_rule_id; /* unique alg rule id */
67 
68  /* RULE */
69  int n_com_sizes;
70  ompi_coll_com_rule_t *com_rules;
71 
73 
74 /* function prototypes */
75 
76 /* these are used to build the rule tables (by the read file routines) */
77 ompi_coll_alg_rule_t* ompi_coll_tuned_mk_alg_rules (int n_alg);
78 ompi_coll_com_rule_t* ompi_coll_tuned_mk_com_rules (int n_com_rules, int alg_rule_id);
79 ompi_coll_msg_rule_t* ompi_coll_tuned_mk_msg_rules (int n_msg_rules, int alg_rule_id, int com_rule_id, int mpi_comsize);
80 
81 /* debugging support */
82 int ompi_coll_tuned_dump_msg_rule (ompi_coll_msg_rule_t* msg_p);
83 int ompi_coll_tuned_dump_com_rule (ompi_coll_com_rule_t* com_p);
84 int ompi_coll_tuned_dump_alg_rule (ompi_coll_alg_rule_t* alg_p);
85 int ompi_coll_tuned_dump_all_rules (ompi_coll_alg_rule_t* alg_p, int n_rules);
86 
87 /* free alloced memory routines, used by file and tuned component/module */
88 int ompi_coll_tuned_free_msg_rules_in_com_rule (ompi_coll_com_rule_t* com_p);
89 int ompi_coll_tuned_free_coms_in_alg_rule (ompi_coll_alg_rule_t* alg_p);
90 int ompi_coll_tuned_free_all_rules (ompi_coll_alg_rule_t* alg_p, int n_algs);
91 
92 
93 /* the IMPORTANT routines, i.e. the ones that do stuff for everyday communicators and collective calls */
94 
95 ompi_coll_com_rule_t* ompi_coll_tuned_get_com_rule_ptr (ompi_coll_alg_rule_t* rules, int alg_id, int mpi_comsize);
96 
97 int ompi_coll_tuned_get_target_method_params (ompi_coll_com_rule_t* base_com_rule, size_t mpi_msgsize,
98  int* result_topo_faninout, int* result_segsize,
99  int* max_requests);
100 
101 
102 END_C_DECLS
103 #endif /* MCA_COLL_TUNED_DYNAMIC_RULES_H_HAS_BEEN_INCLUDED */
104 
Definition: coll_tuned_dynamic_rules.h:64
Definition: coll_tuned_dynamic_rules.h:49
Definition: coll_tuned_dynamic_rules.h:29