1
1
openmpi/src/mca/pcm/ompid/pcm_ompid.h
Brian Barrett 782d3af2b9 * Move to using a lazy selection for pcms so that we can have multiple PCM
sets running at once - requires an additional step in spawning to get a
  handle (that will contain multiple pcms when we support multi-cell)
* change the selection logic of the pcms to not care about setting threads,
  but instead to select based on the selected thread level, since it
  would be a little late by the time we did the selection for pcms.
* started the long process of cleaning up the rsh pcm so that it
  actually kills processes and things.  Still doesn't do anything useful,
  but getting to the point where that might be possible

This commit was SVN r2794.
2004-09-21 20:27:41 +00:00

83 строки
2.8 KiB
C

/*
*
* $HEADER$
*
*/
#include "ompi_config.h"
#include "mca/pcm/pcm.h"
#include "runtime/runtime_types.h"
/*
* Module open / close
*/
int mca_pcm_ompid_open(void);
int mca_pcm_ompid_close(void);
/*
* Resource data structures
*/
struct mca_pcm_ompid_node_t {
ompi_rte_node_allocation_data_t base;
ompi_process_name_t name;
};
typedef struct mca_pcm_ompid_node_t mca_pcm_ompid_node_t;
OBJ_CLASS_DECLARATION(mca_pcm_ompid_node_t);
/*
* Startup / Shutdown
*/
struct mca_pcm_base_module_1_0_0_t* mca_pcm_ompid_init(
int *priority,
bool have_threads,
int constraints);
int mca_pcm_ompid_finalize(struct mca_pcm_base_module_1_0_0_t* me);
/**
* Allocate requested resources
*
* Allocate the specified nodes / processes for use in a new job.
* Requires a jobid from the PCM interface. The allocation returned
* may be smaller than requested - it is up to the caller to proceed
* as appropriate should this occur. This function should only be
* called once per jobid.
*
* @param jobid (IN) Jobid with which to associate the given resources.
* @param nodes (IN) Number of nodes to try to allocate. If 0,
* the PCM will try to allocate <code>procs</code>
* processes on as many nodes as are needed. If non-zero,
* will try to fairly distribute <code>procs</code>
* processes over the nodes. If <code>procs</code> is 0,
* will attempt to allocate all cpus on
* <code>nodes</code> nodes
* @param procs (IN) Number of processors to try to allocate. See the note
* for <code>nodes</code> for usage.
* @param nodelist (OUT) List of <code>mca_pcm_node_t</code>s describing
* the allocated resources.
*/
ompi_list_t* mca_pcm_ompid_allocate_resources(
struct mca_pcm_base_module_1_0_0_t* me,
mca_ns_base_jobid_t jobid,
int nodes,
int procs);
/**
* Spawn a job
*
* Start a job with given jobid and starting vpid (should probably be
* 0 for the forseeable future). The job is specified using an array
* of \c mca_pcm_base_schedule_t structures, which give both process
* and location information.
*/
int mca_pcm_ompid_spawn_procs(
struct mca_pcm_base_module_1_0_0_t* me,
mca_ns_base_jobid_t jobid,
ompi_list_t *schedule_list);