1
1
openmpi/ompi/tools/ompi_info/ompi_info.h

131 строка
3.8 KiB
C
Исходник Обычный вид История

//
// Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
// University Research and Technology
// Corporation. All rights reserved.
// Copyright (c) 2004-2005 The University of Tennessee and The University
// of Tennessee Research Foundation. All rights
// reserved.
// Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
// University of Stuttgart. All rights reserved.
// Copyright (c) 2004-2005 The Regents of the University of California.
// All rights reserved.
// Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
// $COPYRIGHT$
//
// Additional copyrights may follow
//
// $HEADER$
//
#ifndef OMPI_INFO_H
#define OMPI_INFO_H
#include <string>
#include <vector>
#include <map>
#include "opal/class/opal_list.h"
#include "opal/util/cmd_line.h"
#include "opal/mca/mca.h"
namespace ompi_info {
//
// Globals
//
typedef std::vector<std::string> type_vector_t;
extern bool pretty;
extern opal_cmd_line_t *cmd_line;
extern const std::string type_all;
extern const std::string type_ompi;
extern const std::string type_orte;
extern const std::string type_opal;
extern const std::string type_base;
extern type_vector_t mca_types;
//
// Version-related strings and functions
//
extern const std::string ver_full;
extern const std::string ver_major;
extern const std::string ver_minor;
extern const std::string ver_release;
extern const std::string ver_greek;
extern const std::string ver_svn;
void do_version(bool want_all, opal_cmd_line_t *cmd_line);
void show_ompi_version(const std::string& scope);
void show_component_version(const std::string& type_name,
const std::string& component_name,
const std::string& scope,
const std::string& ver_type);
//
// Parameter/configuration-related functions
//
extern const std::string component_all;
extern const std::string param_all;
extern const std::string path_prefix;
extern const std::string path_bindir;
extern const std::string path_libdir;
extern const std::string path_incdir;
extern const std::string path_mandir;
extern const std::string path_pkglibdir;
extern const std::string path_sysconfdir;
extern const std::string path_exec_prefix;
extern const std::string path_sbindir;
extern const std::string path_libexecdir;
extern const std::string path_datarootdir;
extern const std::string path_datadir;
extern const std::string path_sharedstatedir;
extern const std::string path_localstatedir;
extern const std::string path_infodir;
extern const std::string path_pkgdatadir;
extern const std::string path_pkgincludedir;
void do_params(bool want_all, bool want_internal);
Fixes trac:1383 Lenny and I went back and forth on whether we should simply register another "mpi_paffinity_alone" MCA param and then try to figure out which one was set in ompi_mpi_init, but there was difficulty in figuring out what to do. So it seemed like the Right Thing to do was to implement what was committed in r18770; then we could tell where MCA parameters were set from and you could do Better Things (this is also useful in the openib BTL, where parameters can be set either via MCA parameter or via an INI file). But after that was done, it seemed only a few steps further to actually implement two new features in the MCA params area: * Synonyms (where one MCA param name is a synonym for another) * Allow MCA params and/or their synonyms to be marked as "deprecated" (printing out warnings if they are used) These features have actually long been discussed/desired, and I had some time in airports and airplanes recently where I could work in this stuff on a standalone laptop. So I did it. :-) This commit introduces these two new features, and then uses them to register mpi_paffinity_alone as a non-deprecated synonym for opal_paffinity_alone. A few other random points in this commit: * Add a few error checks for conditions that were not checked before * Correct some comments in mca_base_params.h * Add a few comments in strategic places * ompi_info now prints additional information: * for any MCA parameter that has synonyms, it lists all the synonyms * synonyms are also output as 1st-class MCA params, but with an additional attribute indicating that they have a "parent" * all MCA param name (both "real" or "synonym") will output an attribute indicating whether it is deprecated or not. A synonym is deprecated if it iself is marked as deprecated (via the mca_base_param_regist_syn() or mca_base_param_register_syn_name() functions) or if its "parent" MCA parameter is deprecated This commit was SVN r18859. The following SVN revision numbers were found above: r18770 --> open-mpi/ompi@8efe67e08cc0575d6221d2f81233d861b4101a9d The following Trac tickets were found above: Ticket 1383 --> https://svn.open-mpi.org/trac/ompi/ticket/1383
2008-07-10 05:44:51 +04:00
void show_mca_params(opal_list_t *info,
const std::string& type, const std::string& component,
bool want_internal);
void do_path(bool want_all, opal_cmd_line_t *cmd_line);
void show_path(const std::string& type, const std::string& value);
void do_arch();
void do_hostname();
void do_config(bool want_all);
//
// Output-related functions
//
void out(const std::string& pretty_message,
const std::string &plain_message,
int value);
void out(const std::string& pretty_message,
const std::string &plain_message,
const std::string& value,
bool strip_leading_whitespace = true,
bool strip_trailing_whitespace = true);
//
// Component-related functions
//
typedef std::map<std::string, opal_list_t *> component_map_t;
extern component_map_t component_map;
void open_components();
void close_components();
}
#endif /* OMPI_INFO_H */