2005-07-27 23:18:16 +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.
|
2006-08-23 03:32:36 +00:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-11-05 19:57:48 +00:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-07-27 23:18:16 +00:00
|
|
|
* 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$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/** @file:
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_SDS_BASE_H
|
|
|
|
#define MCA_SDS_BASE_H
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
|
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "orte/mca/sds/sds.h"
|
|
|
|
#include "orte/mca/ns/ns_types.h"
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Global functions for MCA overall collective open and close
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Open the sds framework
|
|
|
|
*/
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_sds_base_open(void);
|
2005-07-27 23:18:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Select a sds module
|
|
|
|
*/
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_sds_base_select(void);
|
2005-07-27 23:18:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Setup universe contact information
|
|
|
|
*/
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_sds_base_contact_universe(void);
|
2005-07-27 23:18:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Setup self and peer naming
|
|
|
|
*/
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_sds_base_set_name(void);
|
2005-07-27 23:18:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Close the sds framework
|
|
|
|
*/
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_sds_base_close(void);
|
2005-07-27 23:18:16 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Internal helper functions used by components
|
|
|
|
*/
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_sds_base_basic_contact_universe(void);
|
|
|
|
ORTE_DECLSPEC int orte_sds_base_seed_set_name(void);
|
Bring in the code for routing xcast stage gate messages via the local orteds. This code is inactive unless you specifically request it via an mca param oob_xcast_mode (can be set to "linear" or "direct"). Direct mode is the old standard method where we send messages directly to each MPI process. Linear mode sends the xcast message via the orteds, with the HNP sending the message to each orted directly.
There is a binomial algorithm in the code (i.e., the HNP would send to a subset of the orteds, which then relay it on according to the typical log-2 algo), but that has a bug in it so the code won't let you select it even if you tried (and the mca param doesn't show, so you'd *really* have to try).
This also involved a slight change to the oob.xcast API, so propagated that as required.
Note: this has *only* been tested on rsh, SLURM, and Bproc environments (now that it has been transferred to the OMPI trunk, I'll need to re-test it [only done rsh so far]). It should work fine on any environment that uses the ORTE daemons - anywhere else, you are on your own... :-)
Also, correct a mistake where the orte_debug_flag was declared an int, but the mca param was set as a bool. Move the storage for that flag to the orte/runtime/params.c and orte/runtime/params.h files appropriately.
This commit was SVN r14475.
2007-04-23 18:41:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_sds_base_contact_orted(char *orted_uri);
|
2007-05-21 14:57:58 +00:00
|
|
|
ORTE_DECLSPEC int orte_sds_env_get(void);
|
2005-07-27 23:18:16 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Put functions
|
|
|
|
*/
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_ns_nds_env_put(const orte_process_name_t* proc,
|
2005-07-27 23:18:16 +00:00
|
|
|
orte_vpid_t vpid_start,
|
Compute and pass the local_rank and local number of procs (in that proc's job) on the node.
To be precise, given this hypothetical launching pattern:
host1: vpids 0, 2, 4, 6
host2: vpids 1, 3, 5, 7
The local_rank for these procs would be:
host1: vpids 0->local_rank 0, v2->lr1, v4->lr2, v6->lr3
host2: vpids 1->local_rank 0, v3->lr1, v5->lr2, v7->lr3
and the number of local procs on each node would be four. If vpid=0 then does a comm_spawn of one process on host1, the values of the parent job would remain unchanged. The local_rank of the child process would be 0 and its num_local_procs would be 1 since it is in a separate jobid.
I have verified this functionality for the rsh case - need to verify that slurm and other cases also get the right values. Some consolidation of common code is probably going to occur in the SDS components to make this simpler and more maintainable in the future.
This commit was SVN r14706.
2007-05-21 14:30:10 +00:00
|
|
|
orte_std_cntr_t num_procs,
|
|
|
|
orte_vpid_t local_rank,
|
|
|
|
orte_std_cntr_t num_local_procs,
|
2007-06-05 03:03:59 +00:00
|
|
|
char ***env);
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_ns_nds_pipe_put(const orte_process_name_t* proc,
|
2005-07-27 23:18:16 +00:00
|
|
|
orte_vpid_t vpid_start,
|
Compute and pass the local_rank and local number of procs (in that proc's job) on the node.
To be precise, given this hypothetical launching pattern:
host1: vpids 0, 2, 4, 6
host2: vpids 1, 3, 5, 7
The local_rank for these procs would be:
host1: vpids 0->local_rank 0, v2->lr1, v4->lr2, v6->lr3
host2: vpids 1->local_rank 0, v3->lr1, v5->lr2, v7->lr3
and the number of local procs on each node would be four. If vpid=0 then does a comm_spawn of one process on host1, the values of the parent job would remain unchanged. The local_rank of the child process would be 0 and its num_local_procs would be 1 since it is in a separate jobid.
I have verified this functionality for the rsh case - need to verify that slurm and other cases also get the right values. Some consolidation of common code is probably going to occur in the SDS components to make this simpler and more maintainable in the future.
This commit was SVN r14706.
2007-05-21 14:30:10 +00:00
|
|
|
orte_std_cntr_t num_procs,
|
|
|
|
orte_vpid_t local_rank,
|
|
|
|
orte_std_cntr_t num_local_procs,
|
2005-07-27 23:18:16 +00:00
|
|
|
int fd);
|
2007-07-20 02:34:29 +00:00
|
|
|
ORTE_DECLSPEC int orte_ns_nds_bproc_put(orte_jobid_t job,
|
2005-07-27 23:18:16 +00:00
|
|
|
orte_vpid_t vpid_start,
|
|
|
|
orte_vpid_t global_vpid_start,
|
Compute and pass the local_rank and local number of procs (in that proc's job) on the node.
To be precise, given this hypothetical launching pattern:
host1: vpids 0, 2, 4, 6
host2: vpids 1, 3, 5, 7
The local_rank for these procs would be:
host1: vpids 0->local_rank 0, v2->lr1, v4->lr2, v6->lr3
host2: vpids 1->local_rank 0, v3->lr1, v5->lr2, v7->lr3
and the number of local procs on each node would be four. If vpid=0 then does a comm_spawn of one process on host1, the values of the parent job would remain unchanged. The local_rank of the child process would be 0 and its num_local_procs would be 1 since it is in a separate jobid.
I have verified this functionality for the rsh case - need to verify that slurm and other cases also get the right values. Some consolidation of common code is probably going to occur in the SDS components to make this simpler and more maintainable in the future.
This commit was SVN r14706.
2007-05-21 14:30:10 +00:00
|
|
|
orte_std_cntr_t num_procs,
|
|
|
|
orte_vpid_t local_rank,
|
|
|
|
orte_std_cntr_t num_local_procs,
|
|
|
|
char ***env);
|
2007-07-20 02:34:29 +00:00
|
|
|
ORTE_DECLSPEC int orte_ns_nds_xcpu_put(orte_jobid_t job,
|
Compute and pass the local_rank and local number of procs (in that proc's job) on the node.
To be precise, given this hypothetical launching pattern:
host1: vpids 0, 2, 4, 6
host2: vpids 1, 3, 5, 7
The local_rank for these procs would be:
host1: vpids 0->local_rank 0, v2->lr1, v4->lr2, v6->lr3
host2: vpids 1->local_rank 0, v3->lr1, v5->lr2, v7->lr3
and the number of local procs on each node would be four. If vpid=0 then does a comm_spawn of one process on host1, the values of the parent job would remain unchanged. The local_rank of the child process would be 0 and its num_local_procs would be 1 since it is in a separate jobid.
I have verified this functionality for the rsh case - need to verify that slurm and other cases also get the right values. Some consolidation of common code is probably going to occur in the SDS components to make this simpler and more maintainable in the future.
This commit was SVN r14706.
2007-05-21 14:30:10 +00:00
|
|
|
orte_vpid_t vpid_start,
|
|
|
|
orte_std_cntr_t num_procs,
|
|
|
|
orte_vpid_t local_rank,
|
|
|
|
orte_std_cntr_t num_local_procs,
|
|
|
|
char ***env);
|
2005-07-27 23:18:16 +00:00
|
|
|
|
2006-08-23 03:32:36 +00:00
|
|
|
ORTE_DECLSPEC extern opal_list_t orte_sds_base_components_available;
|
2005-07-28 15:14:46 +00:00
|
|
|
|
2005-07-27 23:18:16 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|