From 345916f2f32a7d0d8a31f82d2b87e32503883681 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 16 Jan 2018 11:39:04 -0800 Subject: [PATCH] Remove the orte_nidmap test Moved to the ompi-tests repo Signed-off-by: Ralph Castain --- test/util/Makefile.am | 10 +- test/util/orte_nidmap.c | 240 ---------------------------------------- 2 files changed, 2 insertions(+), 248 deletions(-) delete mode 100644 test/util/orte_nidmap.c diff --git a/test/util/Makefile.am b/test/util/Makefile.am index 75f18339ae..1b3757a27e 100644 --- a/test/util/Makefile.am +++ b/test/util/Makefile.am @@ -14,6 +14,7 @@ # Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2018 Research Organization for Information Science # and Technology (RIST). All rights reserved. +# Copyright (c) 2018 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -32,8 +33,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/test/support # opal_os_create_dirpath \ # opal_argv \ # opal_basename \ -# opal_path_nfs \ -# orte_nidmap +# opal_path_nfs check_PROGRAMS = \ @@ -122,12 +122,6 @@ opal_path_nfs_DEPENDENCIES = $(opal_path_nfs_LDADD) # $(top_builddir)/test/support/libsupport.a #orte_universe_setup_file_io_DEPENDENCIES = $(orte_universe_setup_file_io_LDADD) -#orte_nidmap_SOURCES = orte_nidmap.c -#orte_nidmap_LDADD = \ -# $(top_builddir)/orte/libopen-rte.la \ -# $(top_builddir)/test/support/libsupport.a -#orte_nidmap_DEPENDENCIES = $(orte_nidmap_LDADD) - bipartite_graph_SOURCES = bipartite_graph.c bipartite_graph_LDADD = \ $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ diff --git a/test/util/orte_nidmap.c b/test/util/orte_nidmap.c deleted file mode 100644 index f91b9564b4..0000000000 --- a/test/util/orte_nidmap.c +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (c) 2018 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "orte_config.h" - -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif /* HAVE_UNISTD_H */ -#ifdef HAVE_SYS_PARAM_H -#include -#endif /* HAVE_SYS_PARAM_H */ -#include - -#include "support.h" -#include "opal/runtime/opal.h" -#include "orte/include/orte/frameworks.h" -#include "orte/constants.h" -#include "orte/runtime/orte_globals.h" -#include "orte/mca/regx/regx.h" -#include "orte/mca/regx/base/base.h" - -static void check (const char *value, const char * expected) { - size_t sz = strlen(expected); - assert(strlen(value) >= sz); - assert(0 == strncmp(value, expected, sz-1)); - assert('@' == value[sz] || '\0' == value[sz]); -} - -int main(int argc, char* argv[]) -{ - char * regex; - char ** nodes; - opal_pointer_array_t pool; - orte_node_t * node; - orte_proc_info(); /* initialize proc info structure */ - - test_init("orte_nidmap"); - - opal_init(&argc, &argv); - orte_init(&argc, &argv, ORTE_PROC_TYPE_NONE); - - if (ORTE_SUCCESS != mca_base_framework_open(&orte_regx_base_framework, 0)) { - return -1; - } - if (ORTE_SUCCESS != orte_regx_base_select()) { - return -1; - } - - OBJ_CONSTRUCT(&pool, opal_pointer_array_t); - orte_node_pool = OBJ_NEW(opal_pointer_array_t); - orte_job_data = OBJ_NEW(opal_hash_table_t); - orte_job_t *jdata = OBJ_NEW(orte_job_t); - jdata->jobid = 1; - orte_process_info.my_name.jobid = 1; - opal_hash_table_init(orte_job_data, 1); - opal_hash_table_set_value_uint32(orte_job_data, jdata->jobid, jdata); - - - node = OBJ_NEW(orte_node_t); - node->daemon = OBJ_NEW(orte_proc_t); - node->daemon->name.jobid = 1; - node->daemon->name.vpid = 0; - node->name = "n0"; - opal_pointer_array_add(&pool, node); - - orte_regx.nidmap_create(&pool, ®ex); - printf ("regex for n0 is %s\n", regex); - - nodes = NULL; - orte_regx.extract_node_names(regex, &nodes); - - check(nodes[0], "n0"); - assert(NULL == nodes[1]); - - - node = OBJ_NEW(orte_node_t); - node->daemon = OBJ_NEW(orte_proc_t); - node->daemon->name.vpid = 1; - node->name = "n1"; - opal_pointer_array_add(&pool, node); - - regex = NULL; - orte_regx.nidmap_create(&pool, ®ex); - printf ("regex for n0,n1 is %s\n", regex); - - nodes = NULL; - orte_regx.extract_node_names(regex, &nodes); - - check(nodes[0], "n0"); - check(nodes[1], "n1"); - assert(NULL == nodes[2]); - - node = opal_pointer_array_get_item(&pool, 0); - node->name = "n-0"; - node = opal_pointer_array_get_item(&pool, 1); - node->name = "n-1"; - - regex = NULL; - orte_regx.nidmap_create(&pool, ®ex); - printf ("regex for n-0,n-1 is %s\n", regex); - - nodes = NULL; - orte_regx.extract_node_names(regex, &nodes); - - check(nodes[0], "n-0"); - check(nodes[1], "n-1"); - assert(NULL == nodes[2]); - - - node = opal_pointer_array_get_item(&pool, 0); - node->name = "n-000"; - node = opal_pointer_array_get_item(&pool, 1); - node->name = "n-001"; - - regex = NULL; - orte_regx.nidmap_create(&pool, ®ex); - printf ("regex for n-000,n-001 is %s\n", regex); - - nodes = NULL; - orte_regx.extract_node_names(regex, &nodes); - - check(nodes[0], "n-000"); - check(nodes[1], "n-001"); - assert(NULL == nodes[2]); - - - node = opal_pointer_array_get_item(&pool, 0); - node->name = "n9"; - node = opal_pointer_array_get_item(&pool, 1); - node->name = "n10"; - - regex = NULL; - orte_regx.nidmap_create(&pool, ®ex); - printf ("regex for n9,n10 is %s\n", regex); - - nodes = NULL; - orte_regx.extract_node_names(regex, &nodes); - - check(nodes[0], "n9"); - check(nodes[1], "n10"); - assert(NULL == nodes[2]); - - - node = opal_pointer_array_get_item(&pool, 0); - node->name = "n99"; - node = opal_pointer_array_get_item(&pool, 1); - node->name = "n100"; - - regex = NULL; - orte_regx.nidmap_create(&pool, ®ex); - printf ("regex for n99,n100 is %s\n", regex); - - nodes = NULL; - orte_regx.extract_node_names(regex, &nodes); - - check(nodes[0], "n99"); - check(nodes[1], "n100"); - assert(NULL == nodes[2]); - - - node = opal_pointer_array_get_item(&pool, 0); - node->name = "c712f6n01"; - node = opal_pointer_array_get_item(&pool, 1); - node->name = "c712f6n02"; - node = OBJ_NEW(orte_node_t); - node->daemon = OBJ_NEW(orte_proc_t); - node->daemon->name.vpid = 2; - node->name = "c712f6n03"; - opal_pointer_array_add(&pool, node); - - regex = NULL; - orte_regx.nidmap_create(&pool, ®ex); - printf ("regex for c712f6n01,c712f6n02,c712f6n03 is %s\n", regex); - - nodes = NULL; - orte_regx.extract_node_names(regex, &nodes); - - check(nodes[0], "c712f6n01"); - check(nodes[1], "c712f6n02"); - check(nodes[2], "c712f6n03"); - assert(NULL == nodes[3]); - - - node = opal_pointer_array_get_item(&pool, 0); - node->name = "n01c712"; - node = opal_pointer_array_get_item(&pool, 1); - node->name = "n02c712"; - node = opal_pointer_array_get_item(&pool, 2); - node->name = "n03c712"; - - regex = NULL; - orte_regx.nidmap_create(&pool, ®ex); - printf ("regex for n01c712,n02c712,n03c712 is %s\n", regex); - - nodes = NULL; - orte_regx.extract_node_names(regex, &nodes); - - check(nodes[0], "n01c712"); - check(nodes[1], "n02c712"); - check(nodes[2], "n03c712"); - assert(NULL == nodes[3]); - - - node = opal_pointer_array_get_item(&pool, 0); - node->name = "c8n"; - node = opal_pointer_array_get_item(&pool, 1); - node->name = "c9n"; - node = opal_pointer_array_get_item(&pool, 2); - node->name = "c10n"; - - regex = NULL; - orte_regx.nidmap_create(&pool, ®ex); - printf ("regex for c8n,c9n,c10n is %s\n", regex); - - nodes = NULL; - orte_regx.extract_node_names(regex, &nodes); - - check(nodes[0], "c8n"); - check(nodes[1], "c9n"); - check(nodes[2], "c10n"); - assert(NULL == nodes[3]); - - - - /* clean up */ - orte_proc_info_finalize(); - - test_finalize(); - return 0; -}