2004-01-15 07:47:20 +03:00
|
|
|
/*
|
2004-11-22 04:38:40 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-15 07:47:20 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-08-05 18:35:38 +04:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* Interface into the Open MPI Run Time Environment
|
|
|
|
*/
|
2005-05-19 17:33:55 +04:00
|
|
|
#ifndef ORTE_RUNTIME_H
|
|
|
|
#define ORTE_RUNTIME_H
|
2004-01-15 07:47:20 +03:00
|
|
|
|
2005-05-19 17:33:55 +04:00
|
|
|
#include "orte_config.h"
|
2004-02-01 00:47:59 +03:00
|
|
|
|
2004-10-20 05:03:09 +04:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
2004-09-03 23:26:49 +04:00
|
|
|
#include <sys/types.h>
|
2004-10-20 05:03:09 +04:00
|
|
|
#endif
|
2004-09-03 23:26:49 +04:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
#include "mca/gpr/gpr_types.h"
|
2005-07-04 04:13:44 +04:00
|
|
|
#include "opal/util/cmd_line.h"
|
2004-09-23 18:40:05 +04:00
|
|
|
|
2004-08-10 07:48:41 +04:00
|
|
|
#include "runtime/runtime_types.h"
|
2005-05-05 23:14:51 +04:00
|
|
|
#include "util/univ_info.h"
|
2004-09-03 23:19:59 +04:00
|
|
|
#include "mca/ns/ns.h"
|
2004-08-10 07:48:41 +04:00
|
|
|
|
2004-09-20 22:25:00 +04:00
|
|
|
/* constants for spawn constraints */
|
2004-09-30 01:29:51 +04: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 08:54:17 +04:00
|
|
|
#define OMPI_RTE_SPAWN_MULTI_CELL 0x0001
|
2004-09-30 01:29:51 +04: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 06:24:40 +04:00
|
|
|
neccessarily provide process monitoring or standard I/O
|
|
|
|
forwarding. The calling process may exit before all children have
|
|
|
|
exited. */
|
2004-09-20 22:25:00 +04:00
|
|
|
#define OMPI_RTE_SPAWN_DAEMON 0x0002
|
2004-09-30 01:29:51 +04: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 22:25:00 +04:00
|
|
|
#define OMPI_RTE_SPAWN_HIGH_QOS 0x0004
|
2004-09-30 01:29:51 +04:00
|
|
|
/** Spawn constraint - caller is an MPI process. The caller is an MPI
|
2004-10-20 06:24:40 +04: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 18:42:02 +03: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 08:54:17 +04:00
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
2004-01-15 07:47:20 +03:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/* globals used by RTE - instanced in orte_init.c */
|
2004-11-20 22:12:43 +03:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
OMPI_DECLSPEC extern int orte_debug_flag;
|
2004-09-03 20:26:15 +04: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 23:57:21 +03:00
|
|
|
OMPI_DECLSPEC int orte_abort(int status, char *fmt, ...);
|
2004-09-03 20:26:15 +04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2005-08-27 00:13:35 +04:00
|
|
|
* Initialize the Open Run Time Environment
|
2004-09-03 20:26:15 +04:00
|
|
|
*
|
2005-08-27 00:13:35 +04:00
|
|
|
* Initlize the Open Run Time Environment, including process
|
2005-03-14 23:57:21 +03:00
|
|
|
* control, malloc debugging and threads, and out of band messaging.
|
2005-08-27 00:13:35 +04:00
|
|
|
* This function should be called exactly once. This function should
|
2004-09-03 20:26:15 +04:00
|
|
|
* be called by every application using the RTE interface, including
|
|
|
|
* MPI applications and mpirun.
|
2005-08-27 00:13:35 +04:00
|
|
|
*
|
|
|
|
* @param infrastructure Whether we are ORTE infrastructure or an ORTE
|
|
|
|
* application
|
2004-09-03 20:26:15 +04:00
|
|
|
*/
|
2005-08-27 00:13:35 +04: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 20:50:12 +03:00
|
|
|
OMPI_DECLSPEC int orte_init_stage2(void);
|
|
|
|
|
2005-08-27 00:13:35 +04: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 20:26:15 +04:00
|
|
|
/**
|
2005-03-14 23:57:21 +03:00
|
|
|
* Re-init the Open run time environment.
|
2004-09-03 20:26:15 +04:00
|
|
|
*
|
2005-03-14 23:57:21 +03:00
|
|
|
* Restart selected components with a new process name.
|
2004-09-03 20:26:15 +04:00
|
|
|
*/
|
2005-03-14 23:57:21 +03:00
|
|
|
OMPI_DECLSPEC int orte_restart(orte_process_name_t* name, const char* uri);
|
2004-09-22 00:27:41 +04:00
|
|
|
|
2004-08-10 07:48:41 +04:00
|
|
|
/**
|
2005-03-14 23:57:21 +03:00
|
|
|
* Finalize the Open run time environment. Any function calling \code
|
|
|
|
* orte_init should call \code orte_finalize.
|
2004-08-10 07:48:41 +04:00
|
|
|
*
|
2004-09-23 18:40:05 +04:00
|
|
|
*/
|
2005-03-14 23:57:21 +03:00
|
|
|
OMPI_DECLSPEC int orte_finalize(void);
|
2005-05-19 17:33:55 +04:00
|
|
|
OMPI_DECLSPEC int orte_system_finalize(void);
|
2004-11-20 22:12:43 +03:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/*
|
2004-11-20 22:12:43 +03:00
|
|
|
* Change state as processes complete registration/unregistration
|
2004-08-28 05:15:19 +04:00
|
|
|
*/
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
OMPI_DECLSPEC void orte_all_procs_registered(orte_gpr_notify_message_t* match, void* cbdata);
|
2004-08-10 07:48:41 +04:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
OMPI_DECLSPEC void orte_all_procs_unregistered(orte_gpr_notify_message_t* match, void* cbdata);
|
2004-09-02 22:39:42 +04:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
OMPI_DECLSPEC int orte_monitor_procs_registered(void);
|
2004-09-03 20:26:15 +04:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
OMPI_DECLSPEC int orte_monitor_procs_unregistered(void);
|
2004-09-03 20:26:15 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Check for universe existence
|
|
|
|
*
|
2004-09-11 16:56:52 +04:00
|
|
|
* Checks to see if a specified universe exists. If so, attempts
|
2004-09-03 20:26:15 +04:00
|
|
|
* to connect to verify that the universe is accepting connections.
|
2004-09-11 16:56:52 +04:00
|
|
|
* If both ns and gpr replicas provided, first checks for those
|
|
|
|
* connections. Gets any missing info from the universe contact.
|
2004-09-03 20:26:15 +04:00
|
|
|
*
|
2005-05-05 23:14:51 +04:00
|
|
|
* @param univ Pointer to universe info struct where any found info
|
|
|
|
* is to be stored
|
2004-09-03 20:26:15 +04:00
|
|
|
*
|
|
|
|
* @retval OMPI_SUCCESS Universe found and connection accepted
|
|
|
|
* @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 23:14:51 +04:00
|
|
|
OMPI_DECLSPEC int orte_universe_exists(orte_universe_t *univ);
|
2004-09-14 18:21:04 +04:00
|
|
|
|
2005-01-13 18:30:49 +03:00
|
|
|
/**
|
|
|
|
* Setup I/O forwarding.
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int ompi_rte_init_io(void);
|
|
|
|
|
2005-05-05 23:20:47 +04:00
|
|
|
/**
|
|
|
|
* Establish a Head Node Process on a cluster's front end
|
|
|
|
*/
|
2005-05-13 01:44:23 +04:00
|
|
|
OMPI_DECLSPEC int orte_setup_hnp(char *target_cluster, char *headnode, char *username);
|
2005-05-05 23:20:47 +04:00
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
2004-01-15 07:47:20 +03:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#endif /* OMPI_RUNTIME_H */
|