2004-01-15 04:47:20 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00:00
|
|
|
* Copyright (c) 2004-2005 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.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-15 04:47:20 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-08-05 14:35:38 +00:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* Interface into the Open MPI Run Time Environment
|
|
|
|
*/
|
2005-05-19 13:33:55 +00:00
|
|
|
#ifndef ORTE_RUNTIME_H
|
|
|
|
#define ORTE_RUNTIME_H
|
2004-01-15 04:47:20 +00:00
|
|
|
|
2005-05-19 13:33:55 +00:00
|
|
|
#include "orte_config.h"
|
2004-01-31 21:47:59 +00:00
|
|
|
|
2004-10-20 01:03:09 +00:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
2004-09-03 19:26:49 +00:00
|
|
|
#include <sys/types.h>
|
2004-10-20 01:03:09 +00:00
|
|
|
#endif
|
2004-09-03 19:26:49 +00:00
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte/mca/gpr/gpr_types.h"
|
2005-07-04 00:13:44 +00:00
|
|
|
#include "opal/util/cmd_line.h"
|
2004-09-23 14:40:05 +00:00
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte/runtime/runtime_types.h"
|
|
|
|
#include "orte/util/univ_info.h"
|
|
|
|
#include "orte/mca/ns/ns.h"
|
2004-08-10 03:48:41 +00:00
|
|
|
|
2004-09-20 18:25:00 +00:00
|
|
|
/* constants for spawn constraints */
|
2004-09-29 21:29:51 +00:00
|
|
|
|
|
|
|
/** Spawn constraint - require multi-cell support. The selected spawn
|
|
|
|
system must be capable of starting across multiple cells. This
|
|
|
|
allows multiple pcms to be used to satisfy a single resource
|
|
|
|
allocation request */
|
2004-09-10 04:54:17 +00:00
|
|
|
#define OMPI_RTE_SPAWN_MULTI_CELL 0x0001
|
2004-09-29 21:29:51 +00:00
|
|
|
/** Spawn constraint - require ability to launch daemons. The
|
|
|
|
selected spawn system must be capable of starting daemon process.
|
|
|
|
Setting this flag will result in a spawn service that does not
|
2004-10-20 02:24:40 +00:00
|
|
|
neccessarily provide process monitoring or standard I/O
|
|
|
|
forwarding. The calling process may exit before all children have
|
|
|
|
exited. */
|
2004-09-20 18:25:00 +00:00
|
|
|
#define OMPI_RTE_SPAWN_DAEMON 0x0002
|
2004-09-29 21:29:51 +00:00
|
|
|
/** Spawn constraint - require quality of service support. The
|
|
|
|
selected spawn system must provide I/O forwarding, quick process
|
|
|
|
shutdown, and process status monitoring. */
|
2004-09-20 18:25:00 +00:00
|
|
|
#define OMPI_RTE_SPAWN_HIGH_QOS 0x0004
|
2004-09-29 21:29:51 +00:00
|
|
|
/** Spawn constraint - caller is an MPI process. The caller is an MPI
|
2004-10-20 02:24:40 +00:00
|
|
|
application (has called MPI_Init). This should be used only for
|
|
|
|
MPI_COMM_SPAWN and MPI_COMM_SPAWN_MULTIPLE. The calling process
|
|
|
|
will follow the semantics of the MPI_COMM_SPAWN_* functions. */
|
|
|
|
#define OMPI_RTE_SPAWN_FROM_MPI 0x0008
|
2004-12-16 15:42:02 +00:00
|
|
|
/** Spawn constraint - require ability to launch either MPMD (hence
|
|
|
|
the name) applications or applications with specific placement of
|
|
|
|
processes. */
|
|
|
|
#define OMPI_RTE_SPAWN_MPMD 0x0010
|
2004-09-10 04:54:17 +00:00
|
|
|
|
2004-10-20 22:31:03 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
2004-01-15 04:47:20 +00:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
/* globals used by RTE - instanced in orte_init.c */
|
2004-11-20 19:12:43 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
OMPI_DECLSPEC extern int orte_debug_flag;
|
2004-09-03 16:26:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Abort the current application with a pretty-print error message
|
|
|
|
*
|
|
|
|
* Aborts currently running application with \code abort(), pretty
|
|
|
|
* printing an error message if possible. Error message should be
|
|
|
|
* specified using the standard \code printf() format.
|
|
|
|
*/
|
2005-03-14 20:57:21 +00:00
|
|
|
OMPI_DECLSPEC int orte_abort(int status, char *fmt, ...);
|
2004-09-03 16:26:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2005-08-26 20:13:35 +00:00
|
|
|
* Initialize the Open Run Time Environment
|
2004-09-03 16:26:15 +00:00
|
|
|
*
|
2005-08-26 20:13:35 +00:00
|
|
|
* Initlize the Open Run Time Environment, including process
|
2005-03-14 20:57:21 +00:00
|
|
|
* control, malloc debugging and threads, and out of band messaging.
|
2005-08-26 20:13:35 +00:00
|
|
|
* This function should be called exactly once. This function should
|
2004-09-03 16:26:15 +00:00
|
|
|
* be called by every application using the RTE interface, including
|
|
|
|
* MPI applications and mpirun.
|
2005-08-26 20:13:35 +00:00
|
|
|
*
|
|
|
|
* @param infrastructure Whether we are ORTE infrastructure or an ORTE
|
|
|
|
* application
|
2004-09-03 16:26:15 +00:00
|
|
|
*/
|
2005-08-26 20:13:35 +00:00
|
|
|
OMPI_DECLSPEC int orte_init(bool infrastructure);
|
|
|
|
OMPI_DECLSPEC int orte_system_init(bool infrastructure);
|
|
|
|
OMPI_DECLSPEC int orte_init_stage1(bool infrastructure);
|
2005-03-23 17:50:12 +00:00
|
|
|
OMPI_DECLSPEC int orte_init_stage2(void);
|
|
|
|
|
2005-08-26 20:13:35 +00:00
|
|
|
/**
|
|
|
|
* Initialize parameters for ORTE.
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS Upon success.
|
|
|
|
* @retval ORTE_ERROR Upon failure.
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int orte_register_params(bool infrastructure);
|
|
|
|
|
2004-09-03 16:26:15 +00:00
|
|
|
/**
|
2005-03-14 20:57:21 +00:00
|
|
|
* Re-init the Open run time environment.
|
2004-09-03 16:26:15 +00:00
|
|
|
*
|
2005-03-14 20:57:21 +00:00
|
|
|
* Restart selected components with a new process name.
|
2004-09-03 16:26:15 +00:00
|
|
|
*/
|
2005-03-14 20:57:21 +00:00
|
|
|
OMPI_DECLSPEC int orte_restart(orte_process_name_t* name, const char* uri);
|
2004-09-21 20:27:41 +00:00
|
|
|
|
2004-08-10 03:48:41 +00:00
|
|
|
/**
|
2005-03-14 20:57:21 +00:00
|
|
|
* Finalize the Open run time environment. Any function calling \code
|
|
|
|
* orte_init should call \code orte_finalize.
|
2004-08-10 03:48:41 +00:00
|
|
|
*
|
2004-09-23 14:40:05 +00:00
|
|
|
*/
|
2005-03-14 20:57:21 +00:00
|
|
|
OMPI_DECLSPEC int orte_finalize(void);
|
2005-05-19 13:33:55 +00:00
|
|
|
OMPI_DECLSPEC int orte_system_finalize(void);
|
2004-11-20 19:12:43 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
/*
|
2004-11-20 19:12:43 +00:00
|
|
|
* Change state as processes complete registration/unregistration
|
2004-08-28 01:15:19 +00:00
|
|
|
*/
|
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
OMPI_DECLSPEC void orte_all_procs_registered(orte_gpr_notify_message_t* match, void* cbdata);
|
2004-08-10 03:48:41 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
OMPI_DECLSPEC void orte_all_procs_unregistered(orte_gpr_notify_message_t* match, void* cbdata);
|
2004-09-02 18:39:42 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
OMPI_DECLSPEC int orte_monitor_procs_registered(void);
|
2004-09-03 16:26:15 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
OMPI_DECLSPEC int orte_monitor_procs_unregistered(void);
|
2004-09-03 16:26:15 +00:00
|
|
|
|
2006-06-28 21:03:31 +00:00
|
|
|
/**
|
|
|
|
* Obtain a listing of all the universes on the machine
|
|
|
|
*
|
|
|
|
* @param univ_list An opal_list_t is returned to the user.
|
|
|
|
* This is not initalized in the function, the caller retains
|
|
|
|
* the responsibility for this variable.
|
|
|
|
* @retval ORTE_SUCCESS Upon successful search.
|
|
|
|
* @retval ORTE_ERROR Upon unsuccessful search.
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int orte_universe_search(opal_list_t *universe_list);
|
|
|
|
|
2004-09-03 16:26:15 +00:00
|
|
|
/**
|
|
|
|
* Check for universe existence
|
|
|
|
*
|
2004-09-11 12:56:52 +00:00
|
|
|
* Checks to see if a specified universe exists. If so, attempts
|
2004-09-03 16:26:15 +00:00
|
|
|
* to connect to verify that the universe is accepting connections.
|
2004-09-11 12:56:52 +00:00
|
|
|
* If both ns and gpr replicas provided, first checks for those
|
|
|
|
* connections. Gets any missing info from the universe contact.
|
2004-09-03 16:26:15 +00:00
|
|
|
*
|
2005-05-05 19:14:51 +00:00
|
|
|
* @param univ Pointer to universe info struct where any found info
|
|
|
|
* is to be stored
|
2004-09-03 16:26:15 +00:00
|
|
|
*
|
2006-02-12 01:33:29 +00:00
|
|
|
* @retval ORTE_SUCCESS Universe found and connection accepted
|
2004-09-03 16:26:15 +00:00
|
|
|
* @retval OMPI_NO_CONNECTION_ALLOWED Universe found, but not persistent or
|
|
|
|
* restricted to local scope
|
|
|
|
* @retval OMPI_CONNECTION_FAILED Universe found, but connection attempt
|
|
|
|
* failed. Probably caused by unclean termination of the universe seed
|
|
|
|
* daemon.
|
|
|
|
* @retval OMPI_CONNECTION_REFUSED Universe found and contact made, but
|
|
|
|
* universe refused to allow connection.
|
|
|
|
*/
|
2005-05-05 19:14:51 +00:00
|
|
|
OMPI_DECLSPEC int orte_universe_exists(orte_universe_t *univ);
|
2004-09-14 14:21:04 +00:00
|
|
|
|
2005-01-13 15:30:49 +00:00
|
|
|
/**
|
|
|
|
* Setup I/O forwarding.
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int ompi_rte_init_io(void);
|
|
|
|
|
2005-05-05 19:20:47 +00:00
|
|
|
/**
|
|
|
|
* Establish a Head Node Process on a cluster's front end
|
|
|
|
*/
|
2005-05-12 21:44:23 +00:00
|
|
|
OMPI_DECLSPEC int orte_setup_hnp(char *target_cluster, char *headnode, char *username);
|
2005-05-05 19:20:47 +00:00
|
|
|
|
2004-10-20 22:31:03 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
2004-01-15 04:47:20 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
#endif /* OMPI_RUNTIME_H */
|