Add a new function to the name server that takes a base and offset and returns the corresponding vpid.
Fix the soh code. This commit was SVN r3848.
Этот коммит содержится в:
родитель
45f77e2fc1
Коммит
832f4b566c
@ -121,6 +121,7 @@ OMPI_DECLSPEC mca_ns_base_jobid_t mca_ns_base_create_jobid_not_available(void
|
||||
OMPI_DECLSPEC mca_ns_base_vpid_t mca_ns_base_get_vpid_range_not_available(mca_ns_base_jobid_t job,
|
||||
mca_ns_base_vpid_t range);
|
||||
|
||||
OMPI_DECLSPEC mca_ns_base_vpid_t mca_ns_base_derive_vpid(mca_ns_base_vpid_t base_vpid, int offset);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -92,6 +92,12 @@ ompi_process_name_t* mca_ns_base_create_process_name(mca_ns_base_cellid_t cell,
|
||||
return(newname);
|
||||
}
|
||||
|
||||
mca_ns_base_vpid_t mca_ns_base_derive_vpid(mca_ns_base_vpid_t base_vpid, int offset)
|
||||
{
|
||||
return (base_vpid + (mca_ns_base_vpid_t)offset);
|
||||
}
|
||||
|
||||
|
||||
ompi_process_name_t* mca_ns_base_copy_process_name(ompi_process_name_t* name)
|
||||
{
|
||||
mca_ns_base_cellid_t cell;
|
||||
|
@ -219,6 +219,14 @@ typedef mca_ns_base_jobid_t (*mca_ns_base_module_create_jobid_fn_t)(void);
|
||||
*/
|
||||
typedef ompi_process_name_t* (*mca_ns_base_module_create_proc_name_fn_t)(mca_ns_base_cellid_t cell, mca_ns_base_jobid_t job, mca_ns_base_vpid_t vpid);
|
||||
|
||||
/**
|
||||
* Derive a process vpid.
|
||||
* Given a base vpid and an offset, return the computed equivalent vpid. This function
|
||||
* is required because the vpid may not be an integer - need to provide a means for
|
||||
* computing the resulting vpid in case it isn't.
|
||||
*/
|
||||
typedef mca_ns_base_vpid_t (*mca_ns_base_module_derive_vpid_fn_t)(mca_ns_base_vpid_t base_vpid, int offset);
|
||||
|
||||
/**
|
||||
* Make a copy of a process name.
|
||||
* Given a process name, this function creates a copy of it and returns a pointer
|
||||
@ -726,6 +734,7 @@ struct mca_ns_base_module_1_0_0_t {
|
||||
mca_ns_base_module_unpack_cellid_fn_t unpack_cellid;
|
||||
mca_ns_base_module_pack_jobid_fn_t pack_jobid;
|
||||
mca_ns_base_module_unpack_jobid_fn_t unpack_jobid;
|
||||
mca_ns_base_module_derive_vpid_fn_t derive_vpid;
|
||||
};
|
||||
|
||||
typedef struct mca_ns_base_module_1_0_0_t mca_ns_base_module_1_0_0_t;
|
||||
|
@ -88,7 +88,8 @@ static mca_ns_base_module_t mca_ns_proxy = {
|
||||
mca_ns_base_pack_cellid,
|
||||
mca_ns_base_unpack_cellid,
|
||||
mca_ns_base_pack_jobid,
|
||||
mca_ns_base_unpack_jobid
|
||||
mca_ns_base_unpack_jobid,
|
||||
mca_ns_base_derive_vpid
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -88,7 +88,8 @@ static mca_ns_base_module_t mca_ns_replica = {
|
||||
mca_ns_base_pack_name,
|
||||
mca_ns_base_unpack_name,
|
||||
mca_ns_base_pack_jobid,
|
||||
mca_ns_base_unpack_jobid
|
||||
mca_ns_base_unpack_jobid,
|
||||
mca_ns_base_derive_vpid
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -31,6 +31,7 @@ libmca_soh_base_la_SOURCES = \
|
||||
$(headers) \
|
||||
soh_base_close.c \
|
||||
soh_base_select.c \
|
||||
soh_base_local_functions.c \
|
||||
soh_base_open.c
|
||||
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
*/
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "class/ompi_list.h"
|
||||
#include "mca/mca.h"
|
||||
|
||||
@ -39,7 +40,7 @@ OMPI_DECLSPEC int mca_soh_base_open(void);
|
||||
OMPI_DECLSPEC int mca_soh_base_select(bool *allow_multi_user_threads,
|
||||
bool *have_hidden_threads);
|
||||
OMPI_DECLSPEC int mca_soh_base_close(void);
|
||||
|
||||
OMPI_DECLSPEC int mca_soh_base_update_cell_soh_not_available(mca_ns_base_cellid_t cellid);
|
||||
|
||||
/*
|
||||
* globals that might be needed
|
||||
|
30
src/mca/soh/base/soh_base_local_functions.c
Обычный файл
30
src/mca/soh/base/soh_base_local_functions.c
Обычный файл
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
*/
|
||||
|
||||
/*
|
||||
* includes
|
||||
*/
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "class/ompi_list.h"
|
||||
#include "mca/mca.h"
|
||||
|
||||
#include "mca/soh/base/base.h"
|
||||
|
||||
int mca_soh_base_update_cell_soh_not_available(mca_ns_base_cellid_t cellid)
|
||||
{
|
||||
return OMPI_ERR_NOT_IMPLEMENTED;
|
||||
}
|
@ -43,11 +43,7 @@
|
||||
*/
|
||||
int mca_soh_base_output = -1;
|
||||
mca_soh_base_module_t ompi_soh_monitor = {
|
||||
#if RALPH_NEEDS_TO_FIX
|
||||
mca_soh_base_update_cell_soh_not_available;
|
||||
#else
|
||||
NULL
|
||||
#endif
|
||||
mca_soh_base_update_cell_soh_not_available
|
||||
};
|
||||
bool mca_soh_base_selected = false;
|
||||
ompi_list_t mca_soh_base_components_available;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user