This source file includes following definitions.
- orte_rmaps_base_assign_locations
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 #include "orte_config.h"
26 #include "orte/constants.h"
27
28 #include <string.h>
29
30 #include "orte/mca/mca.h"
31 #include "opal/util/output.h"
32 #include "opal/mca/base/base.h"
33
34 #include "orte/runtime/orte_globals.h"
35 #include "orte/util/show_help.h"
36 #include "orte/mca/errmgr/errmgr.h"
37
38 #include "orte/mca/rmaps/base/base.h"
39 #include "orte/mca/rmaps/base/rmaps_private.h"
40
41
42 int orte_rmaps_base_assign_locations(orte_job_t *jdata)
43 {
44 int rc;
45 orte_rmaps_base_selected_module_t *mod;
46
47 opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
48 "mca:rmaps: assigning locations for job %s",
49 ORTE_JOBID_PRINT(jdata->jobid));
50
51
52
53
54 if (1 == opal_list_get_size(&orte_rmaps_base.selected_modules)) {
55
56 mod = (orte_rmaps_base_selected_module_t*)opal_list_get_first(&orte_rmaps_base.selected_modules);
57 jdata->map->req_mapper = strdup(mod->component->mca_component_name);
58 }
59 OPAL_LIST_FOREACH(mod, &orte_rmaps_base.selected_modules, orte_rmaps_base_selected_module_t) {
60 if (NULL == mod->module->assign_locations) {
61 continue;
62 }
63 if (ORTE_SUCCESS == (rc = mod->module->assign_locations(jdata))) {
64 return rc;
65 }
66
67
68
69 if (ORTE_ERR_TAKE_NEXT_OPTION != rc) {
70 ORTE_ERROR_LOG(rc);
71 return rc;
72 }
73 }
74
75
76 orte_show_help("help-orte-rmaps-base.txt", "failed-assignments", true,
77 orte_process_info.nodename,
78 orte_rmaps_base_print_mapping(jdata->map->mapping));
79 return ORTE_ERROR;
80 }