1
1

Add some help messages to the RAS simulator for PEBKAC issues.

This commit was SVN r27203.
Этот коммит содержится в:
Jeff Squyres 2012-08-31 16:33:29 +00:00
родитель f1b43f6375
Коммит ca5bd85364
3 изменённых файлов: 58 добавлений и 6 удалений

Просмотреть файл

@ -7,12 +7,13 @@
# $HEADER$ # $HEADER$
# #
dist_pkgdata_DATA = help-ras-simulator.txt
sources = \ sources = \
ras_sim.h \ ras_sim.h \
ras_sim_component.c \ ras_sim_component.c \
ras_sim_module.c ras_sim_module.c
# Make the output library in this directory, and name it either # Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la # mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
# (for static builds). # (for static builds).

Просмотреть файл

@ -0,0 +1,33 @@
# -*- text -*-
#
# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
[no hwloc support for topofiles]
The ras_simulator_topo_files MCA parameter was specified, but this
Open MPI installation has no "hwloc" support, meaning that topo files
cannot be used.
Your job will now abort.
#
[hwloc API fail]
An internal hwloc API call failed in the RAS simulator module. This
is unusual, and should likely be reported to the Open MPI developers.
Your job will now abort.
File: %s
Line: %d
API: %s
#
[hwloc failed to load xml]
The RAS simulator module failed to load an XML topology file. This
usually means that the file is either invalid or does not exist.
Topo file: %s
#

Просмотреть файл

@ -86,7 +86,14 @@ static int allocate(opal_list_t *nodes)
return ORTE_ERR_SILENT; return ORTE_ERR_SILENT;
} }
} }
#else
/* If we don't have hwloc and hwloc files were specified, then
error out (because we can't deliver that functionality) */
if (NULL == mca_ras_simulator_component.topofiles) {
orte_show_help("help-ras-simulator.txt",
"no hwloc support for topofiles", true);
return ORTE_ERR_SILENT;
}
#endif #endif
/* setup the prefix to the node names */ /* setup the prefix to the node names */
@ -112,22 +119,33 @@ static int allocate(opal_list_t *nodes)
topo = opal_hwloc_topology; topo = opal_hwloc_topology;
} else { } else {
if (0 != hwloc_topology_init(&topo)) { if (0 != hwloc_topology_init(&topo)) {
return ORTE_ERROR; orte_show_help("help-ras-simulator.txt",
"hwloc API fail", true,
__FILE__, __LINE__, "hwloc_topology_init");
return ORTE_ERR_SILENT;
} }
if (0 != hwloc_topology_set_xml(topo, files[n])) { if (0 != hwloc_topology_set_xml(topo, files[n])) {
orte_show_help("help-ras-simulator.txt",
"hwloc failed to load xml", true, files[n]);
hwloc_topology_destroy(topo); hwloc_topology_destroy(topo);
return ORTE_ERROR; return ORTE_ERR_SILENT;
} }
/* since we are loading this from an external source, we have to /* since we are loading this from an external source, we have to
* explicitly set a flag so hwloc sets things up correctly * explicitly set a flag so hwloc sets things up correctly
*/ */
if (0 != hwloc_topology_set_flags(topo, HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM)) { if (0 != hwloc_topology_set_flags(topo, HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM)) {
orte_show_help("help-ras-simulator.txt",
"hwloc API fail", true,
__FILE__, __LINE__, "hwloc_topology_set_flags");
hwloc_topology_destroy(topo); hwloc_topology_destroy(topo);
return ORTE_ERROR; return ORTE_ERR_SILENT;
} }
if (0 != hwloc_topology_load(topo)) { if (0 != hwloc_topology_load(topo)) {
orte_show_help("help-ras-simulator.txt",
"hwloc API fail", true,
__FILE__, __LINE__, "hwloc_topology_load");
hwloc_topology_destroy(topo); hwloc_topology_destroy(topo);
return ORTE_ERROR; return ORTE_ERR_SILENT;
} }
/* remove the hostname from the topology. Unfortunately, hwloc /* remove the hostname from the topology. Unfortunately, hwloc
* decided to add the source hostname to the "topology", thus * decided to add the source hostname to the "topology", thus