2004-01-15 07:47:20 +03:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2006-08-23 07:32:36 +04:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. 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.
|
2007-01-05 00:48:34 +03:00
|
|
|
* Copyright (c) 2007 Sun Microsystems, Inc. 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
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte/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
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte/runtime/runtime_types.h"
|
|
|
|
#include "orte/util/univ_info.h"
|
|
|
|
#include "orte/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
|
|
|
|
|
2006-08-23 07:32:36 +04:00
|
|
|
/* globals used by RTE - instanced in orte_init.c */
|
2004-11-20 22:12:43 +03:00
|
|
|
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC extern int orte_debug_flag;
|
2004-09-03 20:26:15 +04:00
|
|
|
|
|
|
|
/**
|
2006-09-15 01:29:51 +04:00
|
|
|
* Abort the current application
|
2004-09-03 20:26:15 +04:00
|
|
|
*
|
2006-09-15 01:29:51 +04:00
|
|
|
* Aborts currently running application, NOTE: We do NOT call the
|
|
|
|
* regular C-library "abort" function, even
|
|
|
|
* though that would have alerted us to the fact that this is
|
|
|
|
* an abnormal termination, because it would automatically cause
|
|
|
|
* a core file to be generated. The "report" flag indicates if the
|
|
|
|
* function should create an appropriate file to alert the local
|
|
|
|
* orted that termination was abnormal.
|
2004-09-03 20:26:15 +04:00
|
|
|
*/
|
2006-09-15 01:29:51 +04:00
|
|
|
ORTE_DECLSPEC int orte_abort(int status, bool report);
|
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
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC int orte_init(bool infrastructure);
|
|
|
|
ORTE_DECLSPEC int orte_system_init(bool infrastructure);
|
|
|
|
ORTE_DECLSPEC int orte_init_stage1(bool infrastructure);
|
|
|
|
ORTE_DECLSPEC int orte_init_stage2(void);
|
2005-03-23 20:50:12 +03:00
|
|
|
|
2005-08-27 00:13:35 +04:00
|
|
|
/**
|
|
|
|
* Initialize parameters for ORTE.
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS Upon success.
|
|
|
|
* @retval ORTE_ERROR Upon failure.
|
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC int orte_register_params(bool infrastructure);
|
2005-08-27 00:13:35 +04:00
|
|
|
|
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
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_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
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC int orte_finalize(void);
|
|
|
|
ORTE_DECLSPEC int orte_system_finalize(void);
|
2004-11-20 22:12:43 +03:00
|
|
|
|
2006-08-23 07:32:36 +04:00
|
|
|
/*
|
|
|
|
* Change state as processes complete registration/unregistration
|
|
|
|
*/
|
2004-08-28 05:15:19 +04:00
|
|
|
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC void orte_all_procs_registered(orte_gpr_notify_message_t* match, void* cbdata);
|
2004-08-10 07:48:41 +04:00
|
|
|
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC void orte_all_procs_unregistered(orte_gpr_notify_message_t* match, void* cbdata);
|
2004-09-02 22:39:42 +04:00
|
|
|
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC int orte_monitor_procs_registered(void);
|
2004-09-03 20:26:15 +04:00
|
|
|
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC int orte_monitor_procs_unregistered(void);
|
2004-09-03 20:26:15 +04:00
|
|
|
|
2006-06-29 01:03:31 +04: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.
|
|
|
|
*/
|
2007-01-05 00:48:34 +03:00
|
|
|
ORTE_DECLSPEC int orte_universe_search(opal_list_t *universe_list, bool report_broken_files,
|
|
|
|
bool remove_broken_files);
|
2006-06-29 01:03:31 +04:00
|
|
|
|
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
|
|
|
*
|
2006-02-12 04:33:29 +03:00
|
|
|
* @retval ORTE_SUCCESS Universe found and connection accepted
|
2004-09-03 20:26:15 +04: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.
|
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_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.
|
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC int ompi_rte_init_io(void);
|
2005-01-13 18:30:49 +03:00
|
|
|
|
2005-05-05 23:20:47 +04:00
|
|
|
/**
|
|
|
|
* Establish a Head Node Process on a cluster's front end
|
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC int orte_setup_hnp(char *target_cluster, char *headnode, char *username);
|
2005-05-05 23:20:47 +04:00
|
|
|
|
2007-02-03 03:25:42 +03:00
|
|
|
/**
|
|
|
|
* Clean out all directories in a session directory except for the one
|
|
|
|
* handed in.
|
|
|
|
* @param my_universe Name of universe to not remove
|
|
|
|
* @param verbose Print out information as directories are removed
|
|
|
|
*/
|
|
|
|
ORTE_DECLSPEC void orte_universe_clean_directories(char *my_universe, int verbose);
|
|
|
|
|
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 */
|