diff --git a/contrib/scaling/scaling.pl b/contrib/scaling/scaling.pl index 9db7cb63fa..f800ba0081 100755 --- a/contrib/scaling/scaling.pl +++ b/contrib/scaling/scaling.pl @@ -135,7 +135,7 @@ push @starters, $starter; $opt = $starteroptionlist[$idx] . " --npernode " . $ppn; if ($multiplier gt 1) { - $opt = $opt . " --mca rtc ^hwloc --mca ras_base_multiplier " . $multiplier; + $opt = $opt . " --bind-to none --mca ras_base_multiplier " . $multiplier; } push @starteroptions, $opt; } elsif ($useaprun && $starter eq "aprun") { @@ -294,7 +294,7 @@ () if ($starter eq "prun") { my $dvm = "prte-dvm --system-server"; if ($multiplier gt 1) { - $dvm = $dvm . " --mca rtc ^hwloc --mca ras_base_multiplier " . $multiplier; + $dvm = $dvm . " --bind-to none --mca ras_base_multiplier " . $multiplier; } # need to start it print "##DVM: Launching $dvm\n"; diff --git a/src/mca/ess/base/ess_base_std_prted.c b/src/mca/ess/base/ess_base_std_prted.c index 4e48cce7d6..27e41893ca 100644 --- a/src/mca/ess/base/ess_base_std_prted.c +++ b/src/mca/ess/base/ess_base_std_prted.c @@ -57,7 +57,6 @@ #include "src/mca/plm/base/base.h" #include "src/mca/prtereachable/base/base.h" #include "src/mca/rmaps/base/base.h" -#include "src/mca/rtc/base/base.h" #include "src/mca/schizo/base/base.h" #include "src/mca/state/base/base.h" #include "src/mca/state/state.h" @@ -405,19 +404,6 @@ int prte_ess_base_prted_setup(void) error = "prte_odls_base_select"; goto error; } - /* Open/select the rtc */ - if (PRTE_SUCCESS - != (ret = pmix_mca_base_framework_open(&prte_rtc_base_framework, - PMIX_MCA_BASE_OPEN_DEFAULT))) { - PRTE_ERROR_LOG(ret); - error = "prte_rtc_base_open"; - goto error; - } - if (PRTE_SUCCESS != (ret = prte_rtc_base_select())) { - PRTE_ERROR_LOG(ret); - error = "prte_rtc_base_select"; - goto error; - } if (PRTE_SUCCESS != (ret = pmix_mca_base_framework_open(&prte_rmaps_base_framework, PMIX_MCA_BASE_OPEN_DEFAULT))) { @@ -543,7 +529,6 @@ int prte_ess_base_prted_finalize(void) (void) pmix_mca_base_framework_close(&prte_plm_base_framework); /* make sure our local procs are dead */ prte_odls.kill_local_procs(NULL); - (void) pmix_mca_base_framework_close(&prte_rtc_base_framework); (void) pmix_mca_base_framework_close(&prte_odls_base_framework); (void) pmix_mca_base_framework_close(&prte_errmgr_base_framework); prte_rml_close(); diff --git a/src/mca/ess/hnp/ess_hnp_module.c b/src/mca/ess/hnp/ess_hnp_module.c index ca0185349f..e5af22200f 100644 --- a/src/mca/ess/hnp/ess_hnp_module.c +++ b/src/mca/ess/hnp/ess_hnp_module.c @@ -65,7 +65,6 @@ #include "src/mca/prtereachable/base/base.h" #include "src/mca/ras/base/base.h" #include "src/mca/rmaps/base/base.h" -#include "src/mca/rtc/base/base.h" #include "src/mca/schizo/base/base.h" #include "src/mca/state/base/base.h" #include "src/mca/state/state.h" @@ -406,19 +405,6 @@ static int rte_init(int argc, char **argv) error = "prte_odls_base_select"; goto error; } - /* Open/select the rtc */ - ret = pmix_mca_base_framework_open(&prte_rtc_base_framework, - PMIX_MCA_BASE_OPEN_DEFAULT); - if (PRTE_SUCCESS != ret) { - PRTE_ERROR_LOG(ret); - error = "prte_rtc_base_open"; - goto error; - } - if (PRTE_SUCCESS != (ret = prte_rtc_base_select())) { - PRTE_ERROR_LOG(ret); - error = "prte_rtc_base_select"; - goto error; - } /* set the pmix_output hnp file location to be in the * proc-specific session directory. */ @@ -483,7 +469,6 @@ static int rte_finalize(void) /* make sure our local procs are dead */ prte_odls.kill_local_procs(NULL); } - (void) pmix_mca_base_framework_close(&prte_rtc_base_framework); (void) pmix_mca_base_framework_close(&prte_odls_base_framework); prte_rml_close(); (void) pmix_mca_base_framework_close(&prte_oob_base_framework); diff --git a/src/mca/odls/base/Makefile.am b/src/mca/odls/base/Makefile.am index c72670b355..db790c9ede 100644 --- a/src/mca/odls/base/Makefile.am +++ b/src/mca/odls/base/Makefile.am @@ -13,7 +13,7 @@ # All rights reserved # Copyright (c) 2019 Intel, Inc. All rights reserved. # Copyright (c) 2020 Cisco Systems, Inc. All rights reserved -# Copyright (c) 2022 Nanook Consulting. All rights reserved. +# Copyright (c) 2022-2024 Nanook Consulting All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -27,6 +27,7 @@ headers += \ libprtemca_odls_la_SOURCES += \ base/odls_base_frame.c \ base/odls_base_select.c \ - base/odls_base_default_fns.c + base/odls_base_default_fns.c \ + base/odls_base_bind.c dist_prtedata_DATA += base/help-prte-odls-base.txt diff --git a/src/mca/odls/base/base.h b/src/mca/odls/base/base.h index b713866cc9..af33ba957e 100644 --- a/src/mca/odls/base/base.h +++ b/src/mca/odls/base/base.h @@ -12,7 +12,7 @@ * Copyright (c) 2011-2020 Cisco Systems, Inc. All rights reserved * Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. * Copyright (c) 2017-2019 Intel, Inc. All rights reserved. - * Copyright (c) 2021-2023 Nanook Consulting. All rights reserved. + * Copyright (c) 2021-2024 Nanook Consulting All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -157,6 +157,10 @@ PRTE_EXPORT void prte_odls_base_start_threads(prte_job_t *jdata); PRTE_EXPORT void prte_odls_base_harvest_threads(void); +/* Binding support */ +PRTE_EXPORT void prte_odls_base_set(prte_odls_spawn_caddy_t *cd, int write_fd); + + #define PRTE_ODLS_SET_ERROR(ns, s, j) \ do { \ int _idx; \ diff --git a/src/mca/rtc/hwloc/rtc_hwloc.c b/src/mca/odls/base/odls_base_bind.c similarity index 55% rename from src/mca/rtc/hwloc/rtc_hwloc.c rename to src/mca/odls/base/odls_base_bind.c index d1ba2ff8f9..ad929377f8 100644 --- a/src/mca/rtc/hwloc/rtc_hwloc.c +++ b/src/mca/odls/base/odls_base_bind.c @@ -1,10 +1,25 @@ /* - * Copyright (c) 2014-2020 Intel, Inc. All rights reserved. - * Copyright (c) 2017-2020 Cisco Systems, Inc. All rights reserved - * Copyright (c) 2017 Inria. All rights reserved. - * Copyright (c) 2019 Research Organization for Information Science + * Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2011 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2007-2011 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. + * Copyright (c) 2011-2013 Los Alamos National Security, LLC. + * All rights reserved. + * Copyright (c) 2011-2020 Cisco Systems, Inc. All rights reserved + * Copyright (c) 2013-2020 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2019 Research Organization for Information Science * and Technology (RIST). All rights reserved. - * Copyright (c) 2021-2022 Nanook Consulting. All rights reserved. + * Copyright (c) 2017 Mellanox Technologies Ltd. All rights reserved. + * Copyright (c) 2017-2020 IBM Corporation. All rights reserved. + * Copyright (c) 2021-2024 Nanook Consulting All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,78 +27,142 @@ * $HEADER$ */ -#define PRTE_HWLOC_WANT_SHMEM 1 - #include "prte_config.h" #include "constants.h" #include "types.h" -#include +#ifdef HAVE_SYS_WAIT_H +# include +#endif #include -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif /* HAVE_UNISTD_H */ -#include -#include #ifdef HAVE_SYS_STAT_H # include +#endif /* HAVE_SYS_STAT_H */ +#ifdef HAVE_SYS_PARAM_H +# include #endif -#if HAVE_FCNTL_H -# include -#endif +#include +#include +#include +#include -#include "src/class/pmix_list.h" +#include "prte_stdint.h" #include "src/hwloc/hwloc-internal.h" -#if HWLOC_API_VERSION >= 0x20000 -# include "hwloc/shmem.h" -#endif #include "src/pmix/pmix-internal.h" -#include "src/util/pmix_argv.h" -#include "src/util/pmix_fd.h" -#include "src/util/pmix_path.h" -#include "src/util/pmix_environ.h" +#include "src/util/pmix_printf.h" #include "src/mca/errmgr/errmgr.h" -#include "src/mca/odls/base/base.h" #include "src/mca/rmaps/rmaps_types.h" #include "src/runtime/prte_globals.h" -#include "src/util/error_strings.h" +#include "src/util/name_fns.h" #include "src/util/pmix_show_help.h" -#include "rtc_hwloc.h" -#include "src/mca/rtc/base/base.h" +#include "src/mca/odls/base/base.h" -static int init(void); -static void finalize(void); -static void assign(prte_job_t *jdata); -static void set(prte_odls_spawn_caddy_t *cd, int write_fd); -static void report_binding(prte_job_t *jobdat, int rank); +static void report_binding(prte_job_t *jobdat, int rank) +{ + char *tmp1; + hwloc_cpuset_t mycpus; + bool use_hwthread_cpus; -prte_rtc_base_module_t prte_rtc_hwloc_module = {.init = init, - .finalize = finalize, - .assign = assign, - .set = set}; + /* check for type of cpu being used */ + if (prte_get_attribute(&jobdat->attributes, PRTE_JOB_HWT_CPUS, NULL, PMIX_BOOL)) { + use_hwthread_cpus = true; + } else { + use_hwthread_cpus = false; + } + /* get the cpus we are bound to */ + mycpus = hwloc_bitmap_alloc(); + if (hwloc_get_cpubind(prte_hwloc_topology, mycpus, HWLOC_CPUBIND_PROCESS) < 0) { + pmix_output(0, "Rank %d is not bound", rank); + } else { + tmp1 = prte_hwloc_base_cset2str(mycpus, use_hwthread_cpus, prte_hwloc_topology); + pmix_output(0, "Rank %d bound to %s", rank, tmp1); + free(tmp1); + } + hwloc_bitmap_free(mycpus); +} -static int init(void) +static int write_help_msg(int fd, prte_odls_pipe_err_msg_t *msg, const char *file, + const char *topic, va_list ap) { - return PRTE_SUCCESS; + int ret; + char *str; + + if (NULL == file || NULL == topic) { + return PRTE_ERR_BAD_PARAM; + } + + str = pmix_show_help_vstring(file, topic, true, ap); + + msg->file_str_len = (int) strlen(file); + if (msg->file_str_len > PRTE_ODLS_MAX_FILE_LEN) { + PRTE_ERROR_LOG(PRTE_ERR_BAD_PARAM); + return PRTE_ERR_BAD_PARAM; + } + msg->topic_str_len = (int) strlen(topic); + if (msg->topic_str_len > PRTE_ODLS_MAX_TOPIC_LEN) { + PRTE_ERROR_LOG(PRTE_ERR_BAD_PARAM); + return PRTE_ERR_BAD_PARAM; + } + msg->msg_str_len = (int) strlen(str); + + /* Only keep writing if each write() succeeds */ + if (PRTE_SUCCESS != (ret = pmix_fd_write(fd, sizeof(*msg), msg))) { + goto out; + } + if (msg->file_str_len > 0 + && PRTE_SUCCESS != (ret = pmix_fd_write(fd, msg->file_str_len, file))) { + goto out; + } + if (msg->topic_str_len > 0 + && PRTE_SUCCESS != (ret = pmix_fd_write(fd, msg->topic_str_len, topic))) { + goto out; + } + if (msg->msg_str_len > 0 && PRTE_SUCCESS != (ret = pmix_fd_write(fd, msg->msg_str_len, str))) { + goto out; + } + +out: + free(str); + return ret; } -static void finalize(void) +static int send_warn_show_help(int fd, const char *file, const char *topic, ...) { - return; + int ret; + va_list ap; + prte_odls_pipe_err_msg_t msg; + + msg.fatal = false; + msg.exit_status = 0; /* ignored */ + + /* Send it */ + va_start(ap, topic); + ret = write_help_msg(fd, &msg, file, topic, ap); + va_end(ap); + + return ret; } -static void assign(prte_job_t *jdata) +static void send_error_show_help(int fd, int exit_status, const char *file, + const char *topic, ...) { - PRTE_HIDE_UNUSED_PARAMS(jdata); - return; + va_list ap; + prte_odls_pipe_err_msg_t msg; + + msg.fatal = true; + msg.exit_status = exit_status; + + /* Send it */ + va_start(ap, topic); + write_help_msg(fd, &msg, file, topic, ap); + va_end(ap); + + exit(exit_status); } -static void set(prte_odls_spawn_caddy_t *cd, int write_fd) +void prte_odls_base_set(prte_odls_spawn_caddy_t *cd, int write_fd) { prte_job_t *jobdat = cd->jdata; prte_proc_t *child = cd->child; @@ -93,13 +172,14 @@ static void set(prte_odls_spawn_caddy_t *cd, int write_fd) int rc = PRTE_ERROR; char *msg; - pmix_output_verbose(2, prte_rtc_base_framework.framework_output, "%s hwloc:set on child %s", + pmix_output_verbose(2, prte_odls_base_framework.framework_output, + "%s hwloc:set on child %s", PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), (NULL == child) ? "NULL" : PRTE_NAME_PRINT(&child->name)); if (NULL == jobdat || NULL == child) { /* nothing for us to do */ - pmix_output_verbose(2, prte_rtc_base_framework.framework_output, + pmix_output_verbose(2, prte_odls_base_framework.framework_output, "%s hwloc:set jobdat %s child %s - nothing to do", PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), (NULL == jobdat) ? "NULL" : PRTE_JOBID_PRINT(jobdat->nspace), @@ -113,9 +193,9 @@ static void set(prte_odls_spawn_caddy_t *cd, int write_fd) if (NULL != prte_daemon_cores) { root = hwloc_get_root_obj(prte_hwloc_topology); if (NULL == root->userdata) { - prte_rtc_base_send_warn_show_help(write_fd, "help-prte-odls-default.txt", - "incorrectly bound", prte_process_info.nodename, - context->app, __FILE__, __LINE__); + send_warn_show_help(write_fd, "help-prte-odls-default.txt", + "incorrectly bound", prte_process_info.nodename, + context->app, __FILE__, __LINE__); } /* bind this proc to all available processors */ #if HWLOC_API_VERSION < 0x20000 @@ -140,14 +220,14 @@ static void set(prte_odls_spawn_caddy_t *cd, int write_fd) if (PRTE_BINDING_REQUIRED(jobdat->map->binding)) { /* If binding is required, send an error up the pipe (which exits -- it doesn't return). */ - prte_rtc_base_send_error_show_help(write_fd, 1, "help-prte-odls-default.txt", - "binding generic error", - prte_process_info.nodename, context->app, - msg, __FILE__, __LINE__); + send_error_show_help(write_fd, 1, "help-prte-odls-default.txt", + "binding generic error", + prte_process_info.nodename, context->app, + msg, __FILE__, __LINE__); } else { - prte_rtc_base_send_warn_show_help(write_fd, "help-prte-odls-default.txt", - "not bound", prte_process_info.nodename, - context->app, msg, __FILE__, __LINE__); + send_warn_show_help(write_fd, "help-prte-odls-default.txt", + "not bound", prte_process_info.nodename, + context->app, msg, __FILE__, __LINE__); return; } } @@ -182,14 +262,14 @@ static void set(prte_odls_spawn_caddy_t *cd, int write_fd) * given (i.e., we are not binding due to a default policy), * send an error up the pipe (which exits -- it doesn't return). */ - prte_rtc_base_send_error_show_help(write_fd, 1, "help-prte-odls-default.txt", - "binding generic error", - prte_process_info.nodename, context->app, msg, - __FILE__, __LINE__); + send_error_show_help(write_fd, 1, "help-prte-odls-default.txt", + "binding generic error", + prte_process_info.nodename, context->app, msg, + __FILE__, __LINE__); } else { - prte_rtc_base_send_warn_show_help(write_fd, "help-prte-odls-default.txt", - "not bound", prte_process_info.nodename, - context->app, msg, __FILE__, __LINE__); + send_warn_show_help(write_fd, "help-prte-odls-default.txt", + "not bound", prte_process_info.nodename, + context->app, msg, __FILE__, __LINE__); hwloc_bitmap_free(cpuset); return; } @@ -211,14 +291,14 @@ static void set(prte_odls_spawn_caddy_t *cd, int write_fd) if (PRTE_BINDING_REQUIRED(jobdat->map->binding)) { /* If binding is required, send an error up the pipe (which exits -- it doesn't return). */ - prte_rtc_base_send_error_show_help(write_fd, 1, "help-prte-odls-default.txt", - "binding generic error", - prte_process_info.nodename, context->app, msg, - __FILE__, __LINE__); + send_error_show_help(write_fd, 1, "help-prte-odls-default.txt", + "binding generic error", + prte_process_info.nodename, context->app, msg, + __FILE__, __LINE__); } else { - prte_rtc_base_send_warn_show_help(write_fd, "help-prte-odls-default.txt", - "not bound", prte_process_info.nodename, - context->app, msg, __FILE__, __LINE__); + send_warn_show_help(write_fd, "help-prte-odls-default.txt", + "not bound", prte_process_info.nodename, + context->app, msg, __FILE__, __LINE__); if (NULL != tmp) { free(tmp); free(msg); @@ -251,40 +331,16 @@ static void set(prte_odls_spawn_caddy_t *cd, int write_fd) if (PRTE_HWLOC_BASE_MBFA_ERROR == prte_hwloc_base_mbfa) { /* If binding is required, send an error up the pipe (which exits -- it doesn't return). */ - prte_rtc_base_send_error_show_help(write_fd, 1, "help-prte-odls-default.txt", - "memory binding error", - prte_process_info.nodename, context->app, msg, - __FILE__, __LINE__); + send_error_show_help(write_fd, 1, "help-prte-odls-default.txt", + "memory binding error", + prte_process_info.nodename, context->app, msg, + __FILE__, __LINE__); } else { - prte_rtc_base_send_warn_show_help(write_fd, "help-prte-odls-default.txt", - "memory not bound", prte_process_info.nodename, - context->app, msg, __FILE__, __LINE__); + send_warn_show_help(write_fd, "help-prte-odls-default.txt", + "memory not bound", prte_process_info.nodename, + context->app, msg, __FILE__, __LINE__); return; } } } } - -static void report_binding(prte_job_t *jobdat, int rank) -{ - char *tmp1; - hwloc_cpuset_t mycpus; - bool use_hwthread_cpus; - - /* check for type of cpu being used */ - if (prte_get_attribute(&jobdat->attributes, PRTE_JOB_HWT_CPUS, NULL, PMIX_BOOL)) { - use_hwthread_cpus = true; - } else { - use_hwthread_cpus = false; - } - /* get the cpus we are bound to */ - mycpus = hwloc_bitmap_alloc(); - if (hwloc_get_cpubind(prte_hwloc_topology, mycpus, HWLOC_CPUBIND_PROCESS) < 0) { - pmix_output(0, "Rank %d is not bound", rank); - } else { - tmp1 = prte_hwloc_base_cset2str(mycpus, use_hwthread_cpus, prte_hwloc_topology); - pmix_output(0, "Rank %d bound to %s", rank, tmp1); - free(tmp1); - } - hwloc_bitmap_free(mycpus); -} diff --git a/src/mca/odls/base/odls_base_default_fns.c b/src/mca/odls/base/odls_base_default_fns.c index 1ebd90eef8..7dc161a463 100644 --- a/src/mca/odls/base/odls_base_default_fns.c +++ b/src/mca/odls/base/odls_base_default_fns.c @@ -69,7 +69,6 @@ #include "src/mca/rmaps/rmaps_types.h" #include "src/rml/rml_contact.h" #include "src/rml/rml.h" -#include "src/mca/rtc/rtc.h" #include "src/mca/schizo/base/base.h" #include "src/mca/state/state.h" @@ -788,9 +787,6 @@ int prte_odls_base_default_construct_child_list(pmix_data_buffer_t *buffer, pmix lock.active = false; // we won't get a callback } - /* load any controls into the job */ - prte_rtc.assign(jdata); - /* spin up the spawn threads */ prte_odls_base_start_threads(jdata); diff --git a/src/mca/odls/default/odls_default_module.c b/src/mca/odls/default/odls_default_module.c index d9679747f6..33fb7b2e78 100644 --- a/src/mca/odls/default/odls_default_module.c +++ b/src/mca/odls/default/odls_default_module.c @@ -21,7 +21,7 @@ * Copyright (c) 2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. * - * Copyright (c) 2021-2022 Nanook Consulting. All rights reserved. + * Copyright (c) 2021-2024 Nanook Consulting All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -126,7 +126,6 @@ #include "src/mca/ess/ess.h" #include "src/mca/iof/base/iof_base_setup.h" #include "src/mca/plm/plm.h" -#include "src/mca/rtc/rtc.h" #include "src/mca/state/state.h" #include "src/runtime/prte_globals.h" #include "src/runtime/prte_wait.h" @@ -333,7 +332,7 @@ static void do_child(prte_odls_spawn_caddy_t *cd, int write_fd) } /* now set any child-level controls such as binding */ - prte_rtc.set(cd, write_fd); + prte_odls_base_set(cd, write_fd); } else if (!PRTE_FLAG_TEST(cd->jdata, PRTE_JOB_FLAG_FORWARD_OUTPUT)) { /* tie stdin/out/err/internal to /dev/null */ diff --git a/src/mca/plm/base/plm_base_launch_support.c b/src/mca/plm/base/plm_base_launch_support.c index d8f31848e7..13664d1cdd 100644 --- a/src/mca/plm/base/plm_base_launch_support.c +++ b/src/mca/plm/base/plm_base_launch_support.c @@ -57,7 +57,6 @@ #include "src/mca/rmaps/rmaps.h" #include "src/rml/rml_contact.h" #include "src/rml/rml.h" -#include "src/mca/rtc/rtc.h" #include "src/mca/state/base/base.h" #include "src/mca/state/state.h" #include "src/runtime/prte_globals.h" diff --git a/src/mca/rtc/Makefile.am b/src/mca/rtc/Makefile.am deleted file mode 100644 index 9e27dfbdd7..0000000000 --- a/src/mca/rtc/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) 2014-2019 Intel, Inc. All rights reserved. -# Copyright (c) 2020 Cisco Systems, Inc. All rights reserved -# Copyright (c) 2022 Nanook Consulting. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# main library setup -noinst_LTLIBRARIES = libprtemca_rtc.la -libprtemca_rtc_la_SOURCES = - -# local files -headers = rtc.h -libprtemca_rtc_la_SOURCES += $(headers) - -# Conditionally install the header files -prtedir = $(prteincludedir)/$(subdir) -nobase_prte_HEADERS = $(headers) - -include base/Makefile.am - -distclean-local: - rm -f base/static-components.h diff --git a/src/mca/rtc/base/Makefile.am b/src/mca/rtc/base/Makefile.am deleted file mode 100644 index 3f60f7c6c9..0000000000 --- a/src/mca/rtc/base/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (c) 2014-2019 Intel, Inc. All rights reserved. -# Copyright (c) 2020 Cisco Systems, Inc. All rights reserved -# Copyright (c) 2022 Nanook Consulting. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -headers += \ - base/base.h - -libprtemca_rtc_la_SOURCES += \ - base/rtc_base_frame.c \ - base/rtc_base_select.c \ - base/rtc_base_stubs.c - -dist_prtedata_DATA = base/help-prte-rtc-base.txt diff --git a/src/mca/rtc/base/base.h b/src/mca/rtc/base/base.h deleted file mode 100644 index c646c1d69a..0000000000 --- a/src/mca/rtc/base/base.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2014-2019 Intel, Inc. All rights reserved. - * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved - * Copyright (c) 2021-2022 Nanook Consulting. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file: - * rtc framework base functionality. - */ - -#ifndef PRTE_MCA_RTC_BASE_H -#define PRTE_MCA_RTC_BASE_H - -/* - * includes - */ -#include "prte_config.h" -#include "types.h" - -#include "src/class/pmix_list.h" -#include "src/mca/mca.h" -#include "src/mca/odls/base/base.h" -#include "src/util/pmix_printf.h" - -#include "src/mca/rtc/rtc.h" - -BEGIN_C_DECLS - -/* - * MCA Framework - */ -PRTE_EXPORT extern pmix_mca_base_framework_t prte_rtc_base_framework; -/* select a component */ -PRTE_EXPORT int prte_rtc_base_select(void); - -/* - * Global functions for MCA overall collective open and close - */ - -/** - * Struct to hold data global to the rtc framework - */ -typedef struct { - /* list of selected modules */ - pmix_list_t actives; -} prte_rtc_base_t; - -/** - * Global instance of rtc-wide framework data - */ -PRTE_EXPORT extern prte_rtc_base_t prte_rtc_base; - -/** - * Select an rtc component / module - */ -typedef struct { - pmix_list_item_t super; - int pri; - prte_rtc_base_module_t *module; - pmix_mca_base_component_t *component; -} prte_rtc_base_selected_module_t; -PMIX_CLASS_DECLARATION(prte_rtc_base_selected_module_t); - -PRTE_EXPORT void prte_rtc_base_assign(prte_job_t *jdata); -PRTE_EXPORT void prte_rtc_base_set(prte_odls_spawn_caddy_t *cd, int error_fd); -PRTE_EXPORT void prte_rtc_base_get_avail_vals(pmix_list_t *vals); - -/* Called from the child to send a warning show_help message up the - pipe to the waiting parent. */ -PRTE_EXPORT int prte_rtc_base_send_warn_show_help(int fd, const char *file, const char *topic, ...); - -/* Called from the child to send an error message up the pipe to the - waiting parent. */ -PRTE_EXPORT void prte_rtc_base_send_error_show_help(int fd, int exit_status, const char *file, - const char *topic, ...); - -END_C_DECLS - -#endif diff --git a/src/mca/rtc/base/help-prte-rtc-base.txt b/src/mca/rtc/base/help-prte-rtc-base.txt deleted file mode 100644 index 8c58b7b20c..0000000000 --- a/src/mca/rtc/base/help-prte-rtc-base.txt +++ /dev/null @@ -1,287 +0,0 @@ -# -*- text -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana -# University Research and Technology -# Corporation. All rights reserved. -# Copyright (c) 2004-2005 The University of Tennessee and The University -# of Tennessee Research Foundation. All rights -# reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# Copyright (c) 2011-2020 Cisco Systems, Inc. All rights reserved -# Copyright (c) 2011 Los Alamos National Security, LLC. -# All rights reserved. -# Copyright (c) 2014-2020 Intel, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -# This is the US/English general help file for PRTE's prun. -# -[prte-rtc-base:not-all-mapped-alloc] -Some of the requested hosts are not included in the current allocation for the -application: - %s -The requested hosts were: - %s - -Verify that you have mapped the allocated resources properly using the ---host or --hostfile specification. -[prte-rtc-base:no-mapped-node] -There are no allocated resources for the application: - %s -that match the requested mapping: - %s: %s - -Verify that you have mapped the allocated resources properly for the -indicated specification. -[prte-rtc-base:nolocal-no-available-resources] -There are no available nodes allocated to this job. This could be because -no nodes were found or all the available nodes were already used. - -Note that since the -nolocal option was given no processes can be -launched on the local node. -[prte-rtc-base:no-available-resources] -No nodes are available for this job, either due to a failure to -allocate nodes to the job, or allocated nodes being marked -as unavailable (e.g., down, rebooting, or a process attempting -to be relocated to another node when none are available). -[prte-rtc-base:all-available-resources-used] -All nodes which are allocated for this job are already filled. -# -[out-of-vpids] -The system has exhausted its available ranks - the application is attempting -to spawn too many daemons and will be aborted. - -This may be resolved by increasing the number of available ranks by -re-configuring with the --enable-jumbo-apps option, and then -re-building the application. -# -[rtc:too-many-procs] -Your job has requested a conflicting number of processes for the -application: - -App: %s -number of procs: %d - -This is more processes than we can launch under the following -additional directives and conditions: - -%s: %d -%s: %d - -Please revise the conflict and try again. -# -[too-many-cpus-per-rank] -Your job has requested more cpus per process(rank) than there -are cpus in a package: - - Cpus/rank: %d - #cpus/package: %d - -Please correct one or both of these values and try again. -# -[failed-map] -Your job failed to map. Either no mapper was available, or none -of the available mappers was able to perform the requested -mapping operation. This can happen if you request a map type -(e.g., loadbalance) and the corresponding mapper was not built. -# -[unrecognized-policy] -The specified %s policy is not recognized: - - Policy: %s - -Please check for a typo or ensure that the option is a supported -one. -# -[redefining-policy] -Conflicting directives for %s policy are causing the policy -to be redefined: - - New policy: %s - Prior policy: %s - -Please check that only one policy is defined. -# -[rtc:binding-target-not-found] -A request was made to bind to %s, but an appropriate target could not -be found on node %s. -# -[rtc:binding-overload] -A request was made to bind to that would result in binding more -processes than cpus on a resource: - - Bind to: %s - Node: %s - #processes: %d - #cpus: %d - -You can override this protection by adding the "overload-allowed" -option to your binding directive. -# -[rtc:no-topology] -A mapping directive was given that requires knowledge of -a remote node's topology. However, no topology info is -available for the following node: - - Node: %s - -The job cannot be executed under this condition. Please either -remove the directive or investigate the lack of topology info. -# -[rtc:no-available-cpus] -While computing bindings, we found no available cpus on -the following node: - - Node: %s - -Please check your allocation. -# -[rtc:cpubind-not-supported] -A request was made to bind a process, but at least one node does NOT -support binding processes to cpus. - - Node: %s -# -[rtc:membind-not-supported] -WARNING: a request was made to bind a process. While the system -supports binding the process itself, at least one node does NOT -support binding memory to the process location. - - Node: %s - -This is a warning only; your job will continue, though performance may -be degraded. -# -[rtc:membind-not-supported-fatal] -A request was made to bind a process. While the system -supports binding the process itself, at least one node does NOT -support binding memory to the process location. - - Node: %s - -The provided memory binding policy requires that we abort the -job at this time. -# -[rtc:no-bindable-objects] -No bindable objects of the specified type were available -on at least one node: - - Node: %s - Target: %s -# -[rtc:unknown-binding-level] -Unknown binding level: - - Target: %s - Cache level: %u -# -[prte-rtc-base:missing-daemon] -While attempting to build a map of this job, a node -was detected to be missing a daemon: - - Node: %s - -This usually indicates a mismatch between what the -allocation provided for the node name versus what was -actually found on the node. -# -[prte-rtc-base:no-objects] -No objects of the specified type were found on at least one node: - - Type: %s - Node: %s - -The map cannot be done as specified. -# -[topo-file] -A topology file was given for the compute nodes, but -we were unable to correctly process it. Common errors -include incorrectly specifying the path to the file, -or the file being generated in a way that is incompatible -with the version of hwloc being used by OMPI. - - File: %s - -Please correct the problem and try again. -# -[deprecated] -The following command line options and corresponding MCA parameter have -been deprecated and replaced as follows: - - Command line options: - Deprecated: %s - Replacement: %s - - Equivalent MCA parameter: - Deprecated: %s - Replacement: %s - -The deprecated forms *will* disappear in a future version of PRTE. -Please update to the new syntax. -# -[mismatch-binding] -A request for multiple cpus-per-proc was given, but a conflicting binding -policy was specified: - - #cpus-per-proc: %d - type of cpus: %s - binding policy given: %s - -The correct binding policy for the given type of cpu is: - - correct binding policy: %s - -This is the binding policy we would apply by default for this -situation, so no binding need be specified. Please correct the -situation and try again. -# -[mapping-too-low] -A request for multiple cpus-per-proc was given, but a directive -was also given to map to an object level that has less cpus than -requested ones: - - #cpus-per-proc: %d - number of cpus: %d - map-by: %s - -Please specify a mapping level that has more cpus, or else let us -define a default mapping that will allow multiple cpus-per-proc. -# -[unrecognized-modifier] -The mapping request contains an unrecognized modifier: - - Request: %s - -Please check your request and try again. -# -[invalid-pattern] -The mapping request contains a pattern that doesn't match -the required syntax of #:object - - Pattern: %s - -Please check your request and try again. -# -[prte-rtc-base:oversubscribed] -The requested number of processes exceeds the allocated -number of slots: - - #slots: %d - #processes: %d - -This creates an oversubscribed condition that may adversely -impact performance when combined with the requested binding -operation. We will continue, but will not bind the processes. -This warning can be omitted by adding the "overload-allowed" -qualifier to the binding policy. -# -[cannot-launch] -Although we were able to map your job, we are unable to launch -it at this time due to required resources being busy. Please -try again later. diff --git a/src/mca/rtc/base/owner.txt b/src/mca/rtc/base/owner.txt deleted file mode 100644 index 4ad6f408ca..0000000000 --- a/src/mca/rtc/base/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: INTEL -status: maintenance diff --git a/src/mca/rtc/base/rtc_base_frame.c b/src/mca/rtc/base/rtc_base_frame.c deleted file mode 100644 index 07c3c0fd7f..0000000000 --- a/src/mca/rtc/base/rtc_base_frame.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2014-2019 Intel, Inc. All rights reserved. - * Copyright (c) 2015-2019 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved - * Copyright (c) 2021-2022 Nanook Consulting. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "prte_config.h" -#include "constants.h" - -#include - -#include "src/class/pmix_list.h" -#include "src/mca/base/pmix_base.h" -#include "src/mca/mca.h" - -#include "src/mca/rtc/base/base.h" -/* - * The following file was created by configure. It contains extern - * statements and the definition of an array of pointers to each - * component's public pmix_mca_base_component_t struct. - */ - -#include "src/mca/rtc/base/static-components.h" - -/* - * Global variables - */ -prte_rtc_API_module_t prte_rtc = { - .assign = prte_rtc_base_assign, - .set = prte_rtc_base_set, - .get_available_values = prte_rtc_base_get_avail_vals -}; -prte_rtc_base_t prte_rtc_base = { - .actives = PMIX_LIST_STATIC_INIT -}; - -static int prte_rtc_base_close(void) -{ - pmix_list_item_t *item; - - /* cleanup globals */ - while (NULL != (item = pmix_list_remove_first(&prte_rtc_base.actives))) { - PMIX_RELEASE(item); - } - PMIX_DESTRUCT(&prte_rtc_base.actives); - - return pmix_mca_base_framework_components_close(&prte_rtc_base_framework, NULL); -} - -/** - * Function for finding and opening either all MCA components, or the one - * that was specifically requested via a MCA parameter. - */ -static int prte_rtc_base_open(pmix_mca_base_open_flag_t flags) -{ - /* init the globals */ - PMIX_CONSTRUCT(&prte_rtc_base.actives, pmix_list_t); - - /* Open up all available components */ - return pmix_mca_base_framework_components_open(&prte_rtc_base_framework, flags); -} - -PMIX_MCA_BASE_FRAMEWORK_DECLARE(prte, rtc, "PRTE Mapping Subsystem", NULL, prte_rtc_base_open, - prte_rtc_base_close, prte_rtc_base_static_components, - PMIX_MCA_BASE_FRAMEWORK_FLAG_DEFAULT); - -static void mdes(prte_rtc_base_selected_module_t *active) -{ - if (NULL != active->module->finalize) { - active->module->finalize(); - } -} -PMIX_CLASS_INSTANCE(prte_rtc_base_selected_module_t, pmix_list_item_t, NULL, mdes); - -static void rcon(prte_rtc_resource_t *p) -{ - p->component = NULL; - p->category = NULL; - PMIX_CONSTRUCT(&p->control, prte_value_t); -} -static void rdes(prte_rtc_resource_t *p) -{ - if (NULL != p->component) { - free(p->component); - } - if (NULL != p->category) { - free(p->category); - } - PMIX_DESTRUCT(&p->control); -} -PMIX_CLASS_INSTANCE(prte_rtc_resource_t, pmix_list_item_t, rcon, rdes); diff --git a/src/mca/rtc/base/rtc_base_select.c b/src/mca/rtc/base/rtc_base_select.c deleted file mode 100644 index b0721b96c2..0000000000 --- a/src/mca/rtc/base/rtc_base_select.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2014-2019 Intel, Inc. All rights reserved. - * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved - * Copyright (c) 2021-2022 Nanook Consulting. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "prte_config.h" -#include "constants.h" - -#include - -#include "src/mca/base/pmix_base.h" -#include "src/mca/mca.h" - -#include "src/mca/rtc/base/base.h" - -static bool selected = false; - -/* - * Function for selecting one component from all those that are - * available. - */ -int prte_rtc_base_select(void) -{ - pmix_mca_base_component_list_item_t *cli = NULL; - pmix_mca_base_component_t *component = NULL; - pmix_mca_base_module_t *module = NULL; - prte_rtc_base_module_t *nmodule; - prte_rtc_base_selected_module_t *newmodule, *mod; - int rc, priority; - bool inserted; - - if (selected) { - /* ensure we don't do this twice */ - return PRTE_SUCCESS; - } - selected = true; - - /* Query all available components and ask if they have a module */ - PMIX_LIST_FOREACH(cli, &prte_rtc_base_framework.framework_components, - pmix_mca_base_component_list_item_t) - { - component = (pmix_mca_base_component_t *) cli->cli_component; - - pmix_output_verbose(5, prte_rtc_base_framework.framework_output, - "mca:rtc:select: checking available component %s", - component->pmix_mca_component_name); - - /* If there's no query function, skip it */ - if (NULL == component->pmix_mca_query_component) { - pmix_output_verbose( - 5, prte_rtc_base_framework.framework_output, - "mca:rtc:select: Skipping component [%s]. It does not implement a query function", - component->pmix_mca_component_name); - continue; - } - - /* Query the component */ - pmix_output_verbose(5, prte_rtc_base_framework.framework_output, - "mca:rtc:select: Querying component [%s]", - component->pmix_mca_component_name); - rc = component->pmix_mca_query_component(&module, &priority); - - /* If no module was returned, then skip component */ - if (PRTE_SUCCESS != rc || NULL == module) { - pmix_output_verbose( - 5, prte_rtc_base_framework.framework_output, - "mca:rtc:select: Skipping component [%s]. Query failed to return a module", - component->pmix_mca_component_name); - continue; - } - nmodule = (prte_rtc_base_module_t *) module; - - /* give the module a chance to init */ - if (NULL != nmodule->init) { - if (PRTE_SUCCESS != (rc = nmodule->init())) { - pmix_output_verbose(5, prte_rtc_base_framework.framework_output, - "mca:rtc:select: Skipping component [%s]. Failed to init", - component->pmix_mca_component_name); - continue; - } - } - - /* add to the list of selected modules */ - newmodule = PMIX_NEW(prte_rtc_base_selected_module_t); - newmodule->pri = priority; - newmodule->module = nmodule; - newmodule->component = component; - - /* maintain priority order */ - inserted = false; - PMIX_LIST_FOREACH(mod, &prte_rtc_base.actives, prte_rtc_base_selected_module_t) - { - if (priority > mod->pri) { - pmix_list_insert_pos(&prte_rtc_base.actives, (pmix_list_item_t *) mod, - &newmodule->super); - inserted = true; - break; - } - } - if (!inserted) { - /* must be lowest priority - add to end */ - pmix_list_append(&prte_rtc_base.actives, &newmodule->super); - } - } - - if (4 < pmix_output_get_verbosity(prte_rtc_base_framework.framework_output)) { - pmix_output(0, "%s: Final RTC priorities", PRTE_NAME_PRINT(PRTE_PROC_MY_NAME)); - /* show the prioritized list */ - PMIX_LIST_FOREACH(mod, &prte_rtc_base.actives, prte_rtc_base_selected_module_t) - { - pmix_output(0, "\tModule: %s Priority: %d", mod->component->pmix_mca_component_name, - mod->pri); - } - } - - return PRTE_SUCCESS; -} diff --git a/src/mca/rtc/base/rtc_base_stubs.c b/src/mca/rtc/base/rtc_base_stubs.c deleted file mode 100644 index 35a95a17c9..0000000000 --- a/src/mca/rtc/base/rtc_base_stubs.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2014-2019 Intel, Inc. All rights reserved. - * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved - * Copyright (c) 2021-2022 Nanook Consulting. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "prte_config.h" - -#include "src/util/pmix_fd.h" -#include "src/util/pmix_show_help.h" - -#include "src/mca/errmgr/errmgr.h" -#include "src/mca/odls/odls_types.h" - -#include "src/mca/rtc/base/base.h" - -void prte_rtc_base_assign(prte_job_t *jdata) -{ - prte_rtc_base_selected_module_t *active; - - PMIX_LIST_FOREACH(active, &prte_rtc_base.actives, prte_rtc_base_selected_module_t) - { - if (NULL != active->module->assign) { - /* give this module a chance to operate on it */ - active->module->assign(jdata); - } - } -} - -void prte_rtc_base_set(prte_odls_spawn_caddy_t *cd, int error_fd) -{ - prte_rtc_base_selected_module_t *active; - - PMIX_LIST_FOREACH(active, &prte_rtc_base.actives, prte_rtc_base_selected_module_t) - { - if (NULL != active->module->set) { - /* give this module a chance to operate on it */ - active->module->set(cd, error_fd); - } - } -} - -void prte_rtc_base_get_avail_vals(pmix_list_t *vals) -{ - prte_rtc_base_selected_module_t *active; - - PMIX_LIST_FOREACH(active, &prte_rtc_base.actives, prte_rtc_base_selected_module_t) - { - if (NULL != active->module->get_available_values) { - /* give this module a chance to operate on it */ - active->module->get_available_values(vals); - } - } -} - -static int write_help_msg(int fd, prte_odls_pipe_err_msg_t *msg, const char *file, - const char *topic, va_list ap) -{ - int ret; - char *str; - - if (NULL == file || NULL == topic) { - return PRTE_ERR_BAD_PARAM; - } - - str = pmix_show_help_vstring(file, topic, true, ap); - - msg->file_str_len = (int) strlen(file); - if (msg->file_str_len > PRTE_ODLS_MAX_FILE_LEN) { - PRTE_ERROR_LOG(PRTE_ERR_BAD_PARAM); - return PRTE_ERR_BAD_PARAM; - } - msg->topic_str_len = (int) strlen(topic); - if (msg->topic_str_len > PRTE_ODLS_MAX_TOPIC_LEN) { - PRTE_ERROR_LOG(PRTE_ERR_BAD_PARAM); - return PRTE_ERR_BAD_PARAM; - } - msg->msg_str_len = (int) strlen(str); - - /* Only keep writing if each write() succeeds */ - if (PRTE_SUCCESS != (ret = pmix_fd_write(fd, sizeof(*msg), msg))) { - goto out; - } - if (msg->file_str_len > 0 - && PRTE_SUCCESS != (ret = pmix_fd_write(fd, msg->file_str_len, file))) { - goto out; - } - if (msg->topic_str_len > 0 - && PRTE_SUCCESS != (ret = pmix_fd_write(fd, msg->topic_str_len, topic))) { - goto out; - } - if (msg->msg_str_len > 0 && PRTE_SUCCESS != (ret = pmix_fd_write(fd, msg->msg_str_len, str))) { - goto out; - } - -out: - free(str); - return ret; -} - -int prte_rtc_base_send_warn_show_help(int fd, const char *file, const char *topic, ...) -{ - int ret; - va_list ap; - prte_odls_pipe_err_msg_t msg; - - msg.fatal = false; - msg.exit_status = 0; /* ignored */ - - /* Send it */ - va_start(ap, topic); - ret = write_help_msg(fd, &msg, file, topic, ap); - va_end(ap); - - return ret; -} - -void prte_rtc_base_send_error_show_help(int fd, int exit_status, const char *file, - const char *topic, ...) -{ - va_list ap; - prte_odls_pipe_err_msg_t msg; - - msg.fatal = true; - msg.exit_status = exit_status; - - /* Send it */ - va_start(ap, topic); - write_help_msg(fd, &msg, file, topic, ap); - va_end(ap); - - exit(exit_status); -} diff --git a/src/mca/rtc/hwloc/Makefile.am b/src/mca/rtc/hwloc/Makefile.am deleted file mode 100644 index 73fb56b8de..0000000000 --- a/src/mca/rtc/hwloc/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (c) 2014-2020 Intel, Inc. All rights reserved. -# Copyright (c) 2017 IBM Corporation. All rights reserved. -# Copyright (c) 2020 Cisco Systems, Inc. All rights reserved -# Copyright (c) 2022 Nanook Consulting. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -dist_prtedata_DATA = help-prte-rtc-hwloc.txt - -sources = \ - rtc_hwloc.c \ - rtc_hwloc.h \ - rtc_hwloc_component.c - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -if MCA_BUILD_prte_rtc_hwloc_DSO -component_noinst = -component_install = prte_mca_rtc_hwloc.la -else -component_noinst = libprtemca_rtc_hwloc.la -component_install = -endif - -mcacomponentdir = $(prtelibdir) -mcacomponent_LTLIBRARIES = $(component_install) -prte_mca_rtc_hwloc_la_SOURCES = $(sources) -prte_mca_rtc_hwloc_la_LDFLAGS = -module -avoid-version -prte_mca_rtc_hwloc_la_LIBADD = $(top_builddir)/src/libprrte.la - -noinst_LTLIBRARIES = $(component_noinst) -libprtemca_rtc_hwloc_la_SOURCES =$(sources) -libprtemca_rtc_hwloc_la_LDFLAGS = -module -avoid-version diff --git a/src/mca/rtc/hwloc/help-prte-rtc-hwloc.txt b/src/mca/rtc/hwloc/help-prte-rtc-hwloc.txt deleted file mode 100644 index cdd48f0d42..0000000000 --- a/src/mca/rtc/hwloc/help-prte-rtc-hwloc.txt +++ /dev/null @@ -1,30 +0,0 @@ -# -*- text -*- -# -# Copyright (c) 2009-2020 Cisco Systems, Inc. All rights reserved -# Copyright (c) 2010-2012 Los Alamos National Security, LLC. -# All rights reserved. -# -# Copyright (c) 2017-2019 Intel, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -# This is the US/English help file for PRTE's hwloc support. -# -[sys call fail] -A system call failed during shared memory initialization that should -not have. - - Local host: %s - System call: %s %s - Error: %s (errno %d) -# -[target full] -It appears as if there is not enough space for %s (the shared-memory backing -file for hwloc topology). - - Local host: %s - Space Requested: %lu B - Space Available: %llu B diff --git a/src/mca/rtc/hwloc/owner.txt b/src/mca/rtc/hwloc/owner.txt deleted file mode 100644 index 4ad6f408ca..0000000000 --- a/src/mca/rtc/hwloc/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: INTEL -status: maintenance diff --git a/src/mca/rtc/hwloc/rtc_hwloc.h b/src/mca/rtc/hwloc/rtc_hwloc.h deleted file mode 100644 index 5995dee3d1..0000000000 --- a/src/mca/rtc/hwloc/rtc_hwloc.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2014-2019 Intel, Inc. All rights reserved. - * Copyright (c) 2017 Inria. All rights reserved. - * Copyright (c) 2019 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved - * Copyright (c) 2021-2022 Nanook Consulting. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - */ -#ifndef PRTE_RTC_HWLOC_H -#define PRTE_RTC_HWLOC_H - -#include "prte_config.h" - -#include "src/mca/rtc/rtc.h" - -BEGIN_C_DECLS - -typedef enum { - VM_HOLE_NONE = -1, - VM_HOLE_BEGIN = 0, /* use hole at the very beginning */ - VM_HOLE_AFTER_HEAP = 1, /* use hole right after heap */ - VM_HOLE_BEFORE_STACK = 2, /* use hole right before stack */ - VM_HOLE_BIGGEST = 3, /* use biggest hole */ - VM_HOLE_IN_LIBS = 4, /* use biggest hole between heap and stack */ - VM_HOLE_CUSTOM = 5, /* use given address if available */ -} prte_rtc_hwloc_vm_hole_kind_t; - -typedef enum { - VM_MAP_FILE = 0, - VM_MAP_ANONYMOUS = 1, - VM_MAP_HEAP = 2, - VM_MAP_STACK = 3, - VM_MAP_OTHER = 4 /* vsyscall/vdso/vvar shouldn't occur since we stop after stack */ -} prte_rtc_hwloc_vm_map_kind_t; - -typedef struct { - prte_rtc_base_component_t super; - prte_rtc_hwloc_vm_hole_kind_t kind; -} prte_mca_rtc_hwloc_component_t; - -PRTE_MODULE_EXPORT extern prte_mca_rtc_hwloc_component_t prte_mca_rtc_hwloc_component; - -extern prte_rtc_base_module_t prte_rtc_hwloc_module; - -END_C_DECLS - -#endif /* PRTE_RTC_HWLOC_H */ diff --git a/src/mca/rtc/hwloc/rtc_hwloc_component.c b/src/mca/rtc/hwloc/rtc_hwloc_component.c deleted file mode 100644 index 7af01ba5be..0000000000 --- a/src/mca/rtc/hwloc/rtc_hwloc_component.c +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2014-2019 Intel, Inc. All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2017-2019 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2017 Inria. All rights reserved. - * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved - * Copyright (c) 2021-2022 Nanook Consulting. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "prte_config.h" -#include "constants.h" - -#include "src/mca/base/pmix_base.h" -#include "src/mca/base/pmix_mca_base_var.h" - -#include "rtc_hwloc.h" - -/* - * Local functions - */ - -static int rtc_hwloc_query(pmix_mca_base_module_t **module, int *priority); -static int rtc_hwloc_register(void); - -static int my_priority; - -prte_mca_rtc_hwloc_component_t prte_mca_rtc_hwloc_component = { - .super = { - PRTE_RTC_BASE_VERSION_1_0_0, - - .pmix_mca_component_name = "hwloc", - PMIX_MCA_BASE_MAKE_VERSION(component, - PRTE_MAJOR_VERSION, - PRTE_MINOR_VERSION, - PMIX_RELEASE_VERSION), - .pmix_mca_query_component = rtc_hwloc_query, - .pmix_mca_register_component_params = rtc_hwloc_register, - }, - .kind = VM_HOLE_BIGGEST -}; - -static char *biggest = "biggest"; -static char *vmhole; - -static int rtc_hwloc_register(void) -{ - pmix_mca_base_component_t *c = &prte_mca_rtc_hwloc_component.super; - - /* set as the default */ - my_priority = 70; - (void) pmix_mca_base_component_var_register(c, "priority", - "Priority of the HWLOC rtc component", - PMIX_MCA_BASE_VAR_TYPE_INT, - &my_priority); - - prte_mca_rtc_hwloc_component.kind = VM_HOLE_BIGGEST; - vmhole = biggest; - (void) pmix_mca_base_component_var_register(c, "vmhole", - "Kind of VM hole to identify - none, begin, biggest, libs, heap, stack (default=biggest)", - PMIX_MCA_BASE_VAR_TYPE_STRING, - &vmhole); - if (0 == strcasecmp(vmhole, "none")) { - prte_mca_rtc_hwloc_component.kind = VM_HOLE_NONE; - } else if (0 == strcasecmp(vmhole, "begin")) { - prte_mca_rtc_hwloc_component.kind = VM_HOLE_BEGIN; - } else if (0 == strcasecmp(vmhole, "biggest")) { - prte_mca_rtc_hwloc_component.kind = VM_HOLE_BIGGEST; - } else if (0 == strcasecmp(vmhole, "libs")) { - prte_mca_rtc_hwloc_component.kind = VM_HOLE_IN_LIBS; - } else if (0 == strcasecmp(vmhole, "heap")) { - prte_mca_rtc_hwloc_component.kind = VM_HOLE_AFTER_HEAP; - } else if (0 == strcasecmp(vmhole, "stack")) { - prte_mca_rtc_hwloc_component.kind = VM_HOLE_BEFORE_STACK; - } else { - pmix_output(0, "INVALID VM HOLE TYPE"); - return PRTE_ERROR; - } - - return PRTE_SUCCESS; -} - -static int rtc_hwloc_query(pmix_mca_base_module_t **module, int *priority) -{ - /* Only run on the HNP */ - - *priority = my_priority; - *module = (pmix_mca_base_module_t *) &prte_rtc_hwloc_module; - - return PRTE_SUCCESS; -} diff --git a/src/mca/rtc/rtc.h b/src/mca/rtc/rtc.h deleted file mode 100644 index 0ea03dab72..0000000000 --- a/src/mca/rtc/rtc.h +++ /dev/null @@ -1,108 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2014-2020 Intel, Inc. All rights reserved. - * Copyright (c) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved - * Copyright (c) 2021-2022 Nanook Consulting. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file: - * - * The PRTE Run-Time Control Framework (RTC) - * - */ - -#ifndef PRTE_MCA_RTC_H -#define PRTE_MCA_RTC_H - -#include "prte_config.h" -#include "types.h" - -#include "src/class/pmix_list.h" -#include "src/mca/mca.h" -#include "src/mca/odls/base/base.h" -#include "src/pmix/pmix-internal.h" -#include "src/runtime/prte_globals.h" - -BEGIN_C_DECLS - -typedef struct { - pmix_list_item_t super; - char *component; - char *category; - prte_value_t control; -} prte_rtc_resource_t; -PRTE_EXPORT PMIX_CLASS_DECLARATION(prte_rtc_resource_t); - -/* Assign run-time controls for a given job. This provides each component with - * an opportunity to insert attributes into the prte_job_t and/or its - * associated proc structures that will be passed to backend daemons for - * controlling the job. For example, if the user specified a frequency - * setting for the job, then the freq component will have an opportunity - * to add an attribute to the job so the freq component on the remote daemons - * can "catch" it and perform the desired action - */ -typedef void (*prte_rtc_base_module_assign_fn_t)(prte_job_t *jdata); - -/* Set run-time controls for a given job and/or process. This can include - * controls for power, binding, memory, and any other resource on the node. - * Each active plugin will be given a chance to operate on the request, setting - * whatever controls that lie within its purview. - * - * Each module is responsible for reporting errors via the state machine. Thus, - * no error code is returned. However, warnings and error messages for the user - * can be output via the provided error_fd */ -typedef void (*prte_rtc_base_module_set_fn_t)(prte_odls_spawn_caddy_t *cd, - int error_fd); - -/* Return a list of valid controls values for this component. - * Each module is responsible for adding its control values - * to a list of prte_value_t objects. - */ -typedef void (*prte_rtc_base_module_get_avail_vals_fn_t)(pmix_list_t *vals); - -/* provide a way for the module to init during selection */ -typedef int (*prte_rtc_base_module_init_fn_t)(void); - -/* provide a chance for the module to finalize */ -typedef void (*prte_rtc_base_module_fini_fn_t)(void); - -/* - * rtc module version 1.0.0 - */ -typedef struct { - prte_rtc_base_module_init_fn_t init; - prte_rtc_base_module_fini_fn_t finalize; - prte_rtc_base_module_assign_fn_t assign; - prte_rtc_base_module_set_fn_t set; - prte_rtc_base_module_get_avail_vals_fn_t get_available_values; -} prte_rtc_base_module_t; - -/* provide a public API version */ -typedef struct { - prte_rtc_base_module_assign_fn_t assign; - prte_rtc_base_module_set_fn_t set; - prte_rtc_base_module_get_avail_vals_fn_t get_available_values; -} prte_rtc_API_module_t; - -/** - * rtc component version 1.0.0 - */ -typedef pmix_mca_base_component_t prte_rtc_base_component_t; - -/* declare the struct containing the public API */ -PRTE_EXPORT extern prte_rtc_API_module_t prte_rtc; - -/* - * Macro for use in components that are of type rtc - */ -#define PRTE_RTC_BASE_VERSION_1_0_0 PRTE_MCA_BASE_VERSION_3_0_0("rtc", 1, 0, 0) - -END_C_DECLS - -#endif diff --git a/src/runtime/prte_init.c b/src/runtime/prte_init.c index 5e7a234f63..72246bda5e 100644 --- a/src/runtime/prte_init.c +++ b/src/runtime/prte_init.c @@ -79,7 +79,6 @@ #include "src/mca/prteinstalldirs/base/base.h" #include "src/mca/ras/base/base.h" #include "src/mca/rmaps/base/base.h" -#include "src/mca/rtc/base/base.h" #include "src/mca/schizo/base/base.h" #include "src/mca/state/base/base.h"