diff --git a/src/mca/ns/base/base.h b/src/mca/ns/base/base.h index 6dc4563671..a74374385f 100644 --- a/src/mca/ns/base/base.h +++ b/src/mca/ns/base/base.h @@ -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); /* diff --git a/src/mca/ns/base/ns_base_local_fns.c b/src/mca/ns/base/ns_base_local_fns.c index 7fa431fe71..b5fd2ec0b3 100644 --- a/src/mca/ns/base/ns_base_local_fns.c +++ b/src/mca/ns/base/ns_base_local_fns.c @@ -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; diff --git a/src/mca/ns/ns.h b/src/mca/ns/ns.h index f87d596050..42226c12f2 100644 --- a/src/mca/ns/ns.h +++ b/src/mca/ns/ns.h @@ -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; diff --git a/src/mca/ns/proxy/src/ns_proxy_component.c b/src/mca/ns/proxy/src/ns_proxy_component.c index 78a3adc4f7..db8f78a546 100644 --- a/src/mca/ns/proxy/src/ns_proxy_component.c +++ b/src/mca/ns/proxy/src/ns_proxy_component.c @@ -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 }; /* diff --git a/src/mca/ns/replica/src/ns_replica_component.c b/src/mca/ns/replica/src/ns_replica_component.c index 3931c89f70..173afe3d44 100644 --- a/src/mca/ns/replica/src/ns_replica_component.c +++ b/src/mca/ns/replica/src/ns_replica_component.c @@ -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 }; /* diff --git a/src/mca/soh/base/Makefile.am b/src/mca/soh/base/Makefile.am index caf8499125..1aff677a91 100644 --- a/src/mca/soh/base/Makefile.am +++ b/src/mca/soh/base/Makefile.am @@ -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 diff --git a/src/mca/soh/base/base.h b/src/mca/soh/base/base.h index 97dc7d0b03..d4b4c98a65 100644 --- a/src/mca/soh/base/base.h +++ b/src/mca/soh/base/base.h @@ -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 diff --git a/src/mca/soh/base/soh_base_local_functions.c b/src/mca/soh/base/soh_base_local_functions.c new file mode 100644 index 0000000000..cb98bd13d7 --- /dev/null +++ b/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; +} diff --git a/src/mca/soh/base/soh_base_open.c b/src/mca/soh/base/soh_base_open.c index 2a1f56f685..e3de6f7a95 100644 --- a/src/mca/soh/base/soh_base_open.c +++ b/src/mca/soh/base/soh_base_open.c @@ -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;