* Move the parallel job handle type into lam/types.h and use in both the
pcm and oob module type This commit was SVN r221.
Этот коммит содержится в:
родитель
92310bd68d
Коммит
0cc9045e79
@ -29,5 +29,11 @@ typedef struct lam_fd_set_t lam_fd_set_t;
|
|||||||
#define LAM_FD_CLR(fd,fds) FD_CLR((fd),(fd_set*)(fds))
|
#define LAM_FD_CLR(fd,fds) FD_CLR((fd),(fd_set*)(fds))
|
||||||
#define LAM_FD_ISSET(fd,fds) FD_ISSET((fd),(fd_set*)(fds))
|
#define LAM_FD_ISSET(fd,fds) FD_ISSET((fd),(fd_set*)(fds))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* handle to describe a parallel job
|
||||||
|
*/
|
||||||
|
typedef char* lam_job_handle_t;
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "mca/lam/oob/cofs/src/oob_cofs.h"
|
#include "mca/lam/oob/cofs/src/oob_cofs.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
mca_oob_cofs_send(char* parallel_job_id, int vpid, int tag,
|
mca_oob_cofs_send(lam_job_handle_t job_handle, int vpid, int tag,
|
||||||
void* data, size_t data_len)
|
void* data, size_t data_len)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -18,7 +18,7 @@ mca_oob_cofs_send(char* parallel_job_id, int vpid, int tag,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
mca_oob_cofs_recv(char* parallel_job_id, int* tag, int* vpid,
|
mca_oob_cofs_recv(lam_job_handle_t job_handle, int* tag, int* vpid,
|
||||||
void** data, size_t* data_len)
|
void** data, size_t* data_len)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -26,7 +26,7 @@ mca_oob_cofs_recv(char* parallel_job_id, int* tag, int* vpid,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
mca_oob_cofs_recv_nb(char* parallel_job_id, int* tag, int* vpid,
|
mca_oob_cofs_recv_nb(lam_job_handle_t job_handle, int* tag, int* vpid,
|
||||||
void** data, size_t* data_len)
|
void** data, size_t* data_len)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -34,7 +34,7 @@ mca_oob_cofs_recv_nb(char* parallel_job_id, int* tag, int* vpid,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
mca_oob_cofs_recv_cb(char* parallel_job_id, int tag,
|
mca_oob_cofs_recv_cb(lam_job_handle_t job_handle, int tag,
|
||||||
mca_oob_recv_cb_t callback)
|
mca_oob_recv_cb_t callback)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mca/lam/oob/oob.h"
|
#include "mca/lam/oob/oob.h"
|
||||||
|
#include "lam/types.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Module open / close
|
* Module open / close
|
||||||
@ -24,11 +25,11 @@ int mca_oob_cofs_finalize(void);
|
|||||||
/*
|
/*
|
||||||
* "Action" functions
|
* "Action" functions
|
||||||
*/
|
*/
|
||||||
int mca_oob_cofs_send(char* parallel_job_id, int vpid, int tag,
|
int mca_oob_cofs_send(lam_job_handle_t job_handle, int vpid, int tag,
|
||||||
void* data, size_t data_len);
|
void* data, size_t data_len);
|
||||||
int mca_oob_cofs_recv(char* parallel_job_id, int* tag, int* vpid,
|
int mca_oob_cofs_recv(lam_job_handle_t job_handle, int* tag, int* vpid,
|
||||||
void** data, size_t* data_len);
|
void** data, size_t* data_len);
|
||||||
int mca_oob_cofs_recv_nb(char* parallel_job_id, int* tag, int* vpid,
|
int mca_oob_cofs_recv_nb(lam_job_handle_t job_handle, int* tag, int* vpid,
|
||||||
void** data, size_t* data_len);
|
void** data, size_t* data_len);
|
||||||
int mca_oob_cofs_recv_cb(char* parallel_job_id, int tag,
|
int mca_oob_cofs_recv_cb(lam_job_handle_t job_handle, int tag,
|
||||||
mca_oob_recv_cb_t callback);
|
mca_oob_recv_cb_t callback);
|
||||||
|
@ -63,6 +63,10 @@ mca_oob_cofs_query(int *priority)
|
|||||||
struct mca_oob_1_0_0*
|
struct mca_oob_1_0_0*
|
||||||
mca_oob_cofs_init(void)
|
mca_oob_cofs_init(void)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* BWB - fix me, make register the "right" way...
|
||||||
|
*/
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,8 +35,7 @@
|
|||||||
#include "lam_config.h"
|
#include "lam_config.h"
|
||||||
|
|
||||||
#include "mca/mca.h"
|
#include "mca/mca.h"
|
||||||
|
#include "lam/types.h"
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Global constants / types
|
* Global constants / types
|
||||||
@ -49,7 +48,7 @@
|
|||||||
/* "Special" vpids */
|
/* "Special" vpids */
|
||||||
#define MCA_OOB_MPIRUN -1
|
#define MCA_OOB_MPIRUN -1
|
||||||
|
|
||||||
typedef void (*mca_oob_recv_cb_t)(char* parallel_job_id, int tag,
|
typedef void (*mca_oob_recv_cb_t)(lam_job_handle_t job_handle, int tag,
|
||||||
int vpid, void* data, size_t data_len, int status);
|
int vpid, void* data, size_t data_len, int status);
|
||||||
|
|
||||||
|
|
||||||
@ -58,13 +57,13 @@ typedef void (*mca_oob_recv_cb_t)(char* parallel_job_id, int tag,
|
|||||||
*/
|
*/
|
||||||
typedef int (*mca_oob_query_fn_t)(int *priority);
|
typedef int (*mca_oob_query_fn_t)(int *priority);
|
||||||
typedef struct mca_oob_1_0_0* (*mca_oob_init_fn_t)(void);
|
typedef struct mca_oob_1_0_0* (*mca_oob_init_fn_t)(void);
|
||||||
typedef int (*mca_oob_send_fn_t)(char* parallel_job_id, int vpid, int tag,
|
typedef int (*mca_oob_send_fn_t)(lam_job_handle_t job_handle, int vpid, int tag,
|
||||||
void* data, size_t data_len);
|
void* data, size_t data_len);
|
||||||
typedef int (*mca_oob_recv_fn_t)(char* parallel_job_id, int* tag, int* vpid,
|
typedef int (*mca_oob_recv_fn_t)(lam_job_handle_t job_handle, int* tag, int* vpid,
|
||||||
void** data, size_t* data_len);
|
void** data, size_t* data_len);
|
||||||
typedef int (*mca_oob_recv_nb_fn_t)(char* parallel_job_id, int* tag, int* vpid,
|
typedef int (*mca_oob_recv_nb_fn_t)(lam_job_handle_t job_handle, int* tag, int* vpid,
|
||||||
void** data, size_t* data_len);
|
void** data, size_t* data_len);
|
||||||
typedef int (*mca_oob_recv_cb_fn_t)(char* parallel_job_id, int tag,
|
typedef int (*mca_oob_recv_cb_fn_t)(lam_job_handle_t job_handle, int tag,
|
||||||
mca_oob_recv_cb_t callback);
|
mca_oob_recv_cb_t callback);
|
||||||
typedef int (*mca_oob_finalize_fn_t)(void);
|
typedef int (*mca_oob_finalize_fn_t)(void);
|
||||||
|
|
||||||
@ -114,8 +113,6 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* Global struct holding the selected module's function pointers
|
* Global struct holding the selected module's function pointers
|
||||||
*/
|
*/
|
||||||
#if 0
|
|
||||||
extern mca_oob_t mca_oob;
|
extern mca_oob_t mca_oob;
|
||||||
#endif /* #if 0 */
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
#include "lam_config.h"
|
#include "lam_config.h"
|
||||||
|
|
||||||
#include "mca/mca.h"
|
#include "mca/mca.h"
|
||||||
|
#include "lam/types.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "PCM" global types
|
* "PCM" global types
|
||||||
@ -74,8 +75,6 @@ typedef struct lam_pcm_control_args {
|
|||||||
char* value;
|
char* value;
|
||||||
} lam_pcm_control_args_t;
|
} lam_pcm_control_args_t;
|
||||||
|
|
||||||
typedef char* lam_pcm_job_handle_t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* functions every module must provide
|
* functions every module must provide
|
||||||
*/
|
*/
|
||||||
@ -128,7 +127,7 @@ typedef int (*mca_pcm_query_get_nodes)(lam_pcm_node_t **nodes, size_t *nodes_len
|
|||||||
*
|
*
|
||||||
* \warning The handle must be released using lam_pcm_handle_free
|
* \warning The handle must be released using lam_pcm_handle_free
|
||||||
*/
|
*/
|
||||||
typedef lam_pcm_job_handle_t (*mca_pcm_handle_new_fn_t)(lam_pcm_job_handle_t parent);
|
typedef lam_job_handle_t (*mca_pcm_handle_new_fn_t)(lam_job_handle_t parent);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -141,18 +140,18 @@ typedef lam_pcm_job_handle_t (*mca_pcm_handle_new_fn_t)(lam_pcm_job_handle_t par
|
|||||||
*
|
*
|
||||||
* \warning The handle must be released using lam_pcm_handle_free
|
* \warning The handle must be released using lam_pcm_handle_free
|
||||||
*/
|
*/
|
||||||
typedef lam_pcm_job_handle_t (*mca_pcm_handle_get_fn_t)(void);
|
typedef lam_job_handle_t (*mca_pcm_handle_get_fn_t)(void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free a job handle
|
* Free a job handle
|
||||||
*
|
*
|
||||||
* @param job_handle Poiner to a lam_pcm_job_handle_t
|
* @param job_handle Poiner to a lam_job_handle_t
|
||||||
*
|
*
|
||||||
* Free a job handle returned by lam_pcm_handle_new or
|
* Free a job handle returned by lam_pcm_handle_new or
|
||||||
* lam_pcm_handle_get.
|
* lam_pcm_handle_get.
|
||||||
*/
|
*/
|
||||||
typedef void (*mca_pcm_handle_free_fn_t)(lam_pcm_job_handle_t *job_handle);
|
typedef void (*mca_pcm_handle_free_fn_t)(lam_job_handle_t *job_handle);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -168,7 +167,7 @@ typedef void (*mca_pcm_handle_free_fn_t)(lam_pcm_job_handle_t *job_handle);
|
|||||||
* always return LAM_SUCCESS (yes) if called from mpirun. Useful
|
* always return LAM_SUCCESS (yes) if called from mpirun. Useful
|
||||||
* for asking if MPI_SPAWN and friends can run.
|
* for asking if MPI_SPAWN and friends can run.
|
||||||
*/
|
*/
|
||||||
typedef int (*mca_pcm_job_can_sapwn_fn_t)(lam_pcm_job_handle_t job_handle);
|
typedef int (*mca_pcm_job_can_sapwn_fn_t)(lam_job_handle_t job_handle);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -191,7 +190,7 @@ typedef int (*mca_pcm_job_can_sapwn_fn_t)(lam_pcm_job_handle_t job_handle);
|
|||||||
* \Warning It is an error to call this function more than once on a single
|
* \Warning It is an error to call this function more than once on a single
|
||||||
* job handle.
|
* job handle.
|
||||||
*/
|
*/
|
||||||
typedef int (*mca_pcm_job_set_arguments_fn_t)(lam_pcm_job_handle_t job_handle,
|
typedef int (*mca_pcm_job_set_arguments_fn_t)(lam_job_handle_t job_handle,
|
||||||
lam_pcm_control_args_t* opts,
|
lam_pcm_control_args_t* opts,
|
||||||
size_t opts_len);
|
size_t opts_len);
|
||||||
|
|
||||||
@ -221,7 +220,7 @@ typedef int (*mca_pcm_job_set_arguments_fn_t)(lam_pcm_job_handle_t job_handle,
|
|||||||
* LAM_ERR_NOT_SUPPORTED will be returned if the mca module does not
|
* LAM_ERR_NOT_SUPPORTED will be returned if the mca module does not
|
||||||
* support spawning of new applications from
|
* support spawning of new applications from
|
||||||
*/
|
*/
|
||||||
typedef int (*mca_pcm_job_launch_procs_fn_t)(lam_pcm_job_handle_t job_handle,
|
typedef int (*mca_pcm_job_launch_procs_fn_t)(lam_job_handle_t job_handle,
|
||||||
lam_pcm_node_t *nodes,
|
lam_pcm_node_t *nodes,
|
||||||
size_t nodes_len, const char* file,
|
size_t nodes_len, const char* file,
|
||||||
int argc, const char* argv[],
|
int argc, const char* argv[],
|
||||||
@ -244,7 +243,7 @@ typedef int (*mca_pcm_job_launch_procs_fn_t)(lam_pcm_job_handle_t job_handle,
|
|||||||
* returns, it is safe to assume that all rendezvous is complete
|
* returns, it is safe to assume that all rendezvous is complete
|
||||||
* (ie, you can exit and not mess anything up
|
* (ie, you can exit and not mess anything up
|
||||||
*/
|
*/
|
||||||
typedef int (*mca_pcm_job_rendezvous_fn_t)(lam_pcm_job_handle_t job_handle);
|
typedef int (*mca_pcm_job_rendezvous_fn_t)(lam_job_handle_t job_handle);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -259,7 +258,7 @@ typedef int (*mca_pcm_job_rendezvous_fn_t)(lam_pcm_job_handle_t job_handle);
|
|||||||
* on a job at termination, as job results will be expunged over
|
* on a job at termination, as job results will be expunged over
|
||||||
* time as resource limits dictate.
|
* time as resource limits dictate.
|
||||||
*/
|
*/
|
||||||
typedef int (*mca_pcm_job_wait_fn_t)(lam_pcm_job_handle_t job_handle);
|
typedef int (*mca_pcm_job_wait_fn_t)(lam_job_handle_t job_handle);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -274,7 +273,7 @@ typedef int (*mca_pcm_job_wait_fn_t)(lam_pcm_job_handle_t job_handle);
|
|||||||
* Ask if job is running. If job has recently finished, this does
|
* Ask if job is running. If job has recently finished, this does
|
||||||
* not imply wait the pcm interface will call wait for you.
|
* not imply wait the pcm interface will call wait for you.
|
||||||
*/
|
*/
|
||||||
typedef int (*mca_pcm_job_running_fn_t)(lam_pcm_job_handle_t job_handle,
|
typedef int (*mca_pcm_job_running_fn_t)(lam_job_handle_t job_handle,
|
||||||
int* running);
|
int* running);
|
||||||
|
|
||||||
|
|
||||||
@ -292,7 +291,7 @@ typedef int (*mca_pcm_job_running_fn_t)(lam_pcm_job_handle_t job_handle,
|
|||||||
*
|
*
|
||||||
* \warning This function is not yet implemented.
|
* \warning This function is not yet implemented.
|
||||||
*/
|
*/
|
||||||
typedef int (*mca_pcm_job_list_running_fn_t)(lam_pcm_job_handle_t **handles,
|
typedef int (*mca_pcm_job_list_running_fn_t)(lam_job_handle_t **handles,
|
||||||
size_t handles_len);
|
size_t handles_len);
|
||||||
|
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user