diff --git a/src/mca/rmaps/likwid/Makefile.am b/src/mca/rmaps/likwid/Makefile.am deleted file mode 100644 index c5d060a452..0000000000 --- a/src/mca/rmaps/likwid/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# -# 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-2009 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) 2010-2020 Cisco Systems, Inc. All rights reserved -# Copyright (c) 2017 IBM Corporation. All rights reserved. -# Copyright (c) 2017-2020 Intel, Inc. All rights reserved. -# Copyright (c) 2022-2023 Nanook Consulting. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - rmaps_likwid.c \ - rmaps_likwid.h \ - rmaps_likwid_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_rmaps_likwid_DSO -component_noinst = -component_install = prte_mca_rmaps_likwid.la -else -component_noinst = libprtemca_rmaps_likwid.la -component_install = -endif - -mcacomponentdir = $(prtelibdir) -mcacomponent_LTLIBRARIES = $(component_install) -prte_mca_rmaps_likwid_la_SOURCES = $(sources) -prte_mca_rmaps_likwid_la_LDFLAGS = -module -avoid-version -prte_mca_rmaps_likwid_la_LIBADD = $(top_builddir)/src/libprrte.la - -noinst_LTLIBRARIES = $(component_noinst) -libprtemca_rmaps_likwid_la_SOURCES =$(sources) -libprtemca_rmaps_likwid_la_LDFLAGS = -module -avoid-version diff --git a/src/mca/rmaps/likwid/configure.m4 b/src/mca/rmaps/likwid/configure.m4 deleted file mode 100644 index 539f3f0ba2..0000000000 --- a/src/mca/rmaps/likwid/configure.m4 +++ /dev/null @@ -1,54 +0,0 @@ -# -*- shell-script -*- -# -# 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) 2009-2020 Cisco Systems, Inc. All rights reserved -# Copyright (c) 2011-2013 Los Alamos National Security, LLC. -# All rights reserved. -# Copyright (c) 2019 Intel, Inc. All rights reserved. -# Copyright (c) 2022-2023 Nanook Consulting. All rights reserved. -# Copyright (c) 2022 Research Organization for Information Science -# and Technology (RIST). All rights reserved. -# Copyright (c) 2022 Amazon.com, Inc. or its affiliates. -# All Rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# MCA_ras_pbs_CONFIG([action-if-found], [action-if-not-found]) -# ----------------------------------------------------------- -AC_DEFUN([MCA_prte_rmaps_likwid_CONFIG],[ - AC_CONFIG_FILES([src/mca/rmaps/likwid/Makefile]) - -# this is where you would want to provide the path to -# any 3rd-party libs you might need. Look at the src/mca/plm/tm -# plugin for an example - uses the config/prte_check_tm.m4 -# For now, I've just left this so the plugin won't build unless -# requested - - AC_ARG_WITH([likwid], - [AS_HELP_STRING([--with-likwid], - [Build LIKWID rmaps component (default: no)])]) - - if test "$with_likwid" != "yes" ; then - prte_check_likwid_happy="no" - else - prte_check_likwid_happy="yes" - fi - - AS_IF([test "$prte_check_likwid_happy" = "yes"], - [$1], - [$2]) - -])dnl diff --git a/src/mca/rmaps/likwid/rmaps_likwid.c b/src/mca/rmaps/likwid/rmaps_likwid.c deleted file mode 100644 index 660c39edd2..0000000000 --- a/src/mca/rmaps/likwid/rmaps_likwid.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2004-2007 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) 2006-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 (c) 2015-2019 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2016 IBM Corporation. All rights reserved. - * Copyright (c) 2021-2023 Nanook Consulting. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "prte_config.h" -#include "constants.h" -#include "types.h" - -#include -#ifdef HAVE_UNISTD_H -# include -#endif /* HAVE_UNISTD_H */ -#include -#include - -#include "src/hwloc/hwloc-internal.h" -#include "src/util/pmix_if.h" -#include "src/util/pmix_net.h" -#include "src/util/pmix_string_copy.h" - -#include "src/mca/errmgr/errmgr.h" -#include "src/mca/ess/ess.h" -#include "src/runtime/prte_globals.h" -#include "src/util/dash_host/dash_host.h" -#include "src/util/hostfile/hostfile.h" -#include "src/util/name_fns.h" -#include "src/util/proc_info.h" -#include "src/util/pmix_show_help.h" - -#include "rmaps_likwid.h" -#include "src/mca/rmaps/base/base.h" -#include "src/mca/rmaps/base/rmaps_private.h" - -static int prte_rmaps_likwid_map(prte_job_t *jdata, - prte_rmaps_options_t *options); - -/* define the module */ -prte_rmaps_base_module_t prte_rmaps_likwid_module = { - .map_job = prte_rmaps_likwid_map -}; - -static int prte_rmaps_likwid_map(prte_job_t *jdata, - prte_rmaps_options_t *options) -{ - prte_app_context_t *app; - int i; - pmix_list_t node_list; - int32_t num_slots; - int rc; - pmix_mca_base_component_t *c = &prte_mca_rmaps_likwid_component; - bool initial_map = true; - char **tmp; - - PMIX_OUTPUT_VERBOSE((1, prte_rmaps_base_framework.framework_output, - "%s rmaps:likwid called on job %s", - PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), - PRTE_JOBID_PRINT(jdata->nspace))); - - /* this mapper can only handle initial launch - * when likwid mapping is desired - allow - * restarting of failed apps - */ - if (PRTE_FLAG_TEST(jdata, PRTE_JOB_FLAG_RESTART)) { - pmix_output_verbose(5, prte_rmaps_base_framework.framework_output, - "mca:rmaps:likwid: job %s is being restarted - likwid cannot map", - PRTE_JOBID_PRINT(jdata->nspace)); - return PRTE_ERR_TAKE_NEXT_OPTION; - } - if (NULL != jdata->map->req_mapper) { - if (0 != strcasecmp(jdata->map->req_mapper, c->pmix_mca_component_name)) { - /* a mapper has been specified, and it isn't me */ - pmix_output_verbose(5, prte_rmaps_base_framework.framework_output, - "mca:rmaps:likwid: job %s not using likwiduential mapper", - PRTE_JOBID_PRINT(jdata->nspace)); - return PRTE_ERR_TAKE_NEXT_OPTION; - } - } - if (PRTE_MAPPING_LIKWID != PRTE_GET_MAPPING_POLICY(jdata->map->mapping)) { - /* I don't know how to do these - defer */ - pmix_output_verbose(5, prte_rmaps_base_framework.framework_output, - "mca:rmaps:likwid: job %s not using likwid mapper", - PRTE_JOBID_PRINT(jdata->nspace)); - return PRTE_ERR_TAKE_NEXT_OPTION; - } - - pmix_output_verbose(5, prte_rmaps_base_framework.framework_output, - "mca:rmaps:likwid: mapping job %s", - PRTE_JOBID_PRINT(jdata->nspace)); - - /* flag that I did the mapping */ - if (NULL != jdata->map->last_mapper) { - free(jdata->map->last_mapper); - } - jdata->map->last_mapper = strdup(c->pmix_mca_component_name); - - /* start at the beginning... */ - jdata->num_procs = 0; - - /* cycle through the app_contexts, mapping them using likwid */ - for (i = 0; i < jdata->apps->size; i++) { - app = (prte_app_context_t *) pmix_pointer_array_get_item(jdata->apps, i); - if (NULL == app) { - continue; - } - - /* setup the nodelist here in case we jump to error */ - PMIX_CONSTRUCT(&node_list, pmix_list_t); - - /* for each app_context, we have to get the list of nodes that it can - * use since that can now be modified with a hostfile and/or -host - * option - */ - rc = prte_rmaps_base_get_target_nodes(&node_list, &num_slots, jdata, app, - jdata->map->mapping, initial_map, false); - if (PRTE_SUCCESS != rc) { - PRTE_ERROR_LOG(rc); - goto error; - } - /* flag that all subsequent requests should not reset the node->mapped flag */ - initial_map = false; - - /* Make assignments - both assigning procs to locations and specifying - * their binding. See the rankfile mapper for how to do the binding */ - - /* aborting here for now */ - rc = PRTE_ERR_NOT_SUPPORTED; - PRTE_ERROR_LOG(rc); - goto error; - - - /* track the total number of processes we mapped - must update - * this value AFTER we compute vpids so that computation - * is done correctly - */ - jdata->num_procs += app->num_procs; - - /* cleanup the node list - it can differ from one app_context - * to another, so we have to get it every time - */ - PMIX_LIST_DESTRUCT(&node_list); - } - /* calculate the ranks for this job */ - rc = prte_rmaps_base_compute_vpids(jdata, options); - - return rc; - -error: - PMIX_LIST_DESTRUCT(&node_list); - - return rc; -} diff --git a/src/mca/rmaps/likwid/rmaps_likwid.h b/src/mca/rmaps/likwid/rmaps_likwid.h deleted file mode 100644 index a18a18b298..0000000000 --- a/src/mca/rmaps/likwid/rmaps_likwid.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2006 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) 2019 Intel, Inc. 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-2023 Nanook Consulting. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - * - * Resource Mapping - */ -#ifndef PRTE_RMAPS_LIKWID_H -#define PRTE_RMAPS_LIKWID_H - -#include "prte_config.h" -#include "src/mca/rmaps/rmaps.h" - -BEGIN_C_DECLS - -/** - * RMGR Component - */ - -PRTE_MODULE_EXPORT extern prte_rmaps_base_component_t prte_mca_rmaps_likwid_component; -extern prte_rmaps_base_module_t prte_rmaps_likwid_module; - -END_C_DECLS - -#endif diff --git a/src/mca/rmaps/likwid/rmaps_likwid_component.c b/src/mca/rmaps/likwid/rmaps_likwid_component.c deleted file mode 100644 index 3c9f058093..0000000000 --- a/src/mca/rmaps/likwid/rmaps_likwid_component.c +++ /dev/null @@ -1,92 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2004-2008 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) 2015 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2019 Intel, Inc. 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-2023 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 "rmaps_likwid.h" -#include "src/mca/rmaps/rmaps.h" - -/* - * Local functions - */ - -static int prte_rmaps_likwid_register(void); -static int prte_rmaps_likwid_open(void); -static int prte_rmaps_likwid_close(void); -static int prte_rmaps_likwid_query(pmix_mca_base_module_t **module, int *priority); - -static int my_priority; - -prte_rmaps_base_component_t prte_mca_rmaps_likwid_component = { - PRTE_RMAPS_BASE_VERSION_4_0_0, - - .pmix_mca_component_name = "likwid", - PMIX_MCA_BASE_MAKE_VERSION(component, - PRTE_MAJOR_VERSION, - PRTE_MINOR_VERSION, - PMIX_RELEASE_VERSION), - .pmix_mca_open_component = prte_rmaps_likwid_open, - .pmix_mca_close_component = prte_rmaps_likwid_close, - .pmix_mca_query_component = prte_rmaps_likwid_query, - .pmix_mca_register_component_params = prte_rmaps_likwid_register, -}; - -/** - * component register/open/close/init function - */ -static int prte_rmaps_likwid_register(void) -{ - my_priority = 5; - (void) pmix_mca_base_component_var_register(&prte_mca_rmaps_likwid_component, "priority", - "Priority of the likwid rmaps component", - PMIX_MCA_BASE_VAR_TYPE_INT, - &my_priority); - return PRTE_SUCCESS; -} - -static int prte_rmaps_likwid_open(void) -{ - return PRTE_SUCCESS; -} - -static int prte_rmaps_likwid_query(pmix_mca_base_module_t **module, int *priority) -{ - *priority = my_priority; - *module = (pmix_mca_base_module_t *) &prte_rmaps_likwid_module; - return PRTE_SUCCESS; -} - -/** - * Close all subsystems. - */ - -static int prte_rmaps_likwid_close(void) -{ - return PRTE_SUCCESS; -}