* Activate the RMS PCM. It still isn't thread safe, but marks itself as
such, so no reason not to turn it on. * Add some more comments to the pcm interface about recent changes to the interface * Add some comments to the RMS PCM and move the global list destruct from finalize to close, since finalize may be called many times. This commit was SVN r2593.
Этот коммит содержится в:
родитель
ac0043cf6d
Коммит
c2d7fab259
@ -88,6 +88,13 @@
|
|||||||
* @param constrains (IN) Bit-wise mask of constraints put on the PCM.
|
* @param constrains (IN) Bit-wise mask of constraints put on the PCM.
|
||||||
* List of available constants is in the run-time interface -
|
* List of available constants is in the run-time interface -
|
||||||
* constants start with \c OMPI_RTE_SPAWN_.
|
* constants start with \c OMPI_RTE_SPAWN_.
|
||||||
|
*
|
||||||
|
* \warning The only requirement on the returned type is that the
|
||||||
|
* first sizeof(struct mca_pcm_base_module_1_0_0_t) bytes have the
|
||||||
|
* same structure as a struct mca_pcm_base_module_1_0_0_t. The pcm is
|
||||||
|
* free to return a pointer to a larger structure in order to maintain
|
||||||
|
* per-module information it may need. Therefore, the caller should
|
||||||
|
* never copy the structure or assume its size.
|
||||||
*/
|
*/
|
||||||
typedef struct mca_pcm_base_module_1_0_0_t*
|
typedef struct mca_pcm_base_module_1_0_0_t*
|
||||||
(*mca_pcm_base_component_init_fn_t)(int *priority,
|
(*mca_pcm_base_component_init_fn_t)(int *priority,
|
||||||
@ -101,7 +108,6 @@ typedef struct mca_pcm_base_module_1_0_0_t*
|
|||||||
*
|
*
|
||||||
* Called by the MCA framework to finalize the component. Will be
|
* Called by the MCA framework to finalize the component. Will be
|
||||||
* called once per successful call to pcm_base_compoenent_init.
|
* called once per successful call to pcm_base_compoenent_init.
|
||||||
|
|
||||||
*
|
*
|
||||||
* @param me (IN) Pointer to the module being finalized
|
* @param me (IN) Pointer to the module being finalized
|
||||||
*/
|
*/
|
||||||
@ -138,6 +144,8 @@ typedef mca_pcm_base_component_1_0_0_t mca_pcm_base_component_t;
|
|||||||
* PBS variables required for uniquely identifying the PBS job
|
* PBS variables required for uniquely identifying the PBS job
|
||||||
* environment (the same is true of LSF, SGE, etc.).
|
* environment (the same is true of LSF, SGE, etc.).
|
||||||
*
|
*
|
||||||
|
* @param me (IN) Pointer to the module struct
|
||||||
|
*
|
||||||
* @returns NULL on error or if no uniqueness available
|
* @returns NULL on error or if no uniqueness available
|
||||||
* non-null otherwize
|
* non-null otherwize
|
||||||
*/
|
*/
|
||||||
@ -155,6 +163,7 @@ typedef char *
|
|||||||
* as appropriate should this occur. This function should only be
|
* as appropriate should this occur. This function should only be
|
||||||
* called once per jobid.
|
* called once per jobid.
|
||||||
*
|
*
|
||||||
|
* @param me (IN) Pointer to the module struct
|
||||||
* @param jobid (IN) Jobid with which to associate the given resources.
|
* @param jobid (IN) Jobid with which to associate the given resources.
|
||||||
* @param nodes (IN) Number of nodes to try to allocate. If 0,
|
* @param nodes (IN) Number of nodes to try to allocate. If 0,
|
||||||
* the PCM will try to allocate <code>procs</code>
|
* the PCM will try to allocate <code>procs</code>
|
||||||
@ -179,6 +188,8 @@ typedef ompi_list_t*
|
|||||||
* This tells you whether the pcm module is capable of spawning new
|
* This tells you whether the pcm module is capable of spawning new
|
||||||
* processes or not during a run
|
* processes or not during a run
|
||||||
*
|
*
|
||||||
|
* @param me (IN) Pointer to the module struct
|
||||||
|
*
|
||||||
* @return True/False
|
* @return True/False
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -193,6 +204,11 @@ typedef bool
|
|||||||
* 0 for the forseeable future). The job is specified using an array
|
* 0 for the forseeable future). The job is specified using an array
|
||||||
* of \c mca_pcm_base_schedule_t structures, which give both process
|
* of \c mca_pcm_base_schedule_t structures, which give both process
|
||||||
* and location information.
|
* and location information.
|
||||||
|
*
|
||||||
|
* @param me (IN) Pointer to the module struct
|
||||||
|
* @param jobid (IN) Jobid under which the job should be started
|
||||||
|
* @param schedule_list (IN) A list of \c mca_pcm_base_schedule_t
|
||||||
|
* structures describing the job to start.
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*mca_pcm_base_spawn_procs_fn_t)(struct mca_pcm_base_module_1_0_0_t* me,
|
(*mca_pcm_base_spawn_procs_fn_t)(struct mca_pcm_base_module_1_0_0_t* me,
|
||||||
@ -203,7 +219,9 @@ typedef int
|
|||||||
/**
|
/**
|
||||||
* Kill a specific process in this cell
|
* Kill a specific process in this cell
|
||||||
*
|
*
|
||||||
* @param process_name Which process needs to be killed.
|
* @param me (IN) Pointer to the module struct
|
||||||
|
* @param process_name (IN) Which process needs to be killed.
|
||||||
|
*
|
||||||
* @return Error code
|
* @return Error code
|
||||||
*
|
*
|
||||||
* @warning flags is currently ignored, but should be set to 0 for
|
* @warning flags is currently ignored, but should be set to 0 for
|
||||||
@ -220,7 +238,9 @@ typedef int
|
|||||||
* the processes in the job by contacting the registry and then call
|
* the processes in the job by contacting the registry and then call
|
||||||
* mca_pcm_kill_process for each process in the job (for a cell)
|
* mca_pcm_kill_process for each process in the job (for a cell)
|
||||||
*
|
*
|
||||||
* @param jobid Job id
|
* @param me (IN) Pointer to the module struct
|
||||||
|
* @param jobid (IN) Job id
|
||||||
|
*
|
||||||
* @return Error code
|
* @return Error code
|
||||||
*
|
*
|
||||||
* @warning flags is currently ignored, but should be set to 0 for
|
* @warning flags is currently ignored, but should be set to 0 for
|
||||||
@ -237,6 +257,7 @@ typedef int
|
|||||||
*
|
*
|
||||||
* Return the resources for the given jobid to the system.
|
* Return the resources for the given jobid to the system.
|
||||||
*
|
*
|
||||||
|
* @param me (IN) Pointer to the module struct
|
||||||
* @param jobid (IN) Jobid associated with the resources to be freed.
|
* @param jobid (IN) Jobid associated with the resources to be freed.
|
||||||
* @param nodes (IN) Nodelist from associated allocate_resource call.
|
* @param nodes (IN) Nodelist from associated allocate_resource call.
|
||||||
* All associated memory will be freed as appropriate.
|
* All associated memory will be freed as appropriate.
|
||||||
|
@ -83,7 +83,9 @@ static int mca_pcm_rms_param_debug;
|
|||||||
static int mca_pcm_rms_param_use_ns;
|
static int mca_pcm_rms_param_use_ns;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Module variables
|
* Component variables. All of these are shared among the module
|
||||||
|
* instances, so they don't need to go in a special structure or
|
||||||
|
* anything.
|
||||||
*/
|
*/
|
||||||
ompi_list_t mca_pcm_rms_jobs;
|
ompi_list_t mca_pcm_rms_jobs;
|
||||||
int mca_pcm_rms_output = 0;
|
int mca_pcm_rms_output = 0;
|
||||||
@ -110,7 +112,9 @@ mca_pcm_rms_component_open(void)
|
|||||||
int
|
int
|
||||||
mca_pcm_rms_component_close(void)
|
mca_pcm_rms_component_close(void)
|
||||||
{
|
{
|
||||||
return OMPI_SUCCESS;
|
OBJ_DESTRUCT(&mca_pcm_rms_jobs);
|
||||||
|
|
||||||
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -137,6 +141,7 @@ mca_pcm_rms_init(int *priority,
|
|||||||
/* poke around for prun */
|
/* poke around for prun */
|
||||||
prun = ompi_path_env_findv("prun", X_OK, environ, NULL);
|
prun = ompi_path_env_findv("prun", X_OK, environ, NULL);
|
||||||
if (NULL == prun) return NULL;
|
if (NULL == prun) return NULL;
|
||||||
|
free(prun);
|
||||||
|
|
||||||
return &mca_pcm_rms_1_0_0;
|
return &mca_pcm_rms_1_0_0;
|
||||||
}
|
}
|
||||||
@ -149,8 +154,6 @@ mca_pcm_rms_finalize(struct mca_pcm_base_module_1_0_0_t* me)
|
|||||||
ompi_output_close(mca_pcm_rms_output);
|
ompi_output_close(mca_pcm_rms_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
OBJ_DESTRUCT(&mca_pcm_rms_jobs);
|
|
||||||
|
|
||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user