diff --git a/.travis.yml b/.travis.yml index 53b5ba12a..00f10dceb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,12 @@ matrix: - ARGS="--prefix=/usr" - TEST_INSTALL=t - DOCKER_TAG=t + - name: "Ubuntu: 20.04" + compiler: gcc + env: + - ARGS="--prefix=/usr" + - IMG=focal + - DOCKER_TAG=t - name: "Centos 7: docker-deploy" compiler: gcc env: diff --git a/resource/readers/resource_reader_hwloc.cpp b/resource/readers/resource_reader_hwloc.cpp index 73d1aceec..e59d81667 100644 --- a/resource/readers/resource_reader_hwloc.cpp +++ b/resource/readers/resource_reader_hwloc.cpp @@ -114,6 +114,7 @@ vtx_t resource_reader_hwloc_t::add_new_vertex (resource_graph_t &g, void resource_reader_hwloc_t::walk_hwloc (resource_graph_t &g, resource_graph_metadata_t &m, + const hwloc_topology_t topo, const hwloc_obj_t obj, const vtx_t parent, int rank) { @@ -280,8 +281,9 @@ void resource_reader_hwloc_t::walk_hwloc (resource_graph_t &g, g[e].name[subsys] = rev_relation; } - for (unsigned int i = 0; i < obj->arity; i++) { - walk_hwloc (g, m, obj->children[i], valid_ancestor, rank); + hwloc_obj_t curr_child = NULL; + while ((curr_child = hwloc_get_next_child (topo, obj, curr_child)) != NULL) { + walk_hwloc (g, m, topo, curr_child, valid_ancestor, rank); } } @@ -300,11 +302,35 @@ int resource_reader_hwloc_t::unpack_internal (resource_graph_t &g, m_err_msg += "Error initializing hwloc topology; "; goto done; } +#if HWLOC_API_VERSION < 0x20000 if ( hwloc_topology_set_flags (topo, HWLOC_TOPOLOGY_FLAG_IO_DEVICES) != 0) { errno = EINVAL; m_err_msg += "Error setting hwloc topology flag; "; goto done; } +#else + if (hwloc_topology_set_io_types_filter (topo, + HWLOC_TYPE_FILTER_KEEP_IMPORTANT) + < 0) { + errno = EINVAL; + m_err_msg += "hwloc_topology_set_io_types_filter; "; + goto done; + } + if (hwloc_topology_set_cache_types_filter (topo, + HWLOC_TYPE_FILTER_KEEP_STRUCTURE) + < 0) { + errno = EINVAL; + m_err_msg += "hwloc_topology_set_cache_types_filter; "; + goto done; + } + if (hwloc_topology_set_icache_types_filter (topo, + HWLOC_TYPE_FILTER_KEEP_STRUCTURE) + < 0) { + errno = EINVAL; + m_err_msg += "hwloc_topology_set_icache_types_filter; "; + goto done; + } +#endif if ( hwloc_topology_set_xmlbuffer (topo, str.c_str (), len) != 0) { errno = EINVAL; m_err_msg += "Error setting xmlbuffer; "; @@ -317,7 +343,7 @@ int resource_reader_hwloc_t::unpack_internal (resource_graph_t &g, } hwloc_root = hwloc_get_root_obj (topo); - walk_hwloc (g, m, hwloc_root, vtx, rank); + walk_hwloc (g, m, topo, hwloc_root, vtx, rank); hwloc_topology_destroy (topo); rc = 0; diff --git a/resource/readers/resource_reader_hwloc.hpp b/resource/readers/resource_reader_hwloc.hpp index 8045f4573..5995e8e20 100644 --- a/resource/readers/resource_reader_hwloc.hpp +++ b/resource/readers/resource_reader_hwloc.hpp @@ -102,7 +102,8 @@ class resource_reader_hwloc_t : public resource_reader_base_t { const std::string &subsys, const std::string &type, const std::string &basename, int size, int rank = -1); void walk_hwloc (resource_graph_t &g, resource_graph_metadata_t &m, - const hwloc_obj_t obj, const vtx_t parent, int rank); + const hwloc_topology_t topo, const hwloc_obj_t obj, + const vtx_t parent, int rank); int unpack_internal (resource_graph_t &g, resource_graph_metadata_t &m, vtx_t &vtx, const std::string &str, int rank = -1); }; diff --git a/src/test/docker/focal/Dockerfile b/src/test/docker/focal/Dockerfile new file mode 100644 index 000000000..6a3bec0d1 --- /dev/null +++ b/src/test/docker/focal/Dockerfile @@ -0,0 +1,29 @@ +FROM fluxrm/flux-core:focal + +ARG USER=flux +ARG UID=1000 + +# Install extra buildrequires for flux-sched: +RUN sudo apt-get update +RUN sudo apt-get -qq install -y --no-install-recommends \ + libboost-graph-dev \ + libboost-system-dev \ + libboost-filesystem-dev \ + libboost-regex-dev \ + libxml2-dev \ + python-yaml \ + libyaml-cpp-dev + +# Add configured user to image with sudo access: +# +RUN \ + if test "$USER" != "flux"; then \ + sudo groupadd -g $UID $USER \ + && sudo useradd -g $USER -u $UID -d /home/$USER -m $USER \ + && sudo sh -c "printf \"$USER ALL= NOPASSWD: ALL\\n\" >> /etc/sudoers" \ + && sudo adduser $USER sudo ; \ + fi + +USER $USER +WORKDIR /home/$USER +RUN flux keygen diff --git a/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/0.xml b/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/0.xml index a989274da..97ba02fa4 100644 --- a/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/0.xml +++ b/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/0.xml @@ -2,9 +2,6 @@ - - - @@ -16,684 +13,554 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -701,21 +568,25 @@ + + + + diff --git a/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/1.xml b/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/1.xml index b756bd8bd..eb9d29c74 100644 --- a/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/1.xml +++ b/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/1.xml @@ -2,9 +2,6 @@ - - - @@ -16,684 +13,554 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -701,21 +568,25 @@ + + + + diff --git a/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/2.xml b/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/2.xml index 88a75aba2..34d6b9e9a 100644 --- a/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/2.xml +++ b/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/2.xml @@ -2,9 +2,6 @@ - - - @@ -16,710 +13,582 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/3.xml b/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/3.xml index d7be93c56..7e8979f46 100644 --- a/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/3.xml +++ b/t/data/hwloc-data/004N/exclusive/04-brokers-sierra2/3.xml @@ -2,9 +2,6 @@ - - - @@ -16,710 +13,582 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/t/data/resource/commands/basics/cmds10.in b/t/data/resource/commands/basics/cmds10.in index 428840613..8774227a2 100644 --- a/t/data/resource/commands/basics/cmds10.in +++ b/t/data/resource/commands/basics/cmds10.in @@ -1,4 +1,4 @@ -# 2x slot[1]->numanode[1]->gpu[2] +# 2x slot[1]->gpu[2] match allocate @TEST_SRCDIR@/data/resource/jobspecs/basics/test010.yaml match allocate @TEST_SRCDIR@/data/resource/jobspecs/basics/test010.yaml quit diff --git a/t/data/resource/commands/basics/cmds11.in b/t/data/resource/commands/basics/cmds11.in index d71e6c286..5f995c9bc 100644 --- a/t/data/resource/commands/basics/cmds11.in +++ b/t/data/resource/commands/basics/cmds11.in @@ -1,4 +1,4 @@ -# 2x slot[2]->numanode[1]->gpu[1] +# 2x slot[2]->socket[1]->gpu[1] match allocate @TEST_SRCDIR@/data/resource/jobspecs/basics/test012.yaml match allocate @TEST_SRCDIR@/data/resource/jobspecs/basics/test012.yaml quit diff --git a/t/data/resource/expected/basics/017.R.out b/t/data/resource/expected/basics/017.R.out index 893ed7e0e..287395e53 100644 --- a/t/data/resource/expected/basics/017.R.out +++ b/t/data/resource/expected/basics/017.R.out @@ -1,9 +1,5 @@ - ------------------------core3[1:x] - ---------------------L1cache3[32:s] - ------------------L2cache3[256:s] - ---------------L3cache0[20480:s] - ------------socket0[1:s] - ---------numanode0[1:s] + ------------core3[1:x] + ---------socket0[1:s] ------cab1251[1:s] ---cluster0[1:s] INFO: ============================= @@ -11,12 +7,8 @@ INFO: JOBID=1 INFO: RESOURCES=ALLOCATED INFO: SCHEDULED AT=Now INFO: ============================= - ------------------------core2[1:x] - ---------------------L1cache2[32:s] - ------------------L2cache2[256:s] - ---------------L3cache0[20480:s] - ------------socket0[1:s] - ---------numanode0[1:s] + ------------core2[1:x] + ---------socket0[1:s] ------cab1251[1:s] ---cluster0[1:s] INFO: ============================= @@ -24,12 +16,8 @@ INFO: JOBID=2 INFO: RESOURCES=ALLOCATED INFO: SCHEDULED AT=Now INFO: ============================= - ------------------------core1[1:x] - ---------------------L1cache1[32:s] - ------------------L2cache1[256:s] - ---------------L3cache0[20480:s] - ------------socket0[1:s] - ---------numanode0[1:s] + ------------core1[1:x] + ---------socket0[1:s] ------cab1251[1:s] ---cluster0[1:s] INFO: ============================= @@ -37,12 +25,8 @@ INFO: JOBID=3 INFO: RESOURCES=ALLOCATED INFO: SCHEDULED AT=Now INFO: ============================= - ------------------------core0[1:x] - ---------------------L1cache0[32:s] - ------------------L2cache0[256:s] - ---------------L3cache0[20480:s] - ------------socket0[1:s] - ---------numanode0[1:s] + ------------core0[1:x] + ---------socket0[1:s] ------cab1251[1:s] ---cluster0[1:s] INFO: ============================= diff --git a/t/data/resource/expected/basics/018.R.out b/t/data/resource/expected/basics/018.R.out index 919acc47f..c9a411fb9 100644 --- a/t/data/resource/expected/basics/018.R.out +++ b/t/data/resource/expected/basics/018.R.out @@ -1,7 +1,6 @@ - ---------------gpu2[1:x] - ---------------gpu3[1:x] - ------------numanode1[1:s] - ---------group0[1:s] + ------------gpu2[1:x] + ------------gpu3[1:x] + ---------socket1[1:s] ------sierra3682[1:s] ---cluster0[1:s] INFO: ============================= @@ -9,10 +8,9 @@ INFO: JOBID=1 INFO: RESOURCES=ALLOCATED INFO: SCHEDULED AT=Now INFO: ============================= - ---------------gpu0[1:x] - ---------------gpu1[1:x] - ------------numanode0[1:s] - ---------group0[1:s] + ------------gpu0[1:x] + ------------gpu1[1:x] + ---------socket0[1:s] ------sierra3682[1:s] ---cluster0[1:s] INFO: ============================= diff --git a/t/data/resource/expected/basics/019.R.out b/t/data/resource/expected/basics/019.R.out index 4277fe1f2..4ffb1fdcc 100644 --- a/t/data/resource/expected/basics/019.R.out +++ b/t/data/resource/expected/basics/019.R.out @@ -1,7 +1,5 @@ - ---------------gpu2[1:x] - ------------numanode5[1:x] - ---------------gpu3[1:x] - ------------numanode7[1:x] + ------------gpu2[1:x] + ------------gpu3[1:x] ---------socket1[1:s] ------corona11[1:s] ---cluster0[1:s] @@ -10,10 +8,8 @@ INFO: JOBID=1 INFO: RESOURCES=ALLOCATED INFO: SCHEDULED AT=Now INFO: ============================= - ---------------gpu0[1:x] - ------------numanode1[1:x] - ---------------gpu1[1:x] - ------------numanode2[1:x] + ------------gpu0[1:x] + ------------gpu1[1:x] ---------socket0[1:s] ------corona11[1:s] ---cluster0[1:s] diff --git a/t/data/resource/expected/basics/020.R.out b/t/data/resource/expected/basics/020.R.out index 5392832d1..712ec52a5 100644 --- a/t/data/resource/expected/basics/020.R.out +++ b/t/data/resource/expected/basics/020.R.out @@ -1,7 +1,5 @@ - ---------------gpu0[1:x] - ------------numanode0[1:x] - ---------------gpu0[1:x] - ------------numanode1[1:x] + ------------gpu0[1:x] + ------------gpu0[1:x] ---------socket0[1:s] ------chimera[1:s] ---cluster0[1:s] diff --git a/t/data/resource/expected/basics/021.R.out b/t/data/resource/expected/basics/021.R.out index 3b8da30eb..f5545031a 100644 --- a/t/data/resource/expected/basics/021.R.out +++ b/t/data/resource/expected/basics/021.R.out @@ -20,9 +20,9 @@ ------------core41[1:x] ------------core42[1:x] ------------core43[1:x] + ------------gpu2[1:x] + ------------gpu3[1:x] ---------socket1[1:x] - ---------gpu2[1:x] - ---------gpu3[1:x] ------sierra3682[1:s] ---cluster0[1:s] INFO: ============================= @@ -52,9 +52,9 @@ INFO: ============================= ------------core19[1:x] ------------core20[1:x] ------------core21[1:x] + ------------gpu0[1:x] + ------------gpu1[1:x] ---------socket0[1:x] - ---------gpu0[1:x] - ---------gpu1[1:x] ------sierra3682[1:s] ---cluster0[1:s] INFO: ============================= diff --git a/t/data/resource/jobspecs/basics/test009.yaml b/t/data/resource/jobspecs/basics/test009.yaml index b76f1479f..f0b8701ba 100644 --- a/t/data/resource/jobspecs/basics/test009.yaml +++ b/t/data/resource/jobspecs/basics/test009.yaml @@ -7,11 +7,8 @@ resources: count: 2 label: default with: - - type: numanode + - type: socket count: 1 - with: - - type: socket - count: 1 # a comment attributes: diff --git a/t/data/resource/jobspecs/basics/test012.yaml b/t/data/resource/jobspecs/basics/test012.yaml index d71e7c979..085f0482e 100644 --- a/t/data/resource/jobspecs/basics/test012.yaml +++ b/t/data/resource/jobspecs/basics/test012.yaml @@ -1,11 +1,11 @@ version: 1 resources: - - type: slot - count: 2 - label: default + - type: socket + count: 1 with: - - type: numanode - count: 1 + - type: slot + count: 2 + label: default with: - type: gpu count: 1 diff --git a/t/data/resource/jobspecs/basics/test013.yaml b/t/data/resource/jobspecs/basics/test013.yaml index 14d24549e..34538c93f 100644 --- a/t/data/resource/jobspecs/basics/test013.yaml +++ b/t/data/resource/jobspecs/basics/test013.yaml @@ -12,8 +12,8 @@ resources: with: - type: core count: 22 - - type: gpu - count: 2 + - type: gpu + count: 2 # a comment attributes: system: diff --git a/t/scripts/flux-ion-resource.py b/t/scripts/flux-ion-resource.py index 0e46e444d..30bfed9e5 100755 --- a/t/scripts/flux-ion-resource.py +++ b/t/scripts/flux-ion-resource.py @@ -1,3 +1,4 @@ +#!/bin/false # # Run script as `flux ion-resource` with properly configured # FLUX_EXEC_PATH or `flux python flux-ion-resource` if not to @@ -78,7 +79,7 @@ def rpc_get_property (self, gp_resource_path, gp_key): """ def match_alloc_action (args): with open (args.jobspec, 'r') as stream: - jobspec_str = yaml.dump (yaml.load (stream)) + jobspec_str = yaml.dump (yaml.safe_load (stream)) r = ResourceModuleInterface () resp = r.rpc_allocate (r.rpc_next_jobid (), jobspec_str) print (heading ()) @@ -92,7 +93,7 @@ def match_alloc_action (args): """ def match_alloc_sat_action (args): with open (args.jobspec, 'r') as stream: - jobspec_str = yaml.dump (yaml.load (stream)) + jobspec_str = yaml.dump (yaml.safe_load (stream)) r = ResourceModuleInterface () resp = r.rpc_allocate_with_satisfiability (r.rpc_next_jobid (), jobspec_str) @@ -107,7 +108,7 @@ def match_alloc_sat_action (args): """ def match_reserve_action (args): with open (args.jobspec, 'r') as stream: - jobspec_str = yaml.dump (yaml.load (stream)) + jobspec_str = yaml.dump (yaml.safe_load (stream)) r = ResourceModuleInterface () resp = r.rpc_reserve (r.rpc_next_jobid (), jobspec_str) print (heading ()) diff --git a/t/scripts/flux-jsonschemalint.py b/t/scripts/flux-jsonschemalint.py index 23ef7d601..f3d3421ca 100755 --- a/t/scripts/flux-jsonschemalint.py +++ b/t/scripts/flux-jsonschemalint.py @@ -1,3 +1,4 @@ +#!/bin/false # # Run script as `flux jsonschemalint` with properly configured # FLUX_EXEC_PATH or `flux python flux-jsonschemalint` if not to diff --git a/t/t2000-tree-basic.t b/t/t2000-tree-basic.t index 8b2fca7e5..74132a885 100755 --- a/t/t2000-tree-basic.t +++ b/t/t2000-tree-basic.t @@ -66,9 +66,9 @@ test_expect_success 'flux-tree: multi cmdline works' ' FLUX_TREE_NCORES_PER_NODE=1 FLUX_TREE_NGPUS_PER_NODE=0 FLUX_TREE_NNODES=1 - eval python hostname.py + eval flux python hostname.py EOF - flux tree --dry-run --leaf -N 1 -c 1 python hostname.py > out.01.2 && + flux tree --dry-run --leaf -N 1 -c 1 flux python hostname.py > out.01.2 && remove_prefix out.01.2 out.01.2.a && sed -i "s/[ \t]*$//g" out.01.2.a && test_cmp cmp.01.2 out.01.2.a diff --git a/t/t4004-match-hwloc.t b/t/t4004-match-hwloc.t index b98f3ae4a..3a9619cda 100755 --- a/t/t4004-match-hwloc.t +++ b/t/t4004-match-hwloc.t @@ -19,7 +19,7 @@ HOME=${ORIG_HOME} jobspec_basepath=`readlink -e ${SHARNESS_TEST_SRCDIR}/data/resource/jobspecs/` # slot[1]->core[1] jobspec_1core="${jobspec_basepath}/basics/test008.yaml" -# node[1]->slot[2]->numanode[1]->socket[1] +# node[1]->slot[2]->socket[1] jobspec_2socket="${jobspec_basepath}/basics/test009.yaml" # node[1]->slot[1]->socket[1]->core[22] @@ -63,25 +63,25 @@ test_debug ' # Test using the resource query command test_expect_success 'resource-query works on simple query using xml file' ' sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmd_dir}/cmds09.in > cmds09 && - ${query} -L ${hwloc_4core} -f hwloc -S CA -P high -t 017.R.out < cmds09 && + ${query} -L ${hwloc_4core} -f hwloc -S CA -P high -W node,socket,core -t 017.R.out < cmds09 && test_cmp 017.R.out ${exp_dir}/017.R.out ' test_expect_success 'resource-query works on gpu query using xml (NVIDIA)' ' sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmd_dir}/cmds10.in > cmds10 && - ${query} -L ${hwloc_4gpu} -f hwloc -S CA -P high -t 018.R.out < cmds10 && + ${query} -L ${hwloc_4gpu} -f hwloc -S CA -P high -W node,socket,core,gpu -t 018.R.out < cmds10 && test_cmp 018.R.out ${exp_dir}/018.R.out ' test_expect_success 'resource-query works on gpu query using xml (AMD GPU)' ' sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmd_dir}/cmds11.in > cmds11 && - ${query} -L ${hwloc_4amdgpu} -f hwloc -S CA -P high -t 019.R.out < cmds11 && + ${query} -L ${hwloc_4amdgpu} -f hwloc -S CA -P high -W node,socket,core,gpu -t 019.R.out < cmds11 && test_cmp 019.R.out ${exp_dir}/019.R.out ' test_expect_success 'resource-query works on gpu type query using xml (MIXED)' ' sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmd_dir}/cmds11.in > cmds11 && - ${query} -L ${hwloc_2mtypes} -f hwloc -S CA -P high -t 020.R.out < cmds11 && + ${query} -L ${hwloc_2mtypes} -f hwloc -S CA -P high -W node,socket,core,gpu -t 020.R.out < cmds11 && test_cmp 020.R.out ${exp_dir}/020.R.out ' @@ -119,7 +119,8 @@ test_expect_success 'reloading session/hwloc information with test data' ' ' test_expect_success 'loading resource module with default resource info source' ' - load_resource subsystems=containment policy=high + load_resource subsystems=containment policy=high \ +load-allowlist=node,socket,core ' test_expect_success 'match-allocate works with four two-socket jobspecs' ' @@ -149,7 +150,7 @@ policy=high load-allowlist=node,socket,core,gpu && flux ion-resource match allocate ${jobspec_1socket_2gpu} && flux ion-resource match allocate ${jobspec_1socket_2gpu} && flux ion-resource match allocate ${jobspec_1socket_2gpu} && - test_must_fail flux ion-resource match allocate ${jobspec_1socket_2gpu} + test_expect_code 16 flux ion-resource match allocate ${jobspec_1socket_2gpu} ' test_expect_success 'removing resource works' ' diff --git a/t/t6000-graph-size.t b/t/t6000-graph-size.t index 46e6f4348..70bec13f6 100755 --- a/t/t6000-graph-size.t +++ b/t/t6000-graph-size.t @@ -72,8 +72,8 @@ vertices with rank //") && test_expect_success "by_type, by_name, by_path, and by_rank map sizes are \ correct for hwloc" ' echo "quit" > input4.txt && - ${query} -L ${exclusive_001N_hwloc} -e -S CA -P high -f hwloc < \ -input4.txt > out4.txt && + ${query} -L ${exclusive_001N_hwloc} -W core,socket,node -e -S CA -P high \ +-f hwloc < input4.txt > out4.txt && by_type=$(grep "by_type" out4.txt | sed "s/INFO: by_type Key-Value \ Pairs: //") && by_name=$(grep "by_name" out4.txt | sed "s/INFO: by_name Key-Value \ @@ -84,11 +84,11 @@ Pairs: //") && vertices with rank //") && rank=$( echo ${by_rank} | sed "s/:.*//" ) && nvertices=$( echo ${by_rank} | sed "s/[^:]*://" ) && - test ${by_type} -eq 7 && - test ${by_name} -eq 21 && - test ${by_path} -eq 21 && + test ${by_type} -eq 4 && + test ${by_name} -eq 7 && + test ${by_path} -eq 7 && test ${rank} -eq -1 && - test ${nvertices} -eq 21 + test ${nvertices} -eq 7 ' test_expect_success "--reserve-vtx-vec works" '