From 529714d6603fb39923e404a7c1a7d8b573be50c9 Mon Sep 17 00:00:00 2001 From: jpkenny Date: Tue, 12 Nov 2024 16:12:33 -0800 Subject: [PATCH 1/2] Mercury: rearchitect to add node-level delay modeling and pass in relevant parameters --- .../prov/sumi/include/sumi_fabric.hpp | 9 +- .../libfabric/prov/sumi/src/sumi_prov.cpp | 4 +- src/sst/elements/iris/sumi/allgather.cc | 57 ++---- src/sst/elements/iris/sumi/allgather.h | 57 ++---- src/sst/elements/iris/sumi/allgatherv.cc | 57 ++---- src/sst/elements/iris/sumi/allgatherv.h | 57 ++---- src/sst/elements/iris/sumi/allreduce.cc | 57 ++---- src/sst/elements/iris/sumi/allreduce.h | 57 ++---- src/sst/elements/iris/sumi/alltoall.cc | 57 ++---- src/sst/elements/iris/sumi/alltoall.h | 57 ++---- src/sst/elements/iris/sumi/alltoallv.cc | 57 ++---- src/sst/elements/iris/sumi/alltoallv.h | 57 ++---- src/sst/elements/iris/sumi/bcast.cc | 57 ++---- src/sst/elements/iris/sumi/bcast.h | 57 ++---- src/sst/elements/iris/sumi/collective.cc | 57 ++---- src/sst/elements/iris/sumi/collective.h | 57 ++---- .../elements/iris/sumi/collective_actor.cc | 57 ++---- src/sst/elements/iris/sumi/collective_actor.h | 57 ++---- .../elements/iris/sumi/collective_actor_fwd.h | 57 ++---- .../elements/iris/sumi/collective_message.cc | 57 ++---- .../elements/iris/sumi/collective_message.h | 57 ++---- .../iris/sumi/collective_message_fwd.h | 57 ++---- src/sst/elements/iris/sumi/comm_functions.h | 57 ++---- src/sst/elements/iris/sumi/communicator.cc | 57 ++---- src/sst/elements/iris/sumi/communicator.h | 57 ++---- src/sst/elements/iris/sumi/communicator_fwd.h | 57 ++---- src/sst/elements/iris/sumi/dense_rank_map.cc | 57 ++---- src/sst/elements/iris/sumi/dense_rank_map.h | 57 ++---- src/sst/elements/iris/sumi/gather.cc | 57 ++---- src/sst/elements/iris/sumi/gather.h | 57 ++---- src/sst/elements/iris/sumi/sim_transport.cc | 188 +++++------------ src/sst/elements/iris/sumi/sim_transport.h | 15 +- src/sst/elements/iris/sumi/sumi.cc | 24 +-- src/sst/elements/iris/sumi/sumi.h | 4 - src/sst/elements/iris/sumi/sumi_thread.cc | 3 +- src/sst/elements/iris/sumi/sumi_thread.h | 3 + src/sst/elements/iris/sumi/transport.h | 2 +- src/sst/elements/mask-mpi/mpi_api.cc | 7 +- src/sst/elements/mask-mpi/mpi_api.h | 12 +- src/sst/elements/mask-mpi/mpi_api_comm.cc | 2 +- .../tests/platform_file_mask_mpi_test.py | 23 ++- .../tests/refFiles/test_allgather.out | 2 +- .../mask-mpi/tests/refFiles/test_alltoall.out | 2 +- .../mask-mpi/tests/refFiles/test_halo3d26.out | 2 +- .../mask-mpi/tests/refFiles/test_reduce.out | 2 +- .../mask-mpi/tests/refFiles/test_sendrecv.out | 2 +- .../elements/mask-mpi/tests/test_allgather.py | 5 +- .../elements/mask-mpi/tests/test_alltoall.py | 5 +- .../elements/mask-mpi/tests/test_halo3d26.py | 5 +- .../elements/mask-mpi/tests/test_reduce.py | 5 +- .../elements/mask-mpi/tests/test_sendrecv.py | 5 +- src/sst/elements/mercury/Makefile.am | 57 ++++-- src/sst/elements/mercury/common/skeleton.h | 2 +- src/sst/elements/mercury/common/timestamp.cc | 15 +- src/sst/elements/mercury/components/nic.cc | 6 +- src/sst/elements/mercury/components/nic.h | 12 +- src/sst/elements/mercury/components/node.cc | 46 +---- src/sst/elements/mercury/components/node.h | 65 +----- .../elements/mercury/components/node_CL.cc | 62 ++++++ src/sst/elements/mercury/components/node_CL.h | 75 +++++++ .../api_fwd.h => components/node_CL_fwd.h} | 6 +- .../elements/mercury/components/node_base.cc | 63 ++++++ .../elements/mercury/components/node_base.h | 90 +++++++++ .../node_base_fwd.h} | 6 +- .../mercury/components/operating_system.cc | 63 +++--- .../mercury/components/operating_system.h | 129 +++++------- .../mercury/components/operating_system_CL.cc | 66 ++++++ .../mercury/components/operating_system_CL.h | 66 ++++++ .../operating_system_CL_fwd.h} | 8 +- .../operating_system_base.cc} | 13 +- .../components/operating_system_base.h | 130 ++++++++++++ .../mercury/libraries/compute/compute_api.cc | 127 ------------ .../mercury/libraries/compute/compute_api.h | 190 ++---------------- .../libraries/compute/compute_event.cc | 17 -- .../mercury/libraries/compute/compute_event.h | 12 +- .../libraries/compute/compute_library.cc | 120 +++++++++++ .../libraries/compute/compute_library.h | 72 +++++++ .../libraries/compute/compute_scheduler.cc | 87 ++++++++ .../libraries/compute/compute_scheduler.h | 65 ++++++ .../compute/compute_scheduler_api.h} | 15 +- .../compute/instruction_processor.cc | 71 +++++++ .../libraries/compute/instruction_processor.h | 55 +++++ .../mercury/libraries/compute/lib_compute.h | 51 ----- .../libraries/compute/lib_compute_inst.cc | 102 ---------- .../libraries/compute/lib_compute_inst.h | 62 ------ .../libraries/compute/lib_compute_memmove.cc | 73 ------- .../libraries/compute/lib_compute_memmove.h | 59 ------ .../libraries/compute/lib_compute_time.cc | 68 ------- .../libraries/compute/lib_compute_time.h | 54 ----- .../libraries/compute/lib_hybrid_compute.h | 43 ---- .../mercury/libraries/compute/memory_model.cc | 122 +++++++++++ .../mercury/libraries/compute/memory_model.h | 104 ++++++++++ .../libraries/system/replacements/unistd.h | 4 +- .../mercury/libraries/system/system_api.h | 20 +- .../{system_api.cc => system_library.cc} | 12 +- .../mercury/libraries/system/system_library.h | 79 ++++++++ .../mercury/operating_system/libraries/api.cc | 97 --------- .../mercury/operating_system/libraries/api.h | 88 -------- .../libraries/event_library.cc | 56 ++++++ .../libraries/event_library.h | 100 +++++++++ .../event_library_fwd.h} | 3 +- .../operating_system/libraries/library.cc | 73 +++++-- .../operating_system/libraries/library.h | 97 ++++----- .../operating_system/libraries/library_fwd.h | 1 - .../operating_system/libraries/service.h | 8 +- .../mercury/operating_system/process/app.cc | 105 +++++----- .../mercury/operating_system/process/app.h | 21 +- .../process/compute_scheduler.h | 72 ------- .../process/simple_compute_scheduler.cc | 97 --------- .../process/simple_compute_scheduler.h | 51 ----- .../operating_system/process/thread.cc | 10 +- .../mercury/operating_system/process/thread.h | 18 +- src/sst/elements/mercury/pymercury.py | 36 +++- src/sst/elements/mercury/tests/ostest.py | 8 +- 114 files changed, 2440 insertions(+), 3092 deletions(-) create mode 100644 src/sst/elements/mercury/components/node_CL.cc create mode 100644 src/sst/elements/mercury/components/node_CL.h rename src/sst/elements/mercury/{operating_system/libraries/api_fwd.h => components/node_CL_fwd.h} (91%) create mode 100644 src/sst/elements/mercury/components/node_base.cc create mode 100644 src/sst/elements/mercury/components/node_base.h rename src/sst/elements/mercury/{libraries/compute/compute_event_fwd.h => components/node_base_fwd.h} (89%) create mode 100644 src/sst/elements/mercury/components/operating_system_CL.cc create mode 100644 src/sst/elements/mercury/components/operating_system_CL.h rename src/sst/elements/mercury/{libraries/compute/lib_compute.cc => components/operating_system_CL_fwd.h} (85%) rename src/sst/elements/mercury/{libraries/compute/lib_compute_fwd.h => components/operating_system_base.cc} (73%) create mode 100644 src/sst/elements/mercury/components/operating_system_base.h delete mode 100644 src/sst/elements/mercury/libraries/compute/compute_api.cc delete mode 100644 src/sst/elements/mercury/libraries/compute/compute_event.cc create mode 100644 src/sst/elements/mercury/libraries/compute/compute_library.cc create mode 100644 src/sst/elements/mercury/libraries/compute/compute_library.h create mode 100644 src/sst/elements/mercury/libraries/compute/compute_scheduler.cc create mode 100644 src/sst/elements/mercury/libraries/compute/compute_scheduler.h rename src/sst/elements/mercury/{operating_system/process/compute_scheduler.cc => libraries/compute/compute_scheduler_api.h} (66%) create mode 100644 src/sst/elements/mercury/libraries/compute/instruction_processor.cc create mode 100644 src/sst/elements/mercury/libraries/compute/instruction_processor.h delete mode 100644 src/sst/elements/mercury/libraries/compute/lib_compute.h delete mode 100644 src/sst/elements/mercury/libraries/compute/lib_compute_inst.cc delete mode 100644 src/sst/elements/mercury/libraries/compute/lib_compute_inst.h delete mode 100644 src/sst/elements/mercury/libraries/compute/lib_compute_memmove.cc delete mode 100644 src/sst/elements/mercury/libraries/compute/lib_compute_memmove.h delete mode 100644 src/sst/elements/mercury/libraries/compute/lib_compute_time.cc delete mode 100644 src/sst/elements/mercury/libraries/compute/lib_compute_time.h delete mode 100644 src/sst/elements/mercury/libraries/compute/lib_hybrid_compute.h create mode 100644 src/sst/elements/mercury/libraries/compute/memory_model.cc create mode 100644 src/sst/elements/mercury/libraries/compute/memory_model.h rename src/sst/elements/mercury/libraries/system/{system_api.cc => system_library.cc} (91%) create mode 100644 src/sst/elements/mercury/libraries/system/system_library.h delete mode 100644 src/sst/elements/mercury/operating_system/libraries/api.cc delete mode 100644 src/sst/elements/mercury/operating_system/libraries/api.h create mode 100644 src/sst/elements/mercury/operating_system/libraries/event_library.cc create mode 100644 src/sst/elements/mercury/operating_system/libraries/event_library.h rename src/sst/elements/mercury/operating_system/{process/compute_scheduler_fwd.h => libraries/event_library_fwd.h} (93%) delete mode 100644 src/sst/elements/mercury/operating_system/process/compute_scheduler.h delete mode 100644 src/sst/elements/mercury/operating_system/process/simple_compute_scheduler.cc delete mode 100644 src/sst/elements/mercury/operating_system/process/simple_compute_scheduler.h diff --git a/src/sst/elements/iris/libfabric/prov/sumi/include/sumi_fabric.hpp b/src/sst/elements/iris/libfabric/prov/sumi/include/sumi_fabric.hpp index 9da3ec1714..4f83a89324 100644 --- a/src/sst/elements/iris/libfabric/prov/sumi/include/sumi_fabric.hpp +++ b/src/sst/elements/iris/libfabric/prov/sumi/include/sumi_fabric.hpp @@ -105,18 +105,17 @@ class FabricTransport : public SST::Iris::sumi::SimTransport { public: SST_ELI_REGISTER_DERIVED( - API, + Library, FabricTransport, "macro", "libfabric", SST_ELI_ELEMENT_VERSION(1,0,0), - "provides the libfabric transport API") + "implements the libfabric transport API") public: FabricTransport(SST::Params& params, - SST::Hg::App* parent, - SST::Component* comp) : - SST::Iris::sumi::SimTransport(params, parent, comp), + SST::Hg::App* parent) : + SST::Iris::sumi::SimTransport(params, parent), inited_(false) { } diff --git a/src/sst/elements/iris/libfabric/prov/sumi/src/sumi_prov.cpp b/src/sst/elements/iris/libfabric/prov/sumi/src/sumi_prov.cpp index e9c129c624..e5b1d71d3d 100644 --- a/src/sst/elements/iris/libfabric/prov/sumi/src/sumi_prov.cpp +++ b/src/sst/elements/iris/libfabric/prov/sumi/src/sumi_prov.cpp @@ -14,14 +14,14 @@ // distribution. #include -#include +#include #include #include FabricTransport* sumi_fabric() { SST::Hg::Thread* t = SST::Hg::OperatingSystem::currentThread(); - FabricTransport* tp = t->getApi("libfabric"); + FabricTransport* tp = t->getLibrary("libfabric"); if (!tp->inited()) tp->init(); return tp; diff --git a/src/sst/elements/iris/sumi/allgather.cc b/src/sst/elements/iris/sumi/allgather.cc index f9e5fb1534..06a28de234 100644 --- a/src/sst/elements/iris/sumi/allgather.cc +++ b/src/sst/elements/iris/sumi/allgather.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/allgather.h b/src/sst/elements/iris/sumi/allgather.h index ed1b6344fc..44d32985fe 100644 --- a/src/sst/elements/iris/sumi/allgather.h +++ b/src/sst/elements/iris/sumi/allgather.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/allgatherv.cc b/src/sst/elements/iris/sumi/allgatherv.cc index 5ad9effc3f..4c57f0f1d3 100644 --- a/src/sst/elements/iris/sumi/allgatherv.cc +++ b/src/sst/elements/iris/sumi/allgatherv.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/allgatherv.h b/src/sst/elements/iris/sumi/allgatherv.h index c3dbb017e5..de048b6f02 100644 --- a/src/sst/elements/iris/sumi/allgatherv.h +++ b/src/sst/elements/iris/sumi/allgatherv.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/allreduce.cc b/src/sst/elements/iris/sumi/allreduce.cc index 42be6ec92e..a0b5c91ea6 100644 --- a/src/sst/elements/iris/sumi/allreduce.cc +++ b/src/sst/elements/iris/sumi/allreduce.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/allreduce.h b/src/sst/elements/iris/sumi/allreduce.h index 347de3447f..b87f89c360 100644 --- a/src/sst/elements/iris/sumi/allreduce.h +++ b/src/sst/elements/iris/sumi/allreduce.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/alltoall.cc b/src/sst/elements/iris/sumi/alltoall.cc index 45ccd6a22c..c078628063 100644 --- a/src/sst/elements/iris/sumi/alltoall.cc +++ b/src/sst/elements/iris/sumi/alltoall.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/alltoall.h b/src/sst/elements/iris/sumi/alltoall.h index 15bc747a08..83fd505f2c 100644 --- a/src/sst/elements/iris/sumi/alltoall.h +++ b/src/sst/elements/iris/sumi/alltoall.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/alltoallv.cc b/src/sst/elements/iris/sumi/alltoallv.cc index a9e85e4c4e..8f0255fa92 100644 --- a/src/sst/elements/iris/sumi/alltoallv.cc +++ b/src/sst/elements/iris/sumi/alltoallv.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/alltoallv.h b/src/sst/elements/iris/sumi/alltoallv.h index cca7b6852a..12afadd2aa 100644 --- a/src/sst/elements/iris/sumi/alltoallv.h +++ b/src/sst/elements/iris/sumi/alltoallv.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/bcast.cc b/src/sst/elements/iris/sumi/bcast.cc index 51f3e0b2a8..99fa22efb3 100644 --- a/src/sst/elements/iris/sumi/bcast.cc +++ b/src/sst/elements/iris/sumi/bcast.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/bcast.h b/src/sst/elements/iris/sumi/bcast.h index f9cab2a3dc..af38b1a78b 100644 --- a/src/sst/elements/iris/sumi/bcast.h +++ b/src/sst/elements/iris/sumi/bcast.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/collective.cc b/src/sst/elements/iris/sumi/collective.cc index 8f984c47f0..cd1bf2ad69 100644 --- a/src/sst/elements/iris/sumi/collective.cc +++ b/src/sst/elements/iris/sumi/collective.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/collective.h b/src/sst/elements/iris/sumi/collective.h index 891e017fab..3281fa9ce8 100644 --- a/src/sst/elements/iris/sumi/collective.h +++ b/src/sst/elements/iris/sumi/collective.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/collective_actor.cc b/src/sst/elements/iris/sumi/collective_actor.cc index 83a832ae31..21895090c7 100644 --- a/src/sst/elements/iris/sumi/collective_actor.cc +++ b/src/sst/elements/iris/sumi/collective_actor.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/collective_actor.h b/src/sst/elements/iris/sumi/collective_actor.h index 1b1eeff2eb..93879c4005 100644 --- a/src/sst/elements/iris/sumi/collective_actor.h +++ b/src/sst/elements/iris/sumi/collective_actor.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/collective_actor_fwd.h b/src/sst/elements/iris/sumi/collective_actor_fwd.h index 9df07db63d..634bc5adf8 100644 --- a/src/sst/elements/iris/sumi/collective_actor_fwd.h +++ b/src/sst/elements/iris/sumi/collective_actor_fwd.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/collective_message.cc b/src/sst/elements/iris/sumi/collective_message.cc index 7df94669a8..a773f9491f 100644 --- a/src/sst/elements/iris/sumi/collective_message.cc +++ b/src/sst/elements/iris/sumi/collective_message.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/collective_message.h b/src/sst/elements/iris/sumi/collective_message.h index a22ed0297c..fefcbef847 100644 --- a/src/sst/elements/iris/sumi/collective_message.h +++ b/src/sst/elements/iris/sumi/collective_message.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/collective_message_fwd.h b/src/sst/elements/iris/sumi/collective_message_fwd.h index 9e6826438c..072895de61 100644 --- a/src/sst/elements/iris/sumi/collective_message_fwd.h +++ b/src/sst/elements/iris/sumi/collective_message_fwd.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/comm_functions.h b/src/sst/elements/iris/sumi/comm_functions.h index 208839215a..7053397009 100644 --- a/src/sst/elements/iris/sumi/comm_functions.h +++ b/src/sst/elements/iris/sumi/comm_functions.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/communicator.cc b/src/sst/elements/iris/sumi/communicator.cc index f89a8adfcb..08828d4e47 100644 --- a/src/sst/elements/iris/sumi/communicator.cc +++ b/src/sst/elements/iris/sumi/communicator.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/communicator.h b/src/sst/elements/iris/sumi/communicator.h index 1f8db62d01..ce1a9bb415 100644 --- a/src/sst/elements/iris/sumi/communicator.h +++ b/src/sst/elements/iris/sumi/communicator.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/communicator_fwd.h b/src/sst/elements/iris/sumi/communicator_fwd.h index 212cc2e64d..8f3d4bf3e0 100644 --- a/src/sst/elements/iris/sumi/communicator_fwd.h +++ b/src/sst/elements/iris/sumi/communicator_fwd.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/dense_rank_map.cc b/src/sst/elements/iris/sumi/dense_rank_map.cc index df1f66bf13..f747389cf6 100644 --- a/src/sst/elements/iris/sumi/dense_rank_map.cc +++ b/src/sst/elements/iris/sumi/dense_rank_map.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/dense_rank_map.h b/src/sst/elements/iris/sumi/dense_rank_map.h index 46dd66e411..3bf5005c7f 100644 --- a/src/sst/elements/iris/sumi/dense_rank_map.h +++ b/src/sst/elements/iris/sumi/dense_rank_map.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/gather.cc b/src/sst/elements/iris/sumi/gather.cc index 440324d558..7eb5837612 100644 --- a/src/sst/elements/iris/sumi/gather.cc +++ b/src/sst/elements/iris/sumi/gather.cc @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #include #include diff --git a/src/sst/elements/iris/sumi/gather.h b/src/sst/elements/iris/sumi/gather.h index edf1761ebd..49993b5b4c 100644 --- a/src/sst/elements/iris/sumi/gather.h +++ b/src/sst/elements/iris/sumi/gather.h @@ -1,46 +1,17 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. #pragma once diff --git a/src/sst/elements/iris/sumi/sim_transport.cc b/src/sst/elements/iris/sumi/sim_transport.cc index d7531407ac..3af60045a7 100644 --- a/src/sst/elements/iris/sumi/sim_transport.cc +++ b/src/sst/elements/iris/sumi/sim_transport.cc @@ -1,49 +1,20 @@ -/** -Copyright 2009-2024 National Technology and Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government -retains certain rights in this software. - -Sandia National Laboratories is a multimission laboratory managed and operated -by National Technology and Engineering Solutions of Sandia, LLC., a wholly -owned subsidiary of Honeywell International, Inc., for the U.S. Department of -Energy's National Nuclear Security Administration under contract DE-NA0003525. - -Copyright (c) 2009-2024, NTESS - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Questions? Contact sst-macro-help@sandia.gov -*/ - -#include -#include +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#include +#include #include #include #include @@ -59,41 +30,21 @@ Questions? Contact sst-macro-help@sandia.gov #include #include #include +#include +#include #include -#include -//#include #include #include -//#include #include -#include #include - -//RegisterKeywords( -//{ "lazy_watch", "whether failure notifications can be receive without active pinging" }, -//{ "eager_cutoff", "what message size in bytes to switch from eager to rendezvous" }, -//{ "use_put_protocol", "whether to use a put or get protocol for pt2pt sends" }, -//{ "algorithm", "the specific algorithm to use for a given collecitve" }, -//{ "comm_sync_stats", "whether to track synchronization stats for communication" }, -//{ "smp_single_copy_size", "the minimum size of message for single-copy protocol" }, -//{ "max_eager_msg_size", "the maximum size for using eager pt2pt protocol" }, -//{ "max_vshort_msg_size", "the maximum size for mailbox protocol" }, -//{ "post_rdma_delay", "the time it takes to post an RDMA operation" }, -//{ "post_header_delay", "the time it takes to send an eager message" }, -//{ "poll_delay", "the time it takes to poll for an incoming message" }, -//{ "rdma_pin_latency", "the latency for each RDMA pin information" }, -//{ "rdma_page_delay", "the per-page delay for RDMA pinning" }, -//); - -#include -#include -#include -#include +#include #include -#include #include -//#include -//#include +#include +#include +#include + +#include using SST::Hg::TimeDelta; @@ -181,7 +132,7 @@ class SumiServer : Transport* Transport::get() { - return SST::Hg::OperatingSystem::currentThread()->getApi("sumi"); + return SST::Hg::OperatingSystem::currentThread()->getLibrary("sumi"); } Transport::~Transport() @@ -215,13 +166,12 @@ Transport::logMessageDelay(Message * /*msg*/, uint64_t /*bytes*/, int /*stage*/, // last_collection_ = now(); //} -SimTransport::SimTransport(SST::Params& params, SST::Hg::App* parent, SST::Component* comp) : +SimTransport::SimTransport(SST::Params& params, SST::Hg::App* parent) : //the name of the transport itself should be mapped to a unique name Transport("sumi", parent->sid(), parent->os()->addr()), - API(params, parent, comp), + Library(params, parent), //the server is what takes on the specified libname completion_queues_(1), -// spy_bytes_(nullptr), default_progress_queue_(parent->os()), nic_ioctl_(parent->os()->nicDataIoctl()), qos_analysis_(nullptr), @@ -229,12 +179,15 @@ SimTransport::SimTransport(SST::Params& params, SST::Hg::App* parent, SST::Compo pragma_timeout_(-1), os_(parent->os()) { + unsigned int verbose = params.find("verbose", 0); + out_ = std::unique_ptr( + new SST::Output("sumi::SimTransport:", verbose, 0, Output::STDOUT)); + completion_queues_[0] = std::bind(&DefaultProgressQueue::incoming, &default_progress_queue_, 0, std::placeholders::_1); null_completion_notify_ = std::bind(&SimTransport::drop, this, std::placeholders::_1); - //rank_ = sid().task_; rank_ = os_->addr(); - auto* server_lib = parent->os()->lib(server_libname_); + auto* server_lib = parent->os()->eventLibrary(server_libname_); SumiServer* server; // only do one server per app per node if (server_lib == nullptr) { @@ -252,7 +205,7 @@ SimTransport::SimTransport(SST::Params& params, SST::Hg::App* parent, SST::Compo rdma_page_delay_ = TimeDelta(params.find("rdma_page_delay", "0s").getValue().toDouble()); pin_delay_ = rdma_pin_latency_.ticks() || rdma_page_delay_.ticks(); page_size_ = params.find("rdma_page_size", "4096").getRoundedValue(); - + output.output("%d", sid().app_); nproc_ = os_->nranks(); @@ -260,11 +213,15 @@ SimTransport::SimTransport(SST::Params& params, SST::Hg::App* parent, SST::Compo auto qos_name = qos_params.find("name", "null"); qos_analysis_ = SST::Hg::create("macro", qos_name, qos_params); + out_->debug(CALL_INFO, 1, 0, + "registering proc %d\n", rank_); server->registerProc(rank_, this); if (!engine_) engine_ = new CollectiveEngine(params, this); smp_optimize_ = params.find("smp_optimize", false); + + compute_api_ = dynamic_cast(api_parent_app_->getLibrary("ComputeLibrary")); } void @@ -288,7 +245,7 @@ SimTransport::init() engine_->barrier(-1, Message::default_cq); engine_->blockUntilNext(Message::default_cq); - SumiServer* server = safe_cast(SumiServer, api_parent_app_->os()->lib(server_libname_)); + SumiServer* server = safe_cast(SumiServer, api_parent_app_->os()->eventLibrary(server_libname_)); auto& map = server->getProcs(sid().app_); if (map.size() > 1){ //enable smp optimizations for (auto& pair : map){ @@ -307,14 +264,11 @@ SimTransport::finish() SimTransport::~SimTransport() { - SumiServer* server = safe_cast(SumiServer, api_parent_app_->os()->lib(server_libname_)); + SumiServer* server = safe_cast(SumiServer, api_parent_app_->os()->eventLibrary(server_libname_)); bool del = server->unregisterProc(rank_, this); if (del) delete server; if (engine_) delete engine_; - - //if (spy_bytes_) delete spy_bytes_; - //if (spy_num_messages_) delete spy_num_messages_; } void @@ -332,15 +286,13 @@ SimTransport::memcopy(void* dst, void* src, uint64_t bytes) if (isNonNullBuffer(dst) && isNonNullBuffer(src)){ ::memcpy(dst, src, bytes); } - //FIXME - //api_parent_app_->computeBlockMemcpy(bytes); + compute_api_->computeBlockMemcpy(bytes); } void SimTransport::memcopyDelay(uint64_t bytes) { - //FIXME - //api_parent_app_->computeBlockMemcpy(bytes); + compute_api_->computeBlockMemcpy(bytes); } void @@ -356,39 +308,20 @@ SimTransport::nidlist() const //the types are the same size and the bits can be //interpreted correctly //return (int*) rank_mapper_->rankToNode().data(); + sst_hg_abort_printf("sumi_transport::nidList unimplemented"); return nullptr; } void SimTransport::compute(SST::Hg::TimeDelta t) { - //FIXME - //api_parent_app_->compute(t); + compute_api_->compute(t); } void SimTransport::send(Message* m) { -// int qos = qos_analysis_->selectQoS(m); -// m->setQoS(qos); -// if (!m->started()){ -// m->setTimeStarted(api_parent_app_->now()); -// } - -// if (spy_bytes_){ -// switch(m->sstmac::hw::NetworkMessage::type()){ -// case sstmac::hw::NetworkMessage::smsg_send: -// case sstmac::hw::NetworkMessage::posted_send: -// case sstmac::hw::NetworkMessage::rdma_get_request: -// case sstmac::hw::NetworkMessage::rdma_put_payload: -// spy_bytes_->addData(m->recver(), m->payloadBytes()); -// break; -// default: -// break; -// } -// } - switch(m->SST::Hg::NetworkMessage::type()){ case SST::Hg::NetworkMessage::smsg_send: if (m->recver() == rank_){ @@ -403,26 +336,23 @@ SimTransport::send(Message* m) } } else { if (post_header_delay_.ticks()) { - //api_parent_app_->compute(post_header_delay_); + compute_api_->compute(post_header_delay_); } - //nic_ioctl_(m); - send_packets(m); + nic_ioctl_(m); } break; case SST::Hg::NetworkMessage::posted_send: if (post_header_delay_.ticks()) { - //api_parent_app_->compute(post_header_delay_); + compute_api_->compute(post_header_delay_); } - //nic_ioctl_(m); - send_packets(m); + nic_ioctl_(m); break; case SST::Hg::NetworkMessage::rdma_get_request: case SST::Hg::NetworkMessage::rdma_put_payload: if (post_rdma_delay_.ticks()) { - //api_parent_app_->compute(post_rdma_delay_); + compute_api_->compute(post_rdma_delay_); } - //nic_ioctl_(m); - send_packets(m); + nic_ioctl_(m); break; default: sst_hg_abort_printf("attempting to initiate send with invalid type %d", @@ -430,12 +360,6 @@ SimTransport::send(Message* m) } } -void -SimTransport::send_packets(Message* m) -{ - nic_ioctl_(m); -} - void SimTransport::smsgSendResponse(Message* m, uint64_t size, void* buffer, int local_cq, int remote_cq, int qos) { @@ -490,17 +414,11 @@ SimTransport::allocateFlowId() { auto id = api_parent_app_->os()->allocateUniqueId().msg_num; return id; - //return api_parent_app_->os()->allocateUniqueId(); } void SimTransport::incomingMessage(Message *msg) { -//#if SSTMAC_COMM_DELAY_STATS -// if (msg){ -// msg->setTimeArrived(api_parent_app_->now()); -// } -//#endif msg->writeSyncValue(); int cq = msg->isNicAck() ? msg->sendCQ() : msg->recvCQ(); if (cq != Message::no_ack){ @@ -1173,11 +1091,11 @@ class PatternQoSAnalysis : public QoSAnalysis SST::Hg::TimeDelta allowedDelay_; }; -extern "C" void sst_hg_blocking_call(int condition, double timeout, const char* api_name) +extern "C" void sst_hg_blocking_call(int condition, double timeout, const char* lib_name) { SST::Hg::Thread* t = SST::Hg::OperatingSystem::currentThread(); - auto* api = t->getApi(api_name); - api->setPragmaBlocking(condition, timeout); + auto* lib = t->getLibrary(lib_name); + lib->setPragmaBlocking(condition, timeout); } diff --git a/src/sst/elements/iris/sumi/sim_transport.h b/src/sst/elements/iris/sumi/sim_transport.h index 68d23f1275..72234e6918 100644 --- a/src/sst/elements/iris/sumi/sim_transport.h +++ b/src/sst/elements/iris/sumi/sim_transport.h @@ -52,7 +52,7 @@ Questions? Contact sst-macro-help@sandia.gov #include -#include +#include #include #include #include @@ -61,6 +61,7 @@ Questions? Contact sst-macro-help@sandia.gov #include #include #include +#include #include #include @@ -95,20 +96,20 @@ class QoSAnalysis { }; -class SimTransport : public Transport, public SST::Hg::API { +class SimTransport : public Transport, public SST::Hg::Library { public: SST_ELI_REGISTER_DERIVED( - API, + Library, SimTransport, "hg", "SimTransport", SST_ELI_ELEMENT_VERSION(1,0,0), - "provides the SUMI transport API") + "implements the SUMI transport API") using DefaultProgressQueue = SST::Hg::MultiProgressQueue; - SimTransport(SST::Params& params, SST::Hg::App* parent, SST::Component* comp); + SimTransport(SST::Params& params, SST::Hg::App* parent); SST::Hg::SoftwareId sid() const { return Transport::sid(); @@ -324,6 +325,10 @@ class SimTransport : public Transport, public SST::Hg::API { SST::Hg::OperatingSystem* os_; void drop(Message*){} + + std::unique_ptr out_; + + SST::Hg::ComputeAPI* compute_api_; }; diff --git a/src/sst/elements/iris/sumi/sumi.cc b/src/sst/elements/iris/sumi/sumi.cc index 91710eff71..6044059801 100644 --- a/src/sst/elements/iris/sumi/sumi.cc +++ b/src/sst/elements/iris/sumi/sumi.cc @@ -62,7 +62,7 @@ namespace SST::Iris::sumi { static SimTransport* current_transport() { Thread* t = Thread::current(); - return t->getApi("sumi"); + return t->getLibrary("sumi"); } static CollectiveEngine* current_engine() @@ -178,26 +178,4 @@ double wall_time() return OperatingSystem::currentOs()->now().sec(); } -void sleepUntil(double sec) -{ - Thread* thr = Thread::current(); - App* my_app = thr->parentApp(); - double time = sec - my_app->now().sec(); - my_app->sleep(TimeDelta(time)); -} - -void sleep(double sec) -{ - Thread* thr = Thread::current(); - App* my_app = thr->parentApp(); - my_app->sleep(TimeDelta(sec)); -} - -void compute(double sec) -{ - Thread* thr = Thread::current(); - App* my_app = thr->parentApp(); - my_app->compute(TimeDelta(sec)); -} - } diff --git a/src/sst/elements/iris/sumi/sumi.h b/src/sst/elements/iris/sumi/sumi.h index 32c95ee0e9..d6d24a6cc6 100644 --- a/src/sst/elements/iris/sumi/sumi.h +++ b/src/sst/elements/iris/sumi/sumi.h @@ -154,12 +154,8 @@ CollectiveDoneMessage* comm_barrier(int tag, int cq_id, Communicator* comm = nul Message* comm_poll(); -void compute(double sec); - void sleep_hires(double sec); -void sleepUntil(double sec); - /** * Every node has exactly the same notion of time - universal, global clock. * Thus, if rank 0 starts and 10 minuts later rank 1 starts, diff --git a/src/sst/elements/iris/sumi/sumi_thread.cc b/src/sst/elements/iris/sumi/sumi_thread.cc index a2d1862757..fdfc7666e2 100644 --- a/src/sst/elements/iris/sumi/sumi_thread.cc +++ b/src/sst/elements/iris/sumi/sumi_thread.cc @@ -53,6 +53,7 @@ SumiThread::SumiThread(SST::Params& params, SST::Hg::SoftwareId sid, SST::Hg::OperatingSystem* os) : Thread(params, sid, os) { + compute_api_ = dynamic_cast(parent_app_->getLibrary("ComputeLibrary")); } void @@ -64,7 +65,7 @@ SumiThread::start() void SumiThread::compute(double sec) { - parent_app_->compute(SST::Hg::TimeDelta(sec)); + compute_api_->compute(SST::Hg::TimeDelta(sec)); } } diff --git a/src/sst/elements/iris/sumi/sumi_thread.h b/src/sst/elements/iris/sumi/sumi_thread.h index 6b865b1afd..31b718084c 100644 --- a/src/sst/elements/iris/sumi/sumi_thread.h +++ b/src/sst/elements/iris/sumi/sumi_thread.h @@ -45,6 +45,7 @@ Questions? Contact sst-macro-help@sandia.gov #pragma once #include +#include namespace SST::Iris::sumi { @@ -56,6 +57,8 @@ class SumiThread : virtual void run() = 0; + SST::Hg::ComputeAPI* compute_api_; + public: SumiThread(SST::Params& params, SST::Hg::SoftwareId sid, SST::Hg::OperatingSystem* os); diff --git a/src/sst/elements/iris/sumi/transport.h b/src/sst/elements/iris/sumi/transport.h index b779e4030e..7213928a44 100644 --- a/src/sst/elements/iris/sumi/transport.h +++ b/src/sst/elements/iris/sumi/transport.h @@ -45,7 +45,7 @@ Questions? Contact sst-macro-help@sandia.gov #pragma once #include -#include +#include #include #include #include diff --git a/src/sst/elements/mask-mpi/mpi_api.cc b/src/sst/elements/mask-mpi/mpi_api.cc index 3fd4acbb9c..b5371280f0 100644 --- a/src/sst/elements/mask-mpi/mpi_api.cc +++ b/src/sst/elements/mask-mpi/mpi_api.cc @@ -110,15 +110,14 @@ namespace SST::MASKMPI { MpiApi* mask_mpi() { SST::Hg::Thread* t = SST::Hg::OperatingSystem::currentThread(); - return t->getApi("MpiApi"); + return t->getLibrary("MpiApi"); } // // Build a new mpiapi. // -MpiApi::MpiApi(SST::Params& params, SST::Hg::App* app, - SST::Component* comp) : - SST::Iris::sumi::SimTransport(params, app, comp), +MpiApi::MpiApi(SST::Params& params, SST::Hg::App* app) : + SST::Iris::sumi::SimTransport(params, app), queue_(nullptr), next_type_id_(0), next_op_id_(first_custom_op_id), diff --git a/src/sst/elements/mask-mpi/mpi_api.h b/src/sst/elements/mask-mpi/mpi_api.h index 082f14e274..02c9f29e87 100644 --- a/src/sst/elements/mask-mpi/mpi_api.h +++ b/src/sst/elements/mask-mpi/mpi_api.h @@ -45,8 +45,8 @@ Questions? Contact sst-macro-help@sandia.gov #include #include #include +#include #include -#include #include #include #include @@ -82,14 +82,14 @@ class MpiApi : public SST::Iris::sumi::SimTransport // friend class OTF2Writer; public: SST_ELI_REGISTER_DERIVED( - SST::Hg::API, + SST::Hg::Library, MpiApi, "hg", "MpiApi", SST_ELI_ELEMENT_VERSION(1,0,0), - "provides the MPI transport API") + "implements the MPI transport API") - MpiApi(SST::Params& params, SST::Hg::App* app, SST::Component* comp); + MpiApi(SST::Params& params, SST::Hg::App* app); static void deleteStatics(); @@ -897,7 +897,7 @@ MpiApi* mask_mpi(); #define _StartMPICall_(fxn) \ CallGraphAppend(fxn); \ sstmac::sw::FTQScope scope(activeThread(), mpi_tag); \ - startAPICall() + startLibraryCall() #define StartMPICall(fxn) \ @@ -906,7 +906,7 @@ MpiApi* mask_mpi(); #define FinishMPICall(fxn) \ mpi_api_debug(sprockit::dbg::mpi, #fxn " finished"); \ finishCurrentMpiCall(); \ - endAPICall() + endLibraryCall() #define mpi_api_debug(flags, ...) \ mpi_debug(commWorld()->rank(), flags, __VA_ARGS__) diff --git a/src/sst/elements/mask-mpi/mpi_api_comm.cc b/src/sst/elements/mask-mpi/mpi_api_comm.cc index 4db5756bbe..1f384927be 100644 --- a/src/sst/elements/mask-mpi/mpi_api_comm.cc +++ b/src/sst/elements/mask-mpi/mpi_api_comm.cc @@ -112,7 +112,7 @@ MpiApi::commSize(MPI_Comm comm, int *size) { StartCommCall(MPI_Comm_size,comm); *size = getComm(comm)->size(); - endAPICall(); + endLibraryCall(); return MPI_SUCCESS; } diff --git a/src/sst/elements/mask-mpi/tests/platform_file_mask_mpi_test.py b/src/sst/elements/mask-mpi/tests/platform_file_mask_mpi_test.py index 5c40c597d7..832930924a 100644 --- a/src/sst/elements/mask-mpi/tests/platform_file_mask_mpi_test.py +++ b/src/sst/elements/mask-mpi/tests/platform_file_mask_mpi_test.py @@ -5,7 +5,14 @@ PlatformDefinition.registerPlatformDefinition(platdef) platdef.addParamSet("node",{ - "verbose" : "0", + "verbose" : "0", + "name" : "hg.NodeCL", + "negligible_compute_bytes" : "64B", + "parallelism" : "1.0", + "frequency" : "2.1GHz", + "flow_mtu" : "512", + "channel_bandwidth" : "11.2 GB/s", + "num_channels" : "4", }) platdef.addParamSet("nic",{ @@ -14,6 +21,7 @@ platdef.addParamSet("operating_system",{ "verbose" : "0", + "name" : "hg.OperatingSystemCL" }) platdef.addParamSet("topology",{ @@ -41,4 +49,17 @@ "xbar_arb" : "merlin.xbar_arb_lru", }) +platdef.addParamSet("operating_system", { + "ncores" : "24", + "nsockets" : "4", + "app1.post_rdma_delay" : "88us", + "app1.post_header_delay" : "0.36us", + "app1.poll_delay" : "0us", + "app1.rdma_pin_latency" : "5.43us", + "app1.rdma_page_delay" : "50.50ns", + "app1.rdma_page_size" : "4096", + "app1.compute_library_access_width" : "64", + "app1.compute_library_loop_overhead" : "1.0", +}) + platdef.addClassType("router","sst.merlin.base.hr_router") diff --git a/src/sst/elements/mask-mpi/tests/refFiles/test_allgather.out b/src/sst/elements/mask-mpi/tests/refFiles/test_allgather.out index 3da88b74ea..9f48ad5a07 100644 --- a/src/sst/elements/mask-mpi/tests/refFiles/test_allgather.out +++ b/src/sst/elements/mask-mpi/tests/refFiles/test_allgather.out @@ -6,4 +6,4 @@ recv_values[4]=4 recv_values[5]=5 recv_values[6]=6 recv_values[7]=7 -Simulation is complete, simulated time: 970.267 ns +Simulation is complete, simulated time: 5.31875 us diff --git a/src/sst/elements/mask-mpi/tests/refFiles/test_alltoall.out b/src/sst/elements/mask-mpi/tests/refFiles/test_alltoall.out index 1865dba3ce..b8b9c93434 100644 --- a/src/sst/elements/mask-mpi/tests/refFiles/test_alltoall.out +++ b/src/sst/elements/mask-mpi/tests/refFiles/test_alltoall.out @@ -1022,4 +1022,4 @@ recv_values[1020]=7 recv_values[1021]=7 recv_values[1022]=7 recv_values[1023]=7 -Simulation is complete, simulated time: 1.72675 us +Simulation is complete, simulated time: 270.615 us diff --git a/src/sst/elements/mask-mpi/tests/refFiles/test_halo3d26.out b/src/sst/elements/mask-mpi/tests/refFiles/test_halo3d26.out index b976c6657d..c769d568a7 100644 --- a/src/sst/elements/mask-mpi/tests/refFiles/test_halo3d26.out +++ b/src/sst/elements/mask-mpi/tests/refFiles/test_halo3d26.out @@ -1,2 +1,2 @@ halo3d-26 executed successfully -Simulation is complete, simulated time: 62.2391 us +Simulation is complete, simulated time: 53.62 ms diff --git a/src/sst/elements/mask-mpi/tests/refFiles/test_reduce.out b/src/sst/elements/mask-mpi/tests/refFiles/test_reduce.out index 6f23071693..88bd030396 100644 --- a/src/sst/elements/mask-mpi/tests/refFiles/test_reduce.out +++ b/src/sst/elements/mask-mpi/tests/refFiles/test_reduce.out @@ -6,4 +6,4 @@ recv_values[4]=4 recv_values[5]=5 recv_values[6]=6 recv_values[7]=7 -Simulation is complete, simulated time: 1.21395 us +Simulation is complete, simulated time: 6.63875 us diff --git a/src/sst/elements/mask-mpi/tests/refFiles/test_sendrecv.out b/src/sst/elements/mask-mpi/tests/refFiles/test_sendrecv.out index 5eb8fc977f..d037cc1878 100644 --- a/src/sst/elements/mask-mpi/tests/refFiles/test_sendrecv.out +++ b/src/sst/elements/mask-mpi/tests/refFiles/test_sendrecv.out @@ -6,4 +6,4 @@ A[4] = 4 A[5] = 5 A[6] = 6 A[7] = 7 -Simulation is complete, simulated time: 405.947 ns +Simulation is complete, simulated time: 2.21875 us diff --git a/src/sst/elements/mask-mpi/tests/test_allgather.py b/src/sst/elements/mask-mpi/tests/test_allgather.py index b01c7bca99..da94a1cc6a 100644 --- a/src/sst/elements/mask-mpi/tests/test_allgather.py +++ b/src/sst/elements/mask-mpi/tests/test_allgather.py @@ -28,7 +28,10 @@ "verbose" : "0", "app1.name" : "allgather", "app1.exe" : "allgather.so", - "app1.apis" : ["systemAPI:libsystemapi.so", "SimTransport:libsumi.so", "MpiApi:libmask_mpi.so"], + "app1.libraries" : ["SystemLibrary:libsystemlibrary.so", + "ComputeLibrary:libcomputelibrary.so", + "SimTransport:libsumi.so", + "MpiApi:libmask_mpi.so"], }) topo = topoSingle() diff --git a/src/sst/elements/mask-mpi/tests/test_alltoall.py b/src/sst/elements/mask-mpi/tests/test_alltoall.py index 6574828e90..84d4f76b78 100644 --- a/src/sst/elements/mask-mpi/tests/test_alltoall.py +++ b/src/sst/elements/mask-mpi/tests/test_alltoall.py @@ -28,7 +28,10 @@ "verbose" : "0", "app1.name" : "alltoall", "app1.exe" : "alltoall.so", - "app1.apis" : ["systemAPI:libsystemapi.so", "SimTransport:libsumi.so", "MpiApi:libmask_mpi.so"], + "app1.libraries" : ["SystemLibrary:libsystemlibrary.so", + "ComputeLibrary:libcomputelibrary.so", + "SimTransport:libsumi.so", + "MpiApi:libmask_mpi.so"], }) topo = topoSingle() diff --git a/src/sst/elements/mask-mpi/tests/test_halo3d26.py b/src/sst/elements/mask-mpi/tests/test_halo3d26.py index b76810173a..6b81173046 100644 --- a/src/sst/elements/mask-mpi/tests/test_halo3d26.py +++ b/src/sst/elements/mask-mpi/tests/test_halo3d26.py @@ -28,7 +28,10 @@ "verbose" : "0", "app1.name" : "halo3d26", "app1.exe" : "halo3d26.so", - "app1.apis" : ["systemAPI:libsystemapi.so", "SimTransport:libsumi.so", "MpiApi:libmask_mpi.so"], + "app1.libraries" : ["SystemLibrary:libsystemlibrary.so", + "ComputeLibrary:libcomputelibrary.so", + "SimTransport:libsumi.so", + "MpiApi:libmask_mpi.so"], }) topo = topoSingle() diff --git a/src/sst/elements/mask-mpi/tests/test_reduce.py b/src/sst/elements/mask-mpi/tests/test_reduce.py index b799bb29aa..6645bb6a0b 100644 --- a/src/sst/elements/mask-mpi/tests/test_reduce.py +++ b/src/sst/elements/mask-mpi/tests/test_reduce.py @@ -28,7 +28,10 @@ "verbose" : "0", "app1.name" : "reduce", "app1.exe" : "reduce.so", - "app1.apis" : ["systemAPI:libsystemapi.so", "SimTransport:libsumi.so", "MpiApi:libmask_mpi.so"], + "app1.libraries" : ["SystemLibrary:libsystemlibrary.so", + "ComputeLibrary:libcomputelibrary.so", + "SimTransport:libsumi.so", + "MpiApi:libmask_mpi.so"], }) topo = topoSingle() diff --git a/src/sst/elements/mask-mpi/tests/test_sendrecv.py b/src/sst/elements/mask-mpi/tests/test_sendrecv.py index c39d5251d9..b24713c25b 100644 --- a/src/sst/elements/mask-mpi/tests/test_sendrecv.py +++ b/src/sst/elements/mask-mpi/tests/test_sendrecv.py @@ -27,7 +27,10 @@ platform.addParamSet("operating_system", { "app1.name" : "sendrecv", "app1.exe" : "sendrecv.so", - "app1.apis" : ["systemAPI:libsystemapi.so", "SimTransport:libsumi.so", "MpiApi:libmask_mpi.so"], + "app1.libraries" : ["SystemLibrary:libsystemlibrary.so", + "ComputeLibrary:libcomputelibrary.so", + "SimTransport:libsumi.so", + "MpiApi:libmask_mpi.so"], }) topo = topoSingle() diff --git a/src/sst/elements/mercury/Makefile.am b/src/sst/elements/mercury/Makefile.am index 87878ba835..d6db4d1049 100644 --- a/src/sst/elements/mercury/Makefile.am +++ b/src/sst/elements/mercury/Makefile.am @@ -9,7 +9,7 @@ AM_CPPFLAGS += \ # unpleasant hack to make vintage automake (e.g. 1.13.4) work AM_LIBTOOLFLAGS = --tag=CXX -comp_LTLIBRARIES = libhg.la libsystemapi.la ostest.la +comp_LTLIBRARIES = libhg.la libsystemlibrary.la libcomputelibrary.la ostest.la compdir = $(pkglibdir) libhg_la_SOURCES = \ @@ -23,17 +23,23 @@ libhg_la_SOURCES = \ common/connection.cc \ components/nic.cc \ components/node.cc \ + components/node_base.cc \ + components/node_CL.cc \ components/operating_system.cc \ + components/operating_system_base.cc \ + components/operating_system_CL.cc \ hardware/common/packet.cc \ hardware/common/recv_cq.cc \ hardware/network/network_message.cc \ + libraries/compute/compute_scheduler.cc \ + libraries/compute/instruction_processor.cc \ + libraries/compute/memory_model.cc \ operating_system/launch/app_launch_request.cc \ operating_system/launch/app_launcher.cc \ - operating_system/libraries/api.cc \ operating_system/libraries/library.cc \ + operating_system/libraries/event_library.cc \ operating_system/libraries/unblock_event.cc \ operating_system/process/app.cc \ - operating_system/process/simple_compute_scheduler.cc \ operating_system/process/loadlib.cc \ operating_system/process/progress_queue.cc \ operating_system/process/thread.cc \ @@ -76,8 +82,14 @@ if SST_HG_A64 endif endif -libsystemapi_la_SOURCES = \ - libraries/system/system_api.cc +libsystemlibrary_la_SOURCES = \ + libraries/system/system_library.cc + +libcomputelibrary_la_SOURCES = \ + libraries/compute/compute_library.cc +# libraries/compute/compute_scheduler.cc \ +# libraries/compute/instruction_processor.cc \ +# libraries/compute/memory_model.cc ostest_la_SOURCES = \ tests/ostest.cc @@ -116,8 +128,16 @@ nobase_library_include_HEADERS = \ components/nic_fwd.h \ components/node.h \ components/node_fwd.h \ + components/node_base.h \ + components/node_base_fwd.h \ + components/node_CL.h \ + components/node_CL_fwd.h \ + components/operating_system_base.h \ + components/operating_system_fwd.h \ components/operating_system.h \ components/operating_system_fwd.h \ + components/operating_system_CL.h \ + components/operating_system_CL_fwd.h \ external/json.hpp \ hardware/network/network_id.h \ hardware/network/network_message.h \ @@ -128,25 +148,24 @@ nobase_library_include_HEADERS = \ hardware/common/flow.h \ hardware/common/packet_fwd.h \ libraries/system/system_api.h \ + libraries/system/system_library.h \ libraries/system/replacements/unistd.h \ - libraries/compute/lib_compute_time.h \ - libraries/compute/lib_compute_inst.h \ - libraries/compute/lib_compute.h \ libraries/compute/compute_api.h \ - libraries/compute/lib_compute_fwd.h \ - libraries/compute/lib_hybrid_compute.h \ libraries/compute/compute_event.h \ - libraries/compute/lib_compute_memmove.h \ - libraries/compute/compute_event_fwd.h \ + libraries/compute/compute_library.h \ + libraries/compute/compute_scheduler.h \ + libraries/compute/compute_scheduler_api.h \ + libraries/compute/instruction_processor.h \ + libraries/compute/memory_model.h \ operating_system/launch/app_launcher.h \ operating_system/launch/app_launcher_fwd.h \ operating_system/launch/app_launch_request.h \ - operating_system/libraries/library_fwd.h \ + operating_system/libraries/event_library_fwd.h \ operating_system/libraries/service_fwd.h \ - operating_system/libraries/library.h \ + operating_system/libraries/event_library.h \ operating_system/libraries/service.h \ - operating_system/libraries/api.h \ - operating_system/libraries/api_fwd.h \ + operating_system/libraries/library.h \ + operating_system/libraries/library_fwd.h \ operating_system/libraries/unblock_event.h \ operating_system/threading/context_util.h \ operating_system/threading/thread_lock.h \ @@ -158,12 +177,9 @@ nobase_library_include_HEADERS = \ operating_system/process/process_context.h \ operating_system/process/software_id.h \ operating_system/process/app.h \ - operating_system/process/compute_scheduler_fwd.h \ operating_system/process/thread_fwd.h \ operating_system/process/thread_info.h \ - operating_system/process/compute_scheduler.h \ operating_system/process/thread.h \ - operating_system/process/simple_compute_scheduler.h \ operating_system/process/loadlib.h \ operating_system/process/progress_queue.h \ operating_system/process/thread_id.h \ @@ -190,7 +206,8 @@ endif libhg_la_LDFLAGS = -module -avoid-version -libsystemapi_la_LDFLAGS = -module -avoid-version +libsystemlibrary_la_LDFLAGS = -module -avoid-version +libcomputelibrary_la_LDFLAGS = -module -avoid-version ostest_la_LDFLAGS = -module -avoid-version install-exec-hook: diff --git a/src/sst/elements/mercury/common/skeleton.h b/src/sst/elements/mercury/common/skeleton.h index db2e6630e6..fe09b454c8 100644 --- a/src/sst/elements/mercury/common/skeleton.h +++ b/src/sst/elements/mercury/common/skeleton.h @@ -164,7 +164,7 @@ class Params; #endif //#include -#include +#include /* end C++ */ #else /* need for C */ diff --git a/src/sst/elements/mercury/common/timestamp.cc b/src/sst/elements/mercury/common/timestamp.cc index 1db0dd8197..038601fcd6 100644 --- a/src/sst/elements/mercury/common/timestamp.cc +++ b/src/sst/elements/mercury/common/timestamp.cc @@ -32,8 +32,8 @@ namespace Hg { // // Static variables. // -TimeDelta::tick_t TimeDelta::ASEC_PER_TICK = 100; -TimeDelta::tick_t TimeDelta::one_femtosecond = 1000/TimeDelta::ASEC_PER_TICK; +TimeDelta::tick_t TimeDelta::ASEC_PER_TICK = 1000000; +//TimeDelta::tick_t TimeDelta::one_femtosecond = 1000/TimeDelta::ASEC_PER_TICK; //TimeDelta::tick_t TimeDelta::one_picosecond = TimeDelta::one_femtosecond * 1000; TimeDelta::tick_t TimeDelta::one_picosecond = 1; TimeDelta::tick_t TimeDelta::one_nanosecond = TimeDelta::one_picosecond * 1000; @@ -46,10 +46,10 @@ double TimeDelta::ms_per_tick = 1.0/TimeDelta::one_millisecond; double TimeDelta::us_per_tick = 1.0/TimeDelta::one_microsecond; double TimeDelta::ns_per_tick = 1.0/TimeDelta::one_nanosecond; double TimeDelta::ps_per_tick = 1.0/TimeDelta::one_picosecond; -double TimeDelta::fs_per_tick = 1.0/TimeDelta::one_femtosecond; +//double TimeDelta::fs_per_tick = 1.0/TimeDelta::one_femtosecond; double TimeDelta::max_time_; -static std::string _tick_spacing_string_("100as"); +static std::string _tick_spacing_string_("1ps"); void TimeDelta::initStamps(tick_t tick_spacing) @@ -62,8 +62,9 @@ void TimeDelta::initStamps(tick_t tick_spacing) std::stringstream ss; ss << tick_spacing << " as"; _tick_spacing_string_ = ss.str(); - one_femtosecond = 1000/ASEC_PER_TICK; - one_picosecond = 1000*one_femtosecond; + //one_femtosecond = 1000/ASEC_PER_TICK; + //one_picosecond = 1000*one_femtosecond; + one_picosecond = 1; one_nanosecond = 1000 * one_picosecond; one_microsecond = 1000 * one_nanosecond; one_millisecond = 1000 * one_microsecond; @@ -74,7 +75,7 @@ void TimeDelta::initStamps(tick_t tick_spacing) us_per_tick = 1.0/one_microsecond; ns_per_tick = 1.0/one_nanosecond; ps_per_tick = 1.0/one_picosecond; - fs_per_tick = 1.0/one_femtosecond; + //fs_per_tick = 1.0/one_femtosecond; max_time_ = std::numeric_limits::max() / one_second; } diff --git a/src/sst/elements/mercury/components/nic.cc b/src/sst/elements/mercury/components/nic.cc index a21b8468dd..9ab8eb9794 100644 --- a/src/sst/elements/mercury/components/nic.cc +++ b/src/sst/elements/mercury/components/nic.cc @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include @@ -34,7 +34,7 @@ NicEvent::serialize_order(serializer &ser) ser & msg_; } -NIC::NIC(uint32_t id, SST::Params& params, Node* parent) : +NIC::NIC(uint32_t id, SST::Params& params, NodeBase* parent) : SST::Hg::SubComponent(id), parent_(parent), my_addr_(parent->os()->addr()), @@ -404,7 +404,7 @@ NIC::internodeSend(NetworkMessage* netmsg) void NIC::sendToNode(NetworkMessage* payload) { - auto forward_ev = newCallback(parent_, &Node::handle, payload); + auto forward_ev = newCallback(parent_, &NodeBase::handle, payload); parent_->sendExecutionEventNow(forward_ev); } diff --git a/src/sst/elements/mercury/components/nic.h b/src/sst/elements/mercury/components/nic.h index 3383b18593..1ef1762825 100644 --- a/src/sst/elements/mercury/components/nic.h +++ b/src/sst/elements/mercury/components/nic.h @@ -21,12 +21,12 @@ #include #include +#include +#include #include #include #include #include -#include -#include #include #include #include @@ -69,7 +69,7 @@ class NIC : public SST::Hg::SubComponent public: SST_ELI_REGISTER_SUBCOMPONENT_API(SST::Hg::NIC, - SST::Hg::Node*) + SST::Hg::NodeBase*) SST_ELI_REGISTER_SUBCOMPONENT( NIC, @@ -210,11 +210,11 @@ class NIC : public SST::Hg::SubComponent } public: - NIC(uint32_t id, SST::Params& params, SST::Hg::Node* parent); + NIC(uint32_t id, SST::Params& params, SST::Hg::NodeBase* parent); protected: - Node* parent() const { + SST::Hg::NodeBase* parent() const { return parent_; } @@ -224,7 +224,7 @@ class NIC : public SST::Hg::SubComponent protected: int negligibleSize_; - Node* parent_; + SST::Hg::NodeBase* parent_; NodeId my_addr_; EventLink::ptr logp_link_; diff --git a/src/sst/elements/mercury/components/node.cc b/src/sst/elements/mercury/components/node.cc index 1b21526104..7824d37a43 100644 --- a/src/sst/elements/mercury/components/node.cc +++ b/src/sst/elements/mercury/components/node.cc @@ -25,17 +25,14 @@ extern template class HgBase; extern template SST::TimeConverter* HgBase::time_converter_; Node::Node(ComponentId_t id, Params ¶ms) - : SST::Hg::Component(id), nic_(0) { - my_addr_ = params.find("logicalID",-1); - unsigned int verbose = params.find("verbose",0); - out_ = std::unique_ptr(new SST::Output(sprintf("Node%d:",my_addr_), verbose, 0, Output::STDOUT)); - - out_->debug(CALL_INFO, 1, 0, "loading hg.operatingsystem\n"); - os_ = loadUserSubComponent("os_slot", SST::ComponentInfo::SHARE_NONE, this); + : SST::Hg::NodeBase(id,params) { + out_->debug(CALL_INFO, 1, 0, "loading hg.operating_system\n"); + os_ = loadUserSubComponent( + "os_slot", SST::ComponentInfo::SHARE_NONE, this); assert(os_); - out_->debug(CALL_INFO, 1, 0, "loading hg.NIC\n"); - link_control_ = loadUserSubComponent("link_control_slot", SST::ComponentInfo::SHARE_NONE,1); + link_control_ = loadUserSubComponent( + "link_control_slot", SST::ComponentInfo::SHARE_NONE, 1); if (link_control_) { out_->debug(CALL_INFO, 1, 0, "loading hg.NIC\n"); nic_ = loadUserSubComponent("nic_slot", SST::ComponentInfo::SHARE_NONE, this); @@ -48,37 +45,8 @@ Node::Node(ComponentId_t id, Params ¶ms) netLink_ = configureLink("network"); } - unsigned int nranks = params.find("nranks",-1); + unsigned int nranks = params.find("nranks", -1); os_->set_nranks(nranks); - - int ncores_ = params.find("ncores", 1); - int nsockets_ = params.find("nsockets",1); - - // Tell the simulation not to end until we're ready - registerAsPrimaryComponent(); - primaryComponentDoNotEndSim(); -} - -void -Node::init(unsigned int phase) -{ - SST::Component::init(phase); - os_->init(phase); - if (nic_) nic_->init(phase); -} - -void -Node::setup() -{ - SST::Component::setup(); - os_->setup(); - if (nic_) nic_->setup(); -} - -void -Node::handle(Request* req) -{ - os_->handleRequest(req); } } // namespace Hg diff --git a/src/sst/elements/mercury/components/node.h b/src/sst/elements/mercury/components/node.h index 83af9217bb..70662b835e 100644 --- a/src/sst/elements/mercury/components/node.h +++ b/src/sst/elements/mercury/components/node.h @@ -17,6 +17,7 @@ #include +#include #include #include #include @@ -30,7 +31,7 @@ namespace SST { namespace Hg { // Components inherit from SST::Component -class Node : public SST::Hg::Component { +class Node : public NodeBase { public: /* * SST Registration macros register Components with the SST Core and @@ -40,69 +41,17 @@ class Node : public SST::Hg::Component { */ // REGISTER THIS COMPONENT INTO THE ELEMENT LIBRARY SST_ELI_REGISTER_COMPONENT( - Node, // Component class + SST::Hg::Node, // Component class "hg", // Component library (for Python/library lookup) - "node", // Component name (for Python/library lookup) + "Node", // Component name (for Python/library lookup) SST_ELI_ELEMENT_VERSION( 0, 0, 1), // Version of the component (not related to SST version) - "Mercury Node", // Description - COMPONENT_CATEGORY_UNCATEGORIZED // Category + "Simple Mercury node", // Description + COMPONENT_CATEGORY_UNCATEGORIZED, // Category + SST::Hg::NodeBase ) - SST_ELI_DOCUMENT_PARAMS({"verbose", - "Output verbose level", 0}, - ) - - SST_ELI_DOCUMENT_PORTS( - {"network", "Dummy network port to connect nodes for testing", {} }, - ) - - SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS( - {"os_slot", "The operating system", "hg.operating_system"}, - {"nic_slot", "The nic", "hg.nic"}, - {"link_control_slot", "Slot for a link control", "SST::Interfaces::SimpleNetwork" } - ) - Node(SST::ComponentId_t id, SST::Params ¶ms); - - /** - @return A unique integer identifier - */ - NodeId addr() const { - return my_addr_; - } - - void init(unsigned int phase) override; - - void setup() override; - - void endSim() { - primaryComponentOKToEndSim(); - } - - SST::Hg::OperatingSystem* os() const { - return os_; - } - - int ncores() { return ncores_; } - int nsockets() { return nsockets_; } - - void handle(Request* req); - - SST::Hg::NIC* nic() { return nic_; } - - std::string toString() { return sprintf("HgNode%d:",my_addr_); } - -private: - - SST::Hg::NIC* nic_; - SST::Hg::OperatingSystem* os_; - SST::Interfaces::SimpleNetwork* link_control_; - SST::Link* netLink_; - std::unique_ptr out_; - NodeId my_addr_; - int ncores_; - int nsockets_; }; } // namespace Hg diff --git a/src/sst/elements/mercury/components/node_CL.cc b/src/sst/elements/mercury/components/node_CL.cc new file mode 100644 index 0000000000..b1038dd71c --- /dev/null +++ b/src/sst/elements/mercury/components/node_CL.cc @@ -0,0 +1,62 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#include + +namespace SST { +namespace Hg { + +extern template class HgBase; +extern template SST::TimeConverter* HgBase::time_converter_; + +NodeCL::NodeCL(ComponentId_t id, Params ¶ms) + : NodeBase(id,params) { + out_->debug(CALL_INFO, 1, 0, "loading hg.OperatingSystemCL\n"); + osCL_ = loadUserSubComponent( + "os_slot", SST::ComponentInfo::SHARE_NONE, this); + assert(osCL_); + os_ = dynamic_cast(osCL_); + assert(os_); + + link_control_ = loadUserSubComponent( + "link_control_slot", SST::ComponentInfo::SHARE_NONE, 1); + if (link_control_) { + out_->debug(CALL_INFO, 1, 0, "loading hg.NIC\n"); + nic_ = loadUserSubComponent("nic_slot", SST::ComponentInfo::SHARE_NONE, this); + assert(nic_); + nic_->set_link_control(link_control_); + } + else { + // assume basic tests + // (unused but needs to be there or multithread termination breaks) + netLink_ = configureLink("network"); + } + + unsigned int nranks = params.find("nranks",-1); + os_->set_nranks(nranks); + + int ncores_ = params.find("ncores", 1); + int nsockets_ = params.find("nsockets",1); + + out_->debug(CALL_INFO, 1, 0, "instantiating memory model\n"); + mem_ = new MemoryModel(params,this); + out_->debug(CALL_INFO, 1, 0, "instantiating instruction processor\n"); + proc_ = new InstructionProcessor(params,mem_,this); + + out_->debug(CALL_INFO, 1, 0, "exiting constructor\n"); +} + +} // namespace Hg +} // namespace SST diff --git a/src/sst/elements/mercury/components/node_CL.h b/src/sst/elements/mercury/components/node_CL.h new file mode 100644 index 0000000000..e1bfed03ef --- /dev/null +++ b/src/sst/elements/mercury/components/node_CL.h @@ -0,0 +1,75 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace SST { +namespace Hg { + +// Components inherit from SST::Component +class NodeCL : public NodeBase { +public: + /* + * SST Registration macros register Components with the SST Core and + * document their parameters, ports, etc. + * SST_ELI_REGISTER_COMPONENT is required, the documentation macros + * are only required if relevant + */ + // REGISTER THIS COMPONENT INTO THE ELEMENT LIBRARY + SST_ELI_REGISTER_COMPONENT( + SST::Hg::NodeCL, // Component class + "hg", // Component library (for Python/library lookup) + "NodeCL", // Component name (for Python/library lookup) + SST_ELI_ELEMENT_VERSION( + 0, 0, 1), // Version of the component (not related to SST version) + "Mercury Node including ComputeLibrary", // Description + COMPONENT_CATEGORY_UNCATEGORIZED, // Category + SST::Hg::NodeBase + ) + + NodeCL(SST::ComponentId_t id, SST::Params ¶ms); + ~NodeCL() { + delete proc_; + delete mem_; + } + + int ncores() { return ncores_; } + int nsockets() { return nsockets_; } + InstructionProcessor* proc() { return proc_; } + + std::string toString() override { return sprintf("HgNodeCL%d:",my_addr_); } + +private: + + int ncores_; + int nsockets_; + InstructionProcessor* proc_; + MemoryModel* mem_; + OperatingSystemCL* osCL_; +}; + +} // namespace Hg +} // namespace SST diff --git a/src/sst/elements/mercury/operating_system/libraries/api_fwd.h b/src/sst/elements/mercury/components/node_CL_fwd.h similarity index 91% rename from src/sst/elements/mercury/operating_system/libraries/api_fwd.h rename to src/sst/elements/mercury/components/node_CL_fwd.h index 97fcc7f0c6..a1cac38bc7 100644 --- a/src/sst/elements/mercury/operating_system/libraries/api_fwd.h +++ b/src/sst/elements/mercury/components/node_CL_fwd.h @@ -18,7 +18,7 @@ namespace SST { namespace Hg { -class API; +class NodeCL; -} // end namespace Hg -} // end namespace SST +} +} diff --git a/src/sst/elements/mercury/components/node_base.cc b/src/sst/elements/mercury/components/node_base.cc new file mode 100644 index 0000000000..29b6526c46 --- /dev/null +++ b/src/sst/elements/mercury/components/node_base.cc @@ -0,0 +1,63 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#include +#include +#include +#include + +#include + +namespace SST { +namespace Hg { + +extern template class HgBase; +extern template SST::TimeConverter* HgBase::time_converter_; + +NodeBase::NodeBase(ComponentId_t id, Params ¶ms) + : SST::Hg::Component(id), nic_(0) { + my_addr_ = params.find("logicalID",-1); + unsigned int verbose = params.find("verbose",0); + out_ = std::unique_ptr(new SST::Output(sprintf("Node%d:",my_addr_), verbose, 0, Output::STDOUT)); + + // Tell the simulation not to end until we're ready + registerAsPrimaryComponent(); + primaryComponentDoNotEndSim(); +} + +void +NodeBase::init(unsigned int phase) +{ + SST::Component::init(phase); + os_->init(phase); + if (nic_) nic_->init(phase); +} + +void +NodeBase::setup() +{ + SST::Component::setup(); + os_->setup(); + if (nic_) nic_->setup(); +} + +void +NodeBase::handle(Request* req) +{ + os_->handleRequest(req); +} + +} // namespace Hg +} // namespace SST diff --git a/src/sst/elements/mercury/components/node_base.h b/src/sst/elements/mercury/components/node_base.h new file mode 100644 index 0000000000..c340e8c54d --- /dev/null +++ b/src/sst/elements/mercury/components/node_base.h @@ -0,0 +1,90 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace SST { +namespace Hg { + +class NodeBase : public SST::Hg::Component { +public: + + // Base class for node components + SST_ELI_REGISTER_COMPONENT_BASE(SST::Hg::NodeBase) + + SST_ELI_DOCUMENT_PARAMS({"verbose", + "Output verbose level", 0}, + ) + + SST_ELI_DOCUMENT_PORTS( + {"network", "Dummy network port to connect nodes for testing", {} }, + ) + + SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS( + {"os_slot", "The operating system", "hg.operating_system"}, + {"nic_slot", "The nic", "hg.nic"}, + {"link_control_slot", "Slot for a link control", "SST::Interfaces::SimpleNetwork" } + ) + + NodeBase(SST::ComponentId_t id, SST::Params ¶ms); + + /** + @return A unique integer identifier + */ + NodeId addr() const { + return my_addr_; + } + + void init(unsigned int phase) override; + + void setup() override; + + void endSim() { + primaryComponentOKToEndSim(); + } + + SST::Hg::OperatingSystem* os() const { + return os_; + } + + void handle(Request* req); + + SST::Hg::NIC* nic() { return nic_; } + + virtual std::string toString() { return sprintf("HgNode%d:",my_addr_); } + +protected: + + SST::Hg::NIC* nic_; + SST::Hg::OperatingSystem* os_; + SST::Interfaces::SimpleNetwork* link_control_; + SST::Link* netLink_; + std::unique_ptr out_; + NodeId my_addr_; +}; + +} // namespace Hg +} // namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/compute_event_fwd.h b/src/sst/elements/mercury/components/node_base_fwd.h similarity index 89% rename from src/sst/elements/mercury/libraries/compute/compute_event_fwd.h rename to src/sst/elements/mercury/components/node_base_fwd.h index fa350e5de8..4c091a34a6 100644 --- a/src/sst/elements/mercury/libraries/compute/compute_event_fwd.h +++ b/src/sst/elements/mercury/components/node_base_fwd.h @@ -18,7 +18,7 @@ namespace SST { namespace Hg { -class ComputeEvent; +class NodeBase; -} // end namespace Hg -} // end namespace SST \ No newline at end of file +} +} diff --git a/src/sst/elements/mercury/components/operating_system.cc b/src/sst/elements/mercury/components/operating_system.cc index 2fcf59bb56..2f9edd4444 100644 --- a/src/sst/elements/mercury/components/operating_system.cc +++ b/src/sst/elements/mercury/components/operating_system.cc @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -65,13 +66,15 @@ class DeleteThreadEvent : Thread* thr_; }; -OperatingSystem::OperatingSystem(SST::ComponentId_t id, SST::Params& params, Node* parent) : - SST::Hg::SubComponent(id), +OperatingSystem::OperatingSystem(SST::ComponentId_t id, SST::Params& params, NodeBase* parent) : + OperatingSystemBase(id,params), node_(parent), des_context_(nullptr), next_condition_(0), next_mutex_(0) { + TimeDelta::initStamps(TimeDelta::ASEC_PER_TICK); + if (active_os_.size() == 0){ RankInfo num_ranks = getNumRanks(); active_os_.resize(num_ranks.thread); @@ -80,7 +83,7 @@ OperatingSystem::OperatingSystem(SST::ComponentId_t id, SST::Params& params, Nod my_addr_ = node_->addr(); next_outgoing_id_.src_node = my_addr_; next_outgoing_id_.msg_num = 0; - verbose_ = params.find("verbose", 0); + verbose_ = params.find("verbose", 1); out_ = std::unique_ptr( new SST::Output(sprintf("Node%d:HgOperatingSystem:", my_addr_), verbose_, 0, Output::STDOUT)); @@ -114,10 +117,10 @@ OperatingSystem::OperatingSystem(SST::ComponentId_t id, SST::Params& params, Nod app_launcher_ = new AppLauncher(this); addLaunchRequests(params); - compute_sched_ = SST::Hg::create( - "hg", params.find("compute_scheduler", "simple"), - params, this, node_ ? node_->ncores() : 1, node_ ? node_->nsockets() - : 1); + // compute_sched_ = SST::Hg::create( + // "hg", params.find("compute_scheduler", "simple"), + // params, this, node_ ? node_->ncores() : 1, node_ ? node_->nsockets() + // : 1); StackAlloc::init(params); initThreading(params); @@ -138,8 +141,6 @@ OperatingSystem::~OperatingSystem() des_context_->destroyContext(); delete des_context_; } - if (compute_sched_) - delete compute_sched_; } void @@ -378,13 +379,6 @@ OperatingSystem::block() TimeDelta elapsed = after - before; } -void -OperatingSystem::blockTimeout(TimeDelta delay) -{ - sendDelayedExecutionEvent(delay, new TimeoutEvent(this, active_thread_)); - block(); -} - void OperatingSystem::unblock(Thread* thr) { @@ -397,6 +391,13 @@ OperatingSystem::unblock(Thread* thr) } } +void +OperatingSystem::blockTimeout(TimeDelta delay) +{ + sendDelayedExecutionEvent(delay, new TimeoutEvent(this, active_thread_)); + block(); +} + Thread* OperatingSystem::getThread(uint32_t threadId) const { @@ -474,14 +475,14 @@ OperatingSystem::getCondition(int id) // LIBRARIES // -Library* -OperatingSystem::currentLibrary(const std::string &name) -{ - return currentOs()->lib(name); -} +// Library* +// OperatingSystem::currentEventLibrary(const std::string &name) +// { +// return currentOs()->eventLibrary(name); +// } -Library* -OperatingSystem::lib(const std::string& name) const +EventLibrary* +OperatingSystem::eventLibrary(const std::string& name) const { auto it = libs_.find(name); if (it == libs_.end()) { @@ -492,7 +493,7 @@ OperatingSystem::lib(const std::string& name) const } void -OperatingSystem::registerLib(Library* lib) +OperatingSystem::registerEventLib(EventLibrary* lib) { #if SST_HG_SANITY_CHECK if (lib->libName() == "") { @@ -511,14 +512,14 @@ OperatingSystem::registerLib(Library* lib) for (Request *req : reqs) { out_->debug(CALL_INFO, 1, 0, "delivering delayed event to lib %s: %s\n", lib->libName().c_str(), toString(req).c_str()); - sendExecutionEventNow(newCallback(lib, &Library::incomingRequest, req)); + sendExecutionEventNow(newCallback(lib, &EventLibrary::incomingRequest, req)); } pending_library_request_.erase(iter); } } void -OperatingSystem::unregisterLib(Library *lib) { +OperatingSystem::unregisterEventLib(EventLibrary *lib) { out_->debug(CALL_INFO, 1, 0, "unregistering lib %s\n", lib->libName().c_str()); int &refcount = lib_refcounts_[lib]; @@ -534,17 +535,17 @@ OperatingSystem::unregisterLib(Library *lib) { } bool -OperatingSystem::handleLibraryRequest(const std::string& name, Request* req) +OperatingSystem::handleEventLibraryRequest(const std::string& name, Request* req) { auto it = libs_.find(name); bool found = it != libs_.end(); if (found){ - Library* lib = it->second; - out_->debug(CALL_INFO, 1, 0, "delivering message to lib %s:%p: %s\n", + EventLibrary* lib = it->second; + out_->debug(CALL_INFO, 1, 0, "delivering message to event lib %s:%p: %s\n", name.c_str(), lib, toString(req).c_str()); lib->incomingRequest(req); } else { - out_->debug(CALL_INFO, 1, 0, "unable to deliver message to lib %s: %s\n", + out_->debug(CALL_INFO, 1, 0, "unable to deliver message to event lib %s: %s\n", name.c_str(), toString(req).c_str()); } return found; @@ -561,7 +562,7 @@ OperatingSystem::handleRequest(Request* req) toString(req).c_str()); } - bool found = handleLibraryRequest(libmsg->libname(), req); + bool found = handleEventLibraryRequest(libmsg->libname(), req); if (!found) { out_->debug(CALL_INFO, 1, 0, "delaying event to lib %s: %s", libmsg->libname().c_str(), libmsg->toString().c_str()); diff --git a/src/sst/elements/mercury/components/operating_system.h b/src/sst/elements/mercury/components/operating_system.h index 1579d7c15b..360f3e9c9f 100644 --- a/src/sst/elements/mercury/components/operating_system.h +++ b/src/sst/elements/mercury/components/operating_system.h @@ -20,19 +20,8 @@ #include #include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include @@ -42,42 +31,41 @@ namespace Hg { extern template SST::TimeConverter* HgBase::time_converter_; -class OperatingSystem : public SST::Hg::SubComponent { +class OperatingSystem : public SST::Hg::OperatingSystemBase { public: - - SST_ELI_REGISTER_SUBCOMPONENT_API(SST::Hg::OperatingSystem, - SST::Hg::Node*) + + SST_ELI_REGISTER_SUBCOMPONENT_DERIVED_API(SST::Hg::OperatingSystem, SST::Hg::OperatingSystemBase, SST::Hg::NodeBase*) SST_ELI_REGISTER_SUBCOMPONENT( - OperatingSystem, + SST::Hg::OperatingSystem, "hg", - "operating_system", + "OperatingSystem", SST_ELI_ELEMENT_VERSION(0,0,1), "Mercury Operating System", SST::Hg::OperatingSystem ) - OperatingSystem(SST::ComponentId_t id, SST::Params& params, Node* parent); + OperatingSystem(SST::ComponentId_t id, SST::Params& params, NodeBase* parent); - virtual ~OperatingSystem(); + ~OperatingSystem(); void setup() override; - void handleEvent(SST::Event *ev); + void handleEvent(SST::Event *ev) override; - bool clockTic(SST::Cycle_t) { + bool clockTic(SST::Cycle_t) override { //noop return true; } - static size_t stacksize(){ + static size_t stacksize() { return sst_hg_global_stacksize; } - std::function nicDataIoctl(); + std::function nicDataIoctl() override; - std::function nicCtrlIoctl(); + std::function nicCtrlIoctl() override; /** * @brief block Block the currently running thread context. @@ -86,17 +74,21 @@ class OperatingSystem : public SST::Hg::SubComponent { * for later unblocking * @return */ - void block(); + void block() override; + + void unblock(Thread* thr) override; - void blockTimeout(TimeDelta delay); - void startApp(App* theapp, const std::string& /*unique_name*/); - void startThread(Thread* t); - void joinThread(Thread* t); - void scheduleThreadDeletion(Thread* thr); - void switchToThread(Thread* tothread); - void unblock(Thread* thr); - void completeActiveThread(); + void blockTimeout(TimeDelta delay) override; + // void sleep(TimeDelta time); + // void compute(TimeDelta time); + + void startApp(App* theapp, const std::string& /*unique_name*/) override; + void startThread(Thread* t) override; + void joinThread(Thread* t) override; + void scheduleThreadDeletion(Thread* thr) override; + void switchToThread(Thread* tothread) override; + void completeActiveThread() override; static Thread* currentThread(){ return staticOsThreadContext()->activeThread(); @@ -119,7 +111,7 @@ class OperatingSystem : public SST::Hg::SubComponent { //#endif } - Thread* activeThread() const { + Thread* activeThread() const override { return active_thread_; } @@ -127,11 +119,17 @@ class OperatingSystem : public SST::Hg::SubComponent { return staticOsThreadContext(); } - UniqueEventId allocateUniqueId() { + UniqueEventId allocateUniqueId() override { next_outgoing_id_.msg_num++; return next_outgoing_id_; } +protected: + + Thread* active_thread_; + SST::Hg::NodeBase* node_; + std::map internal_apis_; + private: void initThreading(SST::Params& params); @@ -149,8 +147,6 @@ class OperatingSystem : public SST::Hg::SubComponent { unsigned int verbose_; int nranks_; - Node* node_; - Thread* active_thread_; Thread* blocked_thread_; int next_condition_; int next_mutex_; @@ -162,10 +158,9 @@ class OperatingSystem : public SST::Hg::SubComponent { std::unique_ptr out_; AppLauncher* app_launcher_; std::map running_threads_; - ComputeScheduler* compute_sched_; - std::unordered_map libs_; - std::unordered_map lib_refcounts_; + std::unordered_map libs_; + std::unordered_map lib_refcounts_; std::map> pending_library_request_; NodeId my_addr_; @@ -189,13 +184,13 @@ class OperatingSystem : public SST::Hg::SubComponent { public: - Node* node() const { + NodeBase* node() const override { return node_; } - Thread* getThread(uint32_t threadId) const; + Thread* getThread(uint32_t threadId) const override; - NodeId addr() const { + NodeId addr() const override { return my_addr_; } @@ -203,62 +198,46 @@ class OperatingSystem : public SST::Hg::SubComponent { * Allocate a unique ID for a mutex variable * @return The unique ID */ - int allocateMutex(); + int allocateMutex() override; /** * Fetch a mutex object corresponding to their ID * @param id * @return The mutex object corresponding to the ID. Return NULL if no mutex is found. */ - mutex_t* getMutex(int id); - - bool eraseMutex(int id); + mutex_t* getMutex(int id) override; - int allocateCondition(); + bool eraseMutex(int id) override; - bool eraseCondition(int id); + int allocateCondition() override; - condition_t* getCondition(int id); + bool eraseCondition(int id) override; - int ncores() const { - return compute_sched_->ncores(); - } - - int nsockets() const { - return compute_sched_->nsockets(); - } - - void reserveCores(int ncore, Thread* thr) { - compute_sched_->reserveCores(ncore,thr); - } - - void releaseCores(int ncore, Thread* thr) { - compute_sched_->releaseCores(ncore,thr); - } + condition_t* getCondition(int id) override; - void set_nranks(int32_t ranks) { + void set_nranks(int32_t ranks) override { nranks_ = ranks; } - int32_t nranks() { + int32_t nranks() override { return nranks_; } // -// LIBRARIES +// EVENT LIBRARIES // - Library* currentLibrary(const std::string &name); + // Library* currentEventLibrary(const std::string &name); - Library* lib(const std::string& name) const; + EventLibrary* eventLibrary(const std::string& name) const override; - void registerLib(Library* lib); + void registerEventLib(EventLibrary* lib) override; - void unregisterLib(Library* lib); + void unregisterEventLib(EventLibrary* lib) override; - bool handleLibraryRequest(const std::string& name, Request* req); + bool handleEventLibraryRequest(const std::string& name, Request* req) override; - void handleRequest(Request* req); + void handleRequest(Request* req) override; }; diff --git a/src/sst/elements/mercury/components/operating_system_CL.cc b/src/sst/elements/mercury/components/operating_system_CL.cc new file mode 100644 index 0000000000..3046a68e5b --- /dev/null +++ b/src/sst/elements/mercury/components/operating_system_CL.cc @@ -0,0 +1,66 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace SST { +namespace Hg { + + OperatingSystemCL::OperatingSystemCL(SST::ComponentId_t id, SST::Params& params, NodeCL* parent) : + OperatingSystem(id,params, parent), nodeCL_(parent) +{ + compute_sched_ = new ComputeScheduler( params, this); +} + +void +OperatingSystemCL::execute(COMP_FUNC func, Event *data, int nthr) +{ + int owned_ncores = active_thread_->numActiveCcores(); + if (owned_ncores < nthr){ + compute_sched_->reserveCores(nthr-owned_ncores, active_thread_); + } + + //initiate the hardware events + ExecutionEvent* cb = newCallback(this, &OperatingSystem::unblock, active_thread_); + + switch (func) { + case COMP_INSTR: + nodeCL_->proc()->compute(data, cb); + break; + case COMP_TIME: { + TimedComputeEvent* ev = safe_cast(TimedComputeEvent, data); + sendDelayedExecutionEvent(ev->data(), cb); + break; + } + default: + sst_hg_throw_printf(SST::Hg::HgError,"cannot process kernel"); + } + + block(); + + if (owned_ncores < nthr){ + compute_sched_->releaseCores(nthr-owned_ncores,active_thread_); + } +} + +} // namespace Hg +} // namespace SST diff --git a/src/sst/elements/mercury/components/operating_system_CL.h b/src/sst/elements/mercury/components/operating_system_CL.h new file mode 100644 index 0000000000..3b74d00bda --- /dev/null +++ b/src/sst/elements/mercury/components/operating_system_CL.h @@ -0,0 +1,66 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#pragma once + +#include +#include +#include +#include +#include + +namespace SST { +namespace Hg { + +extern template SST::TimeConverter* HgBase::time_converter_; + +class OperatingSystemCL : public OperatingSystem { + +public: + + SST_ELI_REGISTER_SUBCOMPONENT_DERIVED_API(SST::Hg::OperatingSystemCL, SST::Hg::OperatingSystem, SST::Hg::NodeCL*) + + SST_ELI_REGISTER_SUBCOMPONENT( + SST::Hg::OperatingSystemCL, + "hg", + "OperatingSystemCL", + SST_ELI_ELEMENT_VERSION(0,0,1), + "Mercury Operating System using ComputeLibrary", + SST::Hg::OperatingSystemCL + ) + + /** Functions that block and must complete before returning */ + enum COMP_FUNC { + COMP_TIME = 67, //the basic compute-for-some-time + COMP_INSTR, + COMP_EIGER + }; + + OperatingSystemCL(SST::ComponentId_t id, SST::Params& params, NodeCL* parent); + + ~OperatingSystemCL() + { + delete compute_sched_; + } + + void execute(COMP_FUNC, Event *data, int nthr = 1); + +private: + ComputeScheduler *compute_sched_; + NodeCL* nodeCL_; +}; + +} // namespace Hg +} // namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/lib_compute.cc b/src/sst/elements/mercury/components/operating_system_CL_fwd.h similarity index 85% rename from src/sst/elements/mercury/libraries/compute/lib_compute.cc rename to src/sst/elements/mercury/components/operating_system_CL_fwd.h index 250561aa78..7b9b0b2fbe 100644 --- a/src/sst/elements/mercury/libraries/compute/lib_compute.cc +++ b/src/sst/elements/mercury/components/operating_system_CL_fwd.h @@ -13,10 +13,12 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#include +#pragma once namespace SST { namespace Hg { -} // end namespace Hg -} // end namespace SST +class OperatingSystemCL; + +} // namespace Hg +} // namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/lib_compute_fwd.h b/src/sst/elements/mercury/components/operating_system_base.cc similarity index 73% rename from src/sst/elements/mercury/libraries/compute/lib_compute_fwd.h rename to src/sst/elements/mercury/components/operating_system_base.cc index 01d2e64528..6a05ad168c 100644 --- a/src/sst/elements/mercury/libraries/compute/lib_compute_fwd.h +++ b/src/sst/elements/mercury/components/operating_system_base.cc @@ -13,15 +13,14 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#pragma once +#include namespace SST { namespace Hg { -class LibComputeMemmove; -class LibComputeSleep; -class LibComputeTime; -class LibComputeInst; -class LibComputeLoops; +OperatingSystemBase::OperatingSystemBase(ComponentId_t id, SST::Params ¶ms) + : SubComponent(id) { + } -} } +} // namespace Hg +} // namespace SST diff --git a/src/sst/elements/mercury/components/operating_system_base.h b/src/sst/elements/mercury/components/operating_system_base.h new file mode 100644 index 0000000000..a5cca5063c --- /dev/null +++ b/src/sst/elements/mercury/components/operating_system_base.h @@ -0,0 +1,130 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace SST { +namespace Hg { + +extern template SST::TimeConverter* HgBase::time_converter_; + +class OperatingSystemBase : public SST::Hg::SubComponent { + +public: + + SST_ELI_REGISTER_SUBCOMPONENT_API(SST::Hg::OperatingSystemBase) + + OperatingSystemBase(ComponentId_t id, SST::Params& params); + + virtual ~OperatingSystemBase() {} + + virtual void handleEvent(SST::Event *ev) = 0; + + virtual bool clockTic(SST::Cycle_t) = 0; + + virtual std::function nicDataIoctl() = 0; + + virtual std::function nicCtrlIoctl() = 0; + + /** + * @brief block Block the currently running thread context. + * This must be called from an application thread, NOT the DES thread + * @param req [in-out] A key that will store blocking data that will be needed + * for later unblocking + * @return + */ + virtual void block() = 0; + + virtual void unblock(Thread* thr) = 0; + + + virtual void blockTimeout(TimeDelta delay) = 0; + // void sleep(TimeDelta time); + // void compute(TimeDelta time); + + virtual void startApp(App* theapp, const std::string& /*unique_name*/) = 0; + virtual void startThread(Thread* t) = 0; + virtual void joinThread(Thread* t) = 0; + virtual void scheduleThreadDeletion(Thread* thr) = 0; + virtual void switchToThread(Thread* tothread) = 0; + virtual void completeActiveThread() = 0; + + virtual Thread* activeThread() const = 0; + + virtual UniqueEventId allocateUniqueId() = 0; + + virtual NodeBase* node() const = 0; + + virtual Thread* getThread(uint32_t threadId) const = 0; + + virtual NodeId addr() const = 0; + + /** + * Allocate a unique ID for a mutex variable + * @return The unique ID + */ + virtual int allocateMutex() = 0; + + /** + * Fetch a mutex object corresponding to their ID + * @param id + * @return The mutex object corresponding to the ID. Return NULL if no mutex is found. + */ + virtual mutex_t* getMutex(int id) = 0; + + virtual bool eraseMutex(int id) = 0; + + virtual int allocateCondition() = 0; + + virtual bool eraseCondition(int id) = 0; + + virtual condition_t* getCondition(int id) = 0; + + virtual void set_nranks(int32_t ranks) = 0; + + virtual int32_t nranks() = 0; + +// +// EVENT LIBRARIES +// + + // Library* currentEventLibrary(const std::string &name); + + virtual EventLibrary* eventLibrary(const std::string& name) const = 0; + + virtual void registerEventLib(EventLibrary* lib) = 0; + + virtual void unregisterEventLib(EventLibrary* lib) = 0; + + virtual bool handleEventLibraryRequest(const std::string& name, Request* req) = 0; + + virtual void handleRequest(Request* req) = 0; + +}; + +} // namespace Hg +} // namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/compute_api.cc b/src/sst/elements/mercury/libraries/compute/compute_api.cc deleted file mode 100644 index efe386b2e1..0000000000 --- a/src/sst/elements/mercury/libraries/compute/compute_api.cc +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#include -#include -#include -#include -#include -#include -#include - - -using SST::Hg::TimeDelta; -using SST::Hg::Timestamp; -using os = SST::Hg::OperatingSystem; - -extern "C" double sst_hg_block() -{ - os::currentOs()->block(); - return os::currentOs()->now().sec(); -} - -extern "C" unsigned int sst_hg_sleep(unsigned int secs){ - os::currentOs()->sleep(TimeDelta(secs, TimeDelta::one_second)); - return 0; -} - -extern "C" unsigned sst_hg_sleepUntil(double t){ - os::currentOs()->sleepUntil(Timestamp(t)); - return 0; -} - -extern "C" int sst_hg_usleep(unsigned int usecs){ - os::currentOs()->sleep(TimeDelta(usecs, TimeDelta::one_microsecond)); - return 0; -} - -extern "C" int sst_hg_nanosleep(unsigned int nanosecs){ - os::currentOs()->sleep(TimeDelta(nanosecs, TimeDelta::one_nanosecond)); - return 0; -} - -extern "C" int sst_hg_msleep(unsigned int msecs){ - os::currentOs()->sleep(TimeDelta(msecs, TimeDelta::one_millisecond)); - return 0; -} - -extern "C" int sst_hg_fsleep(double secs){ - sstmac::sw::OperatingSystem::currentThread()->parentApp()->sleep(sstmac::TimeDelta(secs)); - return 0; -} - -extern "C" void sst_hg_compute(double secs){ - sstmac::sw::OperatingSystem::currentOs()->compute(TimeDelta(secs)); -} - -extern "C" void sst_hg_memread(uint64_t bytes){ - sstmac::sw::OperatingSystem::currentThread()->parentApp() - ->computeBlockRead(bytes); -} - -extern "C" void sst_hg_memwrite(uint64_t bytes){ - sstmac::sw::OperatingSystem::currentThread()->parentApp() - ->computeBlockWrite(bytes); -} - -extern "C" void sst_hg_memcopy(uint64_t bytes){ - sstmac::sw::OperatingSystem::currentThread()->parentApp() - ->computeBlockMemcpy(bytes); -} - -extern "C" void sst_hg_compute_detailed(uint64_t nflops, uint64_t nintops, uint64_t bytes){ - sstmac::sw::OperatingSystem::currentThread() - ->computeDetailed(nflops, nintops, bytes); -} - -extern "C" void sst_hg_compute_detailed_nthr(uint64_t nflops, uint64_t nintops, uint64_t bytes, - int nthread){ - sstmac::sw::OperatingSystem::currentThread() - ->computeDetailed(nflops, nintops, bytes, nthread); -} - -extern "C" void sst_hg_computeLoop(uint64_t num_loops, uint32_t nflops_per_loop, - uint32_t nintops_per_loop, uint32_t bytes_per_loop){ - sstmac::sw::OperatingSystem::currentThread()->parentApp() - ->computeLoop(num_loops, nflops_per_loop, nintops_per_loop, bytes_per_loop); -} - -extern "C" void sst_hg_compute_loop2(uint64_t isize, uint64_t jsize, - uint32_t nflops_per_loop, - uint32_t nintops_per_loop, uint32_t bytes_per_loop){ - uint64_t num_loops = isize * jsize; - sstmac::sw::OperatingSystem::currentThread()->parentApp() - ->computeLoop(num_loops, nflops_per_loop, nintops_per_loop, bytes_per_loop); -} - -extern "C" void -sst_hg_compute_loop3(uint64_t isize, uint64_t jsize, uint64_t ksize, - uint32_t nflops_per_loop, - uint32_t nintops_per_loop, - uint32_t bytes_per_loop){ - uint64_t num_loops = isize * jsize * ksize; - sstmac::sw::OperatingSystem::currentThread()->parentApp() - ->computeLoop(num_loops, nflops_per_loop, nintops_per_loop, bytes_per_loop); -} - -extern "C" void -sst_hg_compute_loop4(uint64_t isize, uint64_t jsize, uint64_t ksize, uint64_t lsize, - uint32_t nflops_per_loop, - uint32_t nintops_per_loop, - uint32_t bytes_per_loop){ - uint64_t num_loops = isize * jsize * ksize * lsize; - sstmac::sw::OperatingSystem::currentThread()->parentApp() - ->computeLoop(num_loops, nflops_per_loop, nintops_per_loop, bytes_per_loop); -} diff --git a/src/sst/elements/mercury/libraries/compute/compute_api.h b/src/sst/elements/mercury/libraries/compute/compute_api.h index a5ab750c7c..cfbd821f19 100644 --- a/src/sst/elements/mercury/libraries/compute/compute_api.h +++ b/src/sst/elements/mercury/libraries/compute/compute_api.h @@ -15,178 +15,18 @@ #pragma once -#ifdef __cplusplus -#include -extern "C" { -#else -#include -#endif - -/** Block and return the time when unblocked */ -double sst_hg_block(); - -/** - * @brief sst_hg_sleep SST virtual equivalent of Linux sleep - * @param secs - * @return Always zero, successful return code for Linux - */ -unsigned int sst_hg_sleep(unsigned int secs); - -/** - * @brief sst_hg_usleep SST virtual equivalent of Linux usleep - * @param usecs - * @return Always zero, successful return code for Linux - */ -int sst_hg_usleep(unsigned int usecs); - -int sst_hg_nanosleep(unsigned int nsecs); - -int sst_hg_msleep(unsigned int msecs); - -int sst_hg_fsleep(double secs); - -/** - * @brief sst_hg_compute Compute for a specified number of seconds - * @param secs - */ -void sst_hg_compute(double secs); - -/** - * @brief sst_hg_compute_detailed Model a specific compute block - * @param nflops The number of flops executed in the compute block - * @param nintops The number of int ops executed in the compute block - * @param bytes - */ -void sst_hg_compute_detailed(uint64_t nflops, uint64_t nintops, uint64_t bytes); - -void sst_hg_compute_detailed_nthr(uint64_t nflops, uint64_t nintops, uint64_t bytes, - int nthread); - -/** - * @brief sst_hg_compute_loop - * @param num_loops The number of loops to execute - * @param nflops_per_loop The number of flops per loop in the inner loop - * @param nintops_per_loop The number of integer ops in the inner loop (not including loop predicates like i < N) - * @param bytes_per_loop The average number of unique bytes read + written per loop - */ -void sst_hg_computeLoop(uint64_t num_loops, - uint32_t nflops_per_loop, - uint32_t nintops_per_loop, - uint32_t bytes_per_loop); - -/** - * @brief sst_hg_compute_loop2 - * @param isize The number of indices in the outer loop (imax - imin) - * @param jsize The number of indices in the inner loop (jmax - jmin) - * @param nflops_per_loop The number of flops per loop in the inner loop - * @param nintops_per_loop The number of integer ops in the inner loop (not including loop predicates like i < N) - * @param bytes_per_loop The average number of unique bytes read + written per loop - */ -void sst_hg_compute_loop2(uint64_t isize, uint64_t jsize, - uint32_t nflops_per_loop, - uint32_t nintops_per_loop, - uint32_t bytes_per_loop); - -/** - * @brief sst_hg_compute_loop3 - * @param isize The number of indices in the outer loop (imax - imin) - * @param jsize The number of indices in the inner loop (jmax - jmin) - * @param ksize The number of indices in the inner loop (kmax - kmin) - * @param nflops_per_loop The number of flops per loop in the inner loop - * @param nintops_per_loop The number of integer ops in the inner loop (not including loop predicates like i < N) - * @param bytes_per_loop The average number of unique bytes read + written per loop - */ -void sst_hg_compute_loop3(uint64_t isize, uint64_t jsize, - uint64_t ksize, - uint32_t nflops_per_loop, - uint32_t nintops_per_loop, - uint32_t bytes_per_loop); - -/** - * @brief sst_hg_compute_loop4 - * @param isize The number of indices in the outer loop (imax - imin) - * @param jsize The number of indices in the inner loop (jmax - jmin) - * @param ksize The number of indices in the inner loop (kmax - kmin) - * @param lsize The number of indices in the inner loop (lmax - lmin) - * @param nflops_per_loop The number of flops per loop in the inner loop - * @param nintops_per_loop The number of integer ops in the inner loop (not including loop predicates like i < N) - * @param bytes_per_loop The average number of unique bytes read + written per loop - */ -void sst_hg_compute_loop4(uint64_t isize, uint64_t jsize, - uint64_t ksize, uint64_t lsize, - uint32_t nflops_per_loop, - uint32_t nintops_per_loop, - uint32_t bytes_per_loop); - -void sst_hg_memread(uint64_t bytes); - -void sst_hg_memwrite(uint64_t bytes); - -void sst_hg_memcopy(uint64_t bytes); - -/** -This has to work from C, so we must regrettably use VA_ARGS -*/ -/** - * @brief sst_hg_start_memoize - * @param token - * @param model - * @return A thread tag to identify thread-local storage later - */ -int sst_hg_start_memoize(const char* token, const char* model); - -void sst_hg_finish_memoize0(int thr_tag, const char* token); -void sst_hg_finish_memoize1(int thr_tag, const char* token, double p1); -void sst_hg_finish_memoize2(int thr_tag, const char* token, double p1, double p2); -void sst_hg_finish_memoize3(int thr_tag, const char* token, double p1, double p2, - double p3); -void sst_hg_finish_memoize4(int thr_tag, const char* token, double p1, double p2, - double p3, double p4); -void sst_hg_finish_memoize5(int thr_tag, const char* token, double p1, double p2, - double p3, double p4, double p5); - -void sst_hg_compute_memoize0(const char* token); -void sst_hg_compute_memoize1(const char* token, double p1); -void sst_hg_compute_memoize2(const char* token, double p1, double p2); -void sst_hg_compute_memoize3(const char* token, double p1, double p2, - double p3); -void sst_hg_compute_memoize4(const char* token, double p1, double p2, - double p3, double p4); -void sst_hg_compute_memoize5(const char* token, double p1, double p2, - double p3, double p4, double p5); - - -void sst_hg_set_implicit_memoize_state1(int type0, int state0); -void sst_hg_set_implicit_memoize_state2(int type0, int state0, int type1, int state1); -void sst_hg_set_implicit_memoize_state3(int type0, int state0, int type1, int state1, - int type2, int state2); -void sst_hg_unset_implicit_memoize_state1(int type0); -void sst_hg_unset_implicit_memoize_state2(int type0, int type1); -void sst_hg_unset_implicit_memoize_state3(int type0, int type1, int type2); - -void sst_hg_set_implicit_compute_state1(int type0, int state0); -void sst_hg_set_implicit_compute_state2(int type0, int state0, int type1, int state1); -void sst_hg_set_implicit_compute_state3(int type0, int state0, int type1, int state1, - int type2, int state2); -void sst_hg_unset_implicit_compute_state1(int type0); -void sst_hg_unset_implicit_compute_state2(int type0, int type1); -void sst_hg_unset_implicit_compute_state3(int type0, int type1, int type2); - -void* sst_hg_alloc_stack(int sz, int md_sz); -void sst_hg_free_stack(void* ptr); - -#define SST_HG_sleep(...) sst_hg_sleep(__VA_ARGS__) -#define SST_HG_usleep(...) sst_hg_usleep(__VA_ARGS__) -#define SST_HG_compute(...) sst_hg_compute(__VA_ARGS__) -#define SST_HG_memread(...) sst_hg_memread(__VA_ARGS__) -#define SST_HG_memwrite(...) sst_hg_memwrite(__VA_ARGS__) -#define SST_HG_memcopy(...) sst_hg_memcopy(__VA_ARGS__) -#define SST_HG_computeDetailed(...) sst_hg_compute_detailed(__VA_ARGS__) -#define SST_HG_computeLoop(...) sst_hg_computeLoop(__VA_ARGS__) -#define SST_HG_compute_loop2(...) sst_hg_compute_loop2(__VA_ARGS__) -#define SST_HG_compute_loop3(...) sst_hg_compute_loop3(__VA_ARGS__) -#define SST_HG_compute_loop4(...) sst_hg_compute_loop4(__VA_ARGS__) - -#ifdef __cplusplus -} //end extern c -#endif +namespace SST { +namespace Hg { + +class ComputeAPI +{ + public: + virtual void sleep(TimeDelta time) = 0; + virtual void compute(TimeDelta time) = 0; + virtual void computeBlockMemcpy(uint64_t bytes) = 0; + virtual void write(uint64_t bytes) = 0; + virtual void copy(uint64_t bytes) = 0; +}; + +} // end namespace Hg +} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/compute_event.cc b/src/sst/elements/mercury/libraries/compute/compute_event.cc deleted file mode 100644 index 452aec09f1..0000000000 --- a/src/sst/elements/mercury/libraries/compute/compute_event.cc +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#include -#include diff --git a/src/sst/elements/mercury/libraries/compute/compute_event.h b/src/sst/elements/mercury/libraries/compute/compute_event.h index bcada40de9..c54020fef2 100644 --- a/src/sst/elements/mercury/libraries/compute/compute_event.h +++ b/src/sst/elements/mercury/libraries/compute/compute_event.h @@ -15,8 +15,8 @@ #pragma once -#include #include +#include #include #include #include @@ -25,6 +25,8 @@ namespace SST { namespace Hg { +using MemoryAccessId = UniqueEventId; + /** * Input for processor models that use * performance counter data. Is basically just a map @@ -49,11 +51,11 @@ class ComputeEvent : return core_; } - hw::MemoryAccessId accessId() const { + MemoryAccessId accessId() const { return unique_id_; } - void setAccessId(hw::MemoryAccessId id) { + void setAccessId(MemoryAccessId id) { unique_id_ = id; } @@ -64,14 +66,14 @@ class ComputeEvent : private: int core_; - hw::MemoryAccessId unique_id_; + MemoryAccessId unique_id_; }; template class ComputeEvent_impl : public ComputeEvent, - public sprockit::thread_safe_new> + public thread_safe_new> { NotSerializable(ComputeEvent_impl) diff --git a/src/sst/elements/mercury/libraries/compute/compute_library.cc b/src/sst/elements/mercury/libraries/compute/compute_library.cc new file mode 100644 index 0000000000..948b863f4e --- /dev/null +++ b/src/sst/elements/mercury/libraries/compute/compute_library.cc @@ -0,0 +1,120 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#include +#include +#include +#include +#include + +namespace SST { +namespace Hg { + +ComputeLibrary::ComputeLibrary(SST::Params ¶ms, App *parent) + : Library(params, parent) +{ + parent_os_ = dynamic_cast(parent->os()); + + //FIXME: do 64 bit accesses make sense? (cache line?) + access_width_bytes_ = params.find("compute_library_access_width", 64) / 8; + + loop_overhead_ = params.find("compute_library_loop_overhead", 1.0); +} + +void +ComputeLibrary::compute(TimeDelta time) +{ + if (time.sec() < 0) { + sst_hg_abort_printf("ComputeLibrary can't compute for less than zero time"); + } + parent_os_->blockTimeout(time); +} + +void +ComputeLibrary::sleep(TimeDelta time) +{ + parent_os_->blockTimeout(time); +} + +void ComputeLibrary::computeBlockMemcpy(uint64_t bytes) { + copy(bytes); +} + +void +ComputeLibrary::write(uint64_t bytes) +{ + doAccess(bytes); +} + +void +ComputeLibrary::copy(uint64_t bytes) +{ + doAccess(bytes); +} + +void +ComputeLibrary::doAccess(uint64_t bytes) +{ + uint64_t num_loops = bytes / access_width_bytes_; + int nflops = 0; + int nintops = 1; //memmove instruction + computeLoop(num_loops, nflops, nintops, access_width_bytes_); +} + +void +ComputeLibrary::computeLoop(uint64_t num_loops, + uint32_t flops_per_loop, + uint32_t nintops_per_loop, + uint32_t bytes_per_loop) +{ + /** Configure the compute request */ + uint64_t loop_control_ops = 2 * num_loops * loop_overhead_; + uint64_t num_intops = loop_control_ops + nintops_per_loop*num_loops; + computeDetailed( + flops_per_loop*num_loops, + num_intops, + bytes_per_loop*num_loops, 1); +} + +void +ComputeLibrary::computeDetailed( + uint64_t flops, + uint64_t nintops, + uint64_t bytes, + int nthread) +{ + /** Configure the compute request */ + auto cmsg = new ComputeEvent_impl; + basic_instructions_st& st = cmsg->data(); + st.flops = flops; + st.intops = nintops; + st.mem_sequential = bytes; + st.nthread = nthread; + + // // Do not overwrite an existing tag + // FTQScope scope(os_->activeThread(), FTQTag::compute); + + computeInst(cmsg, nthread); + delete cmsg; +} + +void +ComputeLibrary::computeInst(ComputeEvent* cmsg, int nthr) +{ + parent_os_->execute(OperatingSystemCL::COMP_INSTR, cmsg, nthr); +} + +} // end namespace Hg +} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/compute_library.h b/src/sst/elements/mercury/libraries/compute/compute_library.h new file mode 100644 index 0000000000..393990812f --- /dev/null +++ b/src/sst/elements/mercury/libraries/compute/compute_library.h @@ -0,0 +1,72 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#pragma once + +#include +#include +#include +#include +#include + +namespace SST { +namespace Hg { + +class ComputeLibrary : public ComputeAPI, public Library +{ + public: + + SST_ELI_REGISTER_DERIVED( + Library, + ComputeLibrary, + "hg", + "ComputeLibrary", + SST_ELI_ELEMENT_VERSION(1,0,0), + "provides basic compute modeling") + + ~ComputeLibrary() override{} + + ComputeLibrary(SST::Params& params, App* parent); + + void sleep(TimeDelta time) override; + + void compute(TimeDelta time) override; + + void computeBlockMemcpy(uint64_t bytes) override; + + void write(uint64_t bytes) override; + + void copy(uint64_t bytes) override; + + private: + + void doAccess(uint64_t bytes); + + void computeLoop(uint64_t num_loops, uint32_t flops_per_loop, + uint32_t nintops_per_loop, uint32_t bytes_per_loop); + + void computeDetailed(uint64_t flops, uint64_t nintops, uint64_t bytes, + int nthread); + + void computeInst(ComputeEvent* cmsg, int nthr); + +private: + OperatingSystemCL* parent_os_; + int access_width_bytes_; + double loop_overhead_; +}; + +} // end namespace Hg +} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/compute_scheduler.cc b/src/sst/elements/mercury/libraries/compute/compute_scheduler.cc new file mode 100644 index 0000000000..1cea9243c1 --- /dev/null +++ b/src/sst/elements/mercury/libraries/compute/compute_scheduler.cc @@ -0,0 +1,87 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#include +#include +#include + +namespace SST { +namespace Hg { + +ComputeScheduler::ComputeScheduler(SST::Params ¶ms, OperatingSystemCL* os) + : os_(os) +{ + ncores_ = params.find("ncores", 24); + nsockets_ = params.find("nsockets", 4); +} + +/** + * @brief reserve_core + * @param thr The physical thread requesting to compute + */ +void ComputeScheduler::reserveCores(int ncores, Thread *thr) { + int total_cores_needed = ncores + ncore_active_; + while (total_cores_needed > ncores_) { + // debug_printf(sprockit::dbg::compute_scheduler, + // "Need %d cores, have %d for thread %ld - blocking", + // ncores, ncores_ - ncore_active_, thr->threadId()); + pending_threads_.emplace_back(ncores, thr); + os_->block(); + // we can accidentally unblock due to "race" conditions + // reset the core check to make sure we have what we need + total_cores_needed = ncores + ncore_active_; + } + // debug_printf(sprockit::dbg::compute_scheduler, + // "Reserved %d cores for thread %ld", + // ncores, thr->threadId()); + // no worrying about masks + for (int i = ncore_active_; i < ncore_active_ + ncores; ++i) { + thr->addActiveCore(i); + } + ncore_active_ += ncores; +} + +void ComputeScheduler::releaseCores(int ncores, Thread *thr) { + ncore_active_ -= ncores; + // debug_printf(sprockit::dbg::compute_scheduler, + // "Released %d cores for thread %ld - now %d active, %d free", + // ncores, thr->threadId(), ncore_active_, ncores_ - ncore_active_); + for (int i = 0; i < ncores; ++i) { + thr->popActiveCore(); + } + + int nfree_cores = ncores_ - ncore_active_; + Thread *to_unblock = nullptr; + for (auto iter = pending_threads_.begin(); iter != pending_threads_.end(); + ++iter) { + auto pair = *iter; + int ncores_needed = pair.first; + // debug_printf(sprockit::dbg::compute_scheduler, + // "Thread %d trying to restart thread %d with %d free cores - need %d", + // thr->threadId(), pair.second->threadId(), + // nfree_cores, ncores_needed); + if (nfree_cores >= ncores_needed) { + pending_threads_.erase(iter); + to_unblock = pair.second; + break; + } + } + if (to_unblock) { + os_->unblock(to_unblock); + } +} + +} // end namespace Hg +} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/compute_scheduler.h b/src/sst/elements/mercury/libraries/compute/compute_scheduler.h new file mode 100644 index 0000000000..c6d182e4e1 --- /dev/null +++ b/src/sst/elements/mercury/libraries/compute/compute_scheduler.h @@ -0,0 +1,65 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#pragma once + +#include +#include +#include +#include +#include + +namespace SST { +namespace Hg { + +//class ComputeScheduler : public ComputeSchedulerAPI, public Library +class ComputeScheduler : public ComputeSchedulerAPI +{ +public: + // SST_ELI_REGISTER_DERIVED(Library, ComputeScheduler, "hg", "ComputeScheduler", + // SST_ELI_ELEMENT_VERSION(1, 0, 0), + // "provides compute scheduler") + + ComputeScheduler(SST::Params& params, SST::Hg::OperatingSystemCL* os); + + ~ComputeScheduler() {} + + int ncores() const override { + return ncores_; + } + + int nsockets() const override { + return nsockets_; + } + + /** + * @brief reserve_core + * @param thr The physical thread requesting to compute + */ + void reserveCores(int ncore, Thread* thr) override; + + void releaseCores(int ncore, Thread* thr) override; + +private: + int ncores_; + int nsockets_; + int cores_per_sockets_; + int ncore_active_; + SST::Hg::OperatingSystemCL* os_; + std::list> pending_threads_; +}; + +} // end namespace Hg +} // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/process/compute_scheduler.cc b/src/sst/elements/mercury/libraries/compute/compute_scheduler_api.h similarity index 66% rename from src/sst/elements/mercury/operating_system/process/compute_scheduler.cc rename to src/sst/elements/mercury/libraries/compute/compute_scheduler_api.h index f15ce9d059..ad9de3865e 100644 --- a/src/sst/elements/mercury/operating_system/process/compute_scheduler.cc +++ b/src/sst/elements/mercury/libraries/compute/compute_scheduler_api.h @@ -13,12 +13,21 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#include -#include -#include +#pragma once + +#include namespace SST { namespace Hg { +class ComputeSchedulerAPI +{ +public: + virtual int ncores() const = 0; + virtual int nsockets() const = 0; + virtual void reserveCores(int ncore, Thread *thr) = 0; + virtual void releaseCores(int ncore, Thread *thr) = 0; +}; + } // end namespace Hg } // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/instruction_processor.cc b/src/sst/elements/mercury/libraries/compute/instruction_processor.cc new file mode 100644 index 0000000000..2f0ac9af42 --- /dev/null +++ b/src/sst/elements/mercury/libraries/compute/instruction_processor.cc @@ -0,0 +1,71 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#include +#include +#include +#include + +namespace SST { +namespace Hg { + +InstructionProcessor::InstructionProcessor(SST::Params& params, MemoryModel* mem, NodeCL* node) : +mem_(mem), nodeCL_(node) +{ + negligible_bytes_ = params.find("negligible_compute_bytes", "64B").getRoundedValue(); + + double parallelism = params.find("parallelism", 1.0); + + freq_ = params.find("frequency", "2.1 GHz").getValue().toDouble(); + mem_freq_ = freq_; + + tflop_ = TimeDelta(1.0 / freq_ / parallelism); + tintop_ = tflop_; + tmemseq_ = TimeDelta(1.0 / mem_freq_); + tmemrnd_ = tmemseq_; +} + + +TimeDelta +InstructionProcessor::instructionTime(BasicComputeEvent* cmsg) +{ + basic_instructions_st& st = cmsg->data(); + TimeDelta tsec; + tsec += st.flops*tflop_; + tsec += st.intops*tintop_; + return tsec; +} + +void +InstructionProcessor::compute(Event* ev, ExecutionEvent* cb) +{ + BasicComputeEvent* bev = test_cast(BasicComputeEvent, ev); + basic_instructions_st& st = bev->data(); + int nthread = st.nthread; + // compute execution time in seconds + TimeDelta instr_time = instructionTime(bev) / nthread; + // now count the number of bytes + uint64_t bytes = st.mem_sequential; + if (bytes <= negligible_bytes_) { + nodeCL_->sendDelayedExecutionEvent(instr_time, cb); + } else { + //do the full memory modeling + TimeDelta byte_request_delay = instr_time / bytes; + mem_->accessFlow(bytes, byte_request_delay, cb); + } +} + +} // namespace Hg +} // namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/instruction_processor.h b/src/sst/elements/mercury/libraries/compute/instruction_processor.h new file mode 100644 index 0000000000..171e02ee22 --- /dev/null +++ b/src/sst/elements/mercury/libraries/compute/instruction_processor.h @@ -0,0 +1,55 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#pragma once + +#include +#include +#include + +namespace SST { +namespace Hg { + +class InstructionProcessor { + public: + + InstructionProcessor(SST::Params& params, + MemoryModel* mem, NodeCL* nd); + + ~InstructionProcessor() { } + + void compute(Event* ev, ExecutionEvent* cb); + + private: + void setMemopDistribution(double stdev); + + void setFlopDistribution(double stdev); + + TimeDelta instructionTime(BasicComputeEvent* msg); + + MemoryModel* mem_; + NodeCL* nodeCL_; + + TimeDelta tflop_; + TimeDelta tintop_; + TimeDelta tmemseq_; + TimeDelta tmemrnd_; + double freq_; + double mem_freq_; + uint64_t negligible_bytes_; +}; + +} // namespace Hg +} // namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/lib_compute.h b/src/sst/elements/mercury/libraries/compute/lib_compute.h deleted file mode 100644 index b5539b557e..0000000000 --- a/src/sst/elements/mercury/libraries/compute/lib_compute.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#pragma once - -#include -#include - -namespace sstmac { -namespace sw { - -class LibCompute : - public Library -{ - public: - ~LibCompute() override{} - - protected: - LibCompute(SST::Params& /*params*/, - const std::string& libname, SoftwareId sid, - OperatingSystem* os) - : Library(libname, sid, os) { - } - - LibCompute(SST::Params& /*params*/, - const char* name, SoftwareId sid, - OperatingSystem* os) - : Library(name, sid, os) - { - } - - void incomingRequest(Request* req) override { - Library::incomingRequest(req); - } - -}; - -} // end namespace Hg -} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/lib_compute_inst.cc b/src/sst/elements/mercury/libraries/compute/lib_compute_inst.cc deleted file mode 100644 index 6b99fe9bc7..0000000000 --- a/src/sst/elements/mercury/libraries/compute/lib_compute_inst.cc +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#include -#include -#include -#include -#include - -namespace SST { -namespace Hg { - -RegisterKeywords( - { "lib_compute_unroll_loops", "DEPRECATED: tunes the loop control overhead for compute loop functions" }, - { "lib_compute_loop_overhead", "the number of instructions in control overhead per compute loop" }, - { "lib_compute_access_width", "the size of each memory access access in bits" } -); - -LibComputeInst::LibComputeInst(SST::Params& params, - const std::string& libname, SoftwareId id, - OperatingSystem* os) - : LibComputeTime(params, libname, id, os) -{ - init(params); -} - -LibComputeInst::LibComputeInst(SST::Params& params, - SoftwareId sid, OperatingSystem* os) : - LibComputeTime(params, "computelibinstr%s", sid, os) -{ - init(params); -} - -void -LibComputeInst::computeDetailed( - uint64_t flops, - uint64_t nintops, - uint64_t bytes, - int nthread) -{ - /** Configure the compute request */ - auto cmsg = new ComputeEvent_impl; - basic_instructions_st& st = cmsg->data(); - st.flops = flops; - st.intops = nintops; - st.mem_sequential = bytes; - st.nthread = nthread; - - // Do not overwrite an existing tag - FTQScope scope(os_->activeThread(), FTQTag::compute); - - computeInst(cmsg, nthread); - delete cmsg; -} - -void -LibComputeInst::computeLoop(uint64_t num_loops, - uint32_t flops_per_loop, - uint32_t nintops_per_loop, - uint32_t bytes_per_loop) -{ - /** Configure the compute request */ - uint64_t loop_control_ops = 2 * num_loops * loop_overhead_; - uint64_t num_intops = loop_control_ops + nintops_per_loop*num_loops; - computeDetailed( - flops_per_loop*num_loops, - num_intops, - bytes_per_loop*num_loops); -} - -void -LibComputeInst::init(SST::Params& params) -{ - if (params.contains("lib_compute_unroll_loops")){ - double loop_unroll = params.find("lib_compute_unroll_loops"); - loop_overhead_ = 1.0 / loop_unroll; - } else { - loop_overhead_ = params.find("lib_compute_loop_overhead", 1.0); - } -} - -void -LibComputeInst::computeInst(ComputeEvent* cmsg, int nthr) -{ - CallGraphAppend(ComputeInstructions); - os_->execute(ami::COMP_INSTR, cmsg, nthr); -} - -} -} //end of namespace diff --git a/src/sst/elements/mercury/libraries/compute/lib_compute_inst.h b/src/sst/elements/mercury/libraries/compute/lib_compute_inst.h deleted file mode 100644 index 402a822e55..0000000000 --- a/src/sst/elements/mercury/libraries/compute/lib_compute_inst.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#pragma once - -#include -#include -#include -#include - -namespace SST { -namespace Hg { - -class LibComputeInst : - public LibComputeTime -{ - public: - LibComputeInst(SST::Params& params, SoftwareId id, OperatingSystem* os); - - LibComputeInst(SST::Params& params, const std::string& libname, - SoftwareId id, OperatingSystem* os); - - ~LibComputeInst() override { } - - void computeInst(ComputeEvent* msg, int nthr = 1); - - void computeDetailed(uint64_t flops, - uint64_t nintops, - uint64_t bytes, - int nthread = 1); - - void computeLoop(uint64_t nloops, - uint32_t flops_per_loop, - uint32_t intops_per_loop, - uint32_t bytes_per_loop); - - void incomingEvent(Event *ev) override { - Library::incomingEvent(ev); - } - - protected: - double loop_overhead_; - - private: - void init(SST::Params& params); - -}; - -} -} //end of namespace diff --git a/src/sst/elements/mercury/libraries/compute/lib_compute_memmove.cc b/src/sst/elements/mercury/libraries/compute/lib_compute_memmove.cc deleted file mode 100644 index e722ac7104..0000000000 --- a/src/sst/elements/mercury/libraries/compute/lib_compute_memmove.cc +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - - -#include -#include -#include -#include -#include -#include - -namespace SST { -namespace Hg { - -LibComputeMemmove::LibComputeMemmove(SST::Params& params, - SoftwareId id, OperatingSystem* os) : - LibComputeMemmove(params, "libmemmove", id, os) -{ -} - -LibComputeMemmove::LibComputeMemmove(SST::Params& params, - const char* prefix, SoftwareId sid, - OperatingSystem* os) : - LibComputeInst(params, prefix, sid, os) -{ - access_width_bytes_ = params.find("lib_compute_access_width", 64) / 8; -} - -void -LibComputeMemmove::doAccess(uint64_t bytes) -{ - uint64_t num_loops = bytes / access_width_bytes_; - int nflops = 0; - int nintops = 1; //memmove instruction - computeLoop(num_loops, nflops, nintops, access_width_bytes_); -} - -void -LibComputeMemmove::read(uint64_t bytes) -{ - CallGraphAppend(memread); - doAccess(bytes); -} - -void -LibComputeMemmove::write(uint64_t bytes) -{ - CallGraphAppend(memwrite); - doAccess(bytes); -} - -void -LibComputeMemmove::copy(uint64_t bytes) -{ - CallGraphAppend(memcopy); - doAccess(bytes); -} - - -} // end namespace Hg -} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/lib_compute_memmove.h b/src/sst/elements/mercury/libraries/compute/lib_compute_memmove.h deleted file mode 100644 index c84f778907..0000000000 --- a/src/sst/elements/mercury/libraries/compute/lib_compute_memmove.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#pragma once - -#include - -namespace SST { -namespace Hg { - -class LibComputeMemmove : - public LibComputeInst -{ - - public: - ~LibComputeMemmove() override {} - - LibComputeMemmove(SST::Params& params, SoftwareId id, - OperatingSystem* os); - - LibComputeMemmove(SST::Params& params, const char* prefix, SoftwareId id, - OperatingSystem* os); - - void incomingEvent(Event *ev) override{ - //forward to parent, which throws - Library::incomingEvent(ev); - } - - void read(uint64_t bytes); - - void write(uint64_t bytes); - - void copy(uint64_t bytes); - - protected: - static const long unlimited_page_size = -1; - static const long default_page_size = unlimited_page_size; - - void doAccess(uint64_t bytes); - - protected: - int access_width_bytes_; - -}; - -} // end namespace Hg -} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/lib_compute_time.cc b/src/sst/elements/mercury/libraries/compute/lib_compute_time.cc deleted file mode 100644 index 10d430d6ce..0000000000 --- a/src/sst/elements/mercury/libraries/compute/lib_compute_time.cc +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#include -#include -#include -#include -#include -#include - -namespace SST { -namespace Hg { - -LibComputeTime::LibComputeTime(SST::Params& params, SoftwareId id, - OperatingSystem* os) : - LibComputeTime(params, "libcomputetime", id, os) -{ -} - -LibComputeTime::LibComputeTime(SST::Params& params, - const char* prefix, SoftwareId id, - OperatingSystem* os) : - LibCompute(params, prefix, id, os) -{ -} - -LibComputeTime::LibComputeTime(SST::Params& params, - const std::string& name, SoftwareId id, - OperatingSystem* os) : - LibCompute(params, name, id, os) -{ -} - -LibComputeTime::~LibComputeTime() -{ -} - -void -LibComputeTime::compute(TimeDelta time) -{ - CallGraphAppend(ComputeTime); - if (time.sec() < 0) { - sprockit::abort("lib_compute_time can't compute for less than zero time"); - } - os_->compute(time); -} - -void -LibComputeTime::sleep(TimeDelta time) -{ - CallGraphAppend(Sleep); - os_->sleep(time); -} - -} // end namespace Hg -} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/lib_compute_time.h b/src/sst/elements/mercury/libraries/compute/lib_compute_time.h deleted file mode 100644 index 3fefbb623d..0000000000 --- a/src/sst/elements/mercury/libraries/compute/lib_compute_time.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#pragma once - -#include -#include -#include -//#include - -namespace SST { -namespace Hg { - -class LibComputeTime : - public LibCompute -{ - public: - LibComputeTime(SST::Params& params, SoftwareId id, - OperatingSystem* os); - - LibComputeTime(SST::Params& params, - const char* prefix, SoftwareId id, - OperatingSystem* os); - - LibComputeTime(SST::Params& params, - const std::string& name, SoftwareId id, - OperatingSystem* os); - - ~LibComputeTime() override; - - void incomingEvent(Event *ev) override{ - Library::incomingEvent(ev); - } - - void compute(TimeDelta time); - - void sleep(TimeDelta time); - -}; - -} // end namespace Hg -} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/lib_hybrid_compute.h b/src/sst/elements/mercury/libraries/compute/lib_hybrid_compute.h deleted file mode 100644 index fce5facf3d..0000000000 --- a/src/sst/elements/mercury/libraries/compute/lib_hybrid_compute.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#pragma once - -#include -#include - -namespace SST { -namespace Hg { - -class lib_hybrid_compute : - public LibComputeInst, - public libComputeMemmove -{ - - public: - - virtual - ~lib_hybrid_compute { - } - - protected: - lib_hybrid_compute(SoftwareId id); - - lib_hybrid_compute(const std::string& id); - -}; - -} // end namespace Hg -} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/memory_model.cc b/src/sst/elements/mercury/libraries/compute/memory_model.cc new file mode 100644 index 0000000000..600577686c --- /dev/null +++ b/src/sst/elements/mercury/libraries/compute/memory_model.cc @@ -0,0 +1,122 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#include +#include +#include +#include + +namespace SST { +namespace Hg { + +using Callback = ExecutionEvent; + +MemoryModel::MemoryModel(SST::Params ¶ms, NodeCL* parent) : + parent_node_(parent), + flowId_(0), + channelInterleaver_(0) +{ + flow_mtu_ = params.find("flow_mtu", "512").getRoundedValue(); + + auto max_bw = params.find("channel_bandwidth", "10.0 GB/s"); + channel_byte_delay_ = TimeDelta(max_bw.getValue().inverse().toDouble()); + + int num_channels = params.find("num_channels",4); + channels_.resize(num_channels); + for (ChannelQueue& q : channels_){ + q.byte_delay = channel_byte_delay_; + } + + flow_rsp_id_ = initialize( makeHandler(this, &MemoryModel::flowRequestResponse) ); +} + +int +MemoryModel::initialize(RequestHandlerBase* handler) +{ + int idx = rsp_handlers_.size(); + rsp_handlers_.push_back(handler); + return idx; +} + +void +MemoryModel::accessFlow(uint64_t bytes, TimeDelta byte_request_delay, Callback *cb) +{ + if (bytes == 0){ + parent_node_->os()->sendExecutionEventNow(cb); + return; + } + + uint32_t flowId = flowId_++; + // debug("Starting flow of size %" PRIu64 " on ID %" PRIu32 " with request delay %10.5e", + // bytes, flowId, byte_request_delay.sec()); + uint32_t initial_bytes = bytes % flow_mtu_; + if (initial_bytes == 0){ + initial_bytes = flow_mtu_; + } + + FlowRequest* req = new FlowRequest; + req->bytes = initial_bytes; + req->flowId = flowId; + auto* ev = newCallback(this, &MemoryModel::accessRequest, flow_rsp_id_, req); + TimeDelta delay = byte_request_delay * initial_bytes; + parent_node_->os()->sendDelayedExecutionEvent(delay, ev); + + Flow& f = flows_[flowId]; + f.bytesLeft = bytes - initial_bytes; + f.callback = cb; + f.byteRequestDelay = byte_request_delay; +} + +void +MemoryModel::flowRequestResponse(Request* req) +{ + FlowRequest* freq = static_cast(req); + Flow& f = flows_[freq->flowId]; + if (f.bytesLeft == 0){ + // debug("Receive %" PRIu32 " bytes of flow %" PRIu64 ": completing flow", + // req->bytes, freq->flowId); + //this is a bit weird... we have to add the delay of the final packet + //we are actually receiving the HEAD bit of the request right now + parent_node_->os()->sendDelayedExecutionEvent(req->bytes * channel_byte_delay_, f.callback); + flows_.erase(freq->flowId); + delete freq; + } else { + // debug("Receive %" PRIu32 " bytes of flow %" PRIu64 ": %" PRIu64 " bytes left", + // req->bytes, freq->flowId, f.bytesLeft); + f.bytesLeft -= flow_mtu_; //we have constructed so that the bytes left is always a multiple + freq->bytes = flow_mtu_; + auto* ev = newCallback(this, &MemoryModel::accessRequest, flow_rsp_id_, req); + TimeDelta delay = flow_mtu_ * f.byteRequestDelay; + parent_node_->os()->sendDelayedExecutionEvent(delay, ev); + } +} + +void +MemoryModel::accessRequest(int linkId, Request *req) +{ + req->rspId = linkId; + ChannelQueue& q = channels_[channelInterleaver_]; + q.next_free = std::max(q.next_free, parent_node_->os()->now()); + TimeDelta timeToSend = q.byte_delay * req->bytes; + //we send a response when the HEAD of the request is available + parent_node_->os()->sendExecutionEvent(q.next_free, newCallback(rsp_handlers_[linkId], &RequestHandlerBase::handle, req)); + q.next_free += timeToSend; + // debug("Channel %d busy with %d until %10.5e after delay of %10.5e", + // channelInterleaver_, linkId, q.next_free.sec(), timeToSend.sec()); + channelInterleaver_ = (channelInterleaver_ + 1) % channels_.size(); +} + +} // end namespace Hg +} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/compute/memory_model.h b/src/sst/elements/mercury/libraries/compute/memory_model.h new file mode 100644 index 0000000000..6fa20be076 --- /dev/null +++ b/src/sst/elements/mercury/libraries/compute/memory_model.h @@ -0,0 +1,104 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#pragma once + +#include +#include +#include +#include + +namespace SST { +namespace Hg { + +class MemoryModel { +public: + + struct Request { + uint32_t bytes; + uintptr_t addr; + uint32_t rspId; + }; + + struct RequestHandlerBase { + virtual void handle(Request* req) = 0; + }; + + template + class RequestHandler : public RequestHandlerBase { + public: + RequestHandler(T* t, Fxn f) : + t_(t), f_(f) + { + } + + void handle(Request* req) override { + (t_->*f_)(req); + } + private: + T* t_; + Fxn f_; + }; + + template + static RequestHandlerBase* makeHandler(T* t, Fxn f){ + return new RequestHandler(t,f); + } + + MemoryModel(SST::Params ¶ms, NodeCL *parent); + + ~MemoryModel() {} + + std::string toString() const { return "packet flow memory model"; } + + void accessFlow(uint64_t bytes, TimeDelta min_byte_delay, ExecutionEvent *cb); + + void accessRequest(int linkId, Request *req); + + void flowRequestResponse(Request *req); + +private: + + int initialize(RequestHandlerBase* handler); + + struct FlowRequest : public Request { + uint32_t flowId; + }; + + struct Flow { + ExecutionEvent *callback; + uint64_t bytesLeft; + TimeDelta byteRequestDelay; + }; + + struct ChannelQueue { + TimeDelta byte_delay; + std::vector reqs; + Timestamp next_free; + }; + + NodeCL *parent_node_; + std::vector rsp_handlers_; + TimeDelta channel_byte_delay_; + std::unordered_map flows_; + std::vector channels_; + uint32_t flowId_; + uint32_t channelInterleaver_; + uint32_t flow_mtu_; + int flow_rsp_id_; +}; + +} // end namespace Hg +} // end namespace SST diff --git a/src/sst/elements/mercury/libraries/system/replacements/unistd.h b/src/sst/elements/mercury/libraries/system/replacements/unistd.h index 8f14028de9..2799fa32a6 100644 --- a/src/sst/elements/mercury/libraries/system/replacements/unistd.h +++ b/src/sst/elements/mercury/libraries/system/replacements/unistd.h @@ -15,7 +15,7 @@ #pragma once -#include +#include #include_next #ifndef HOST_NAME_MAX @@ -23,7 +23,7 @@ #endif #ifndef SSTHG_NO_REPLACEMENTS -#define sleep SST::Hg::systemAPI::ssthg_sleep +#define sleep SST::Hg::SystemLibrary::ssthg_sleep #endif #define gethostname ssthg_gethostname diff --git a/src/sst/elements/mercury/libraries/system/system_api.h b/src/sst/elements/mercury/libraries/system/system_api.h index b7adb1d475..c127da0d1f 100644 --- a/src/sst/elements/mercury/libraries/system/system_api.h +++ b/src/sst/elements/mercury/libraries/system/system_api.h @@ -16,31 +16,15 @@ #pragma once -#include -#include -#include - namespace SST { namespace Hg { -class systemAPI : public SST::Hg::API { +class SystemAPI { public: - SST_ELI_REGISTER_DERIVED( - API, - systemAPI, - "hg", - "systemAPI", - SST_ELI_ELEMENT_VERSION(1,0,0), - "provides the Hg system API") - -systemAPI(SST::Params& params, App* app, SST::Component* comp); - -virtual ~systemAPI() { } - /** Block and return the time when unblocked */ -double ssthg_block(); +virtual double ssthg_block() = 0; /** * @brief sleep SST virtual equivalent of Linux sleep diff --git a/src/sst/elements/mercury/libraries/system/system_api.cc b/src/sst/elements/mercury/libraries/system/system_library.cc similarity index 91% rename from src/sst/elements/mercury/libraries/system/system_api.cc rename to src/sst/elements/mercury/libraries/system/system_library.cc index a56adee009..f497086401 100644 --- a/src/sst/elements/mercury/libraries/system/system_api.cc +++ b/src/sst/elements/mercury/libraries/system/system_library.cc @@ -13,14 +13,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#include +#include #include #include #include #include #include #include -//#include namespace SST { namespace Hg { @@ -30,20 +29,19 @@ extern template SST::TimeConverter* HgBase::time_converter_; using os = OperatingSystem; -systemAPI::systemAPI(SST::Params& params, App* app, - SST::Component* comp) : - API(params,app,comp) +SystemLibrary::SystemLibrary(SST::Params& params, App* app) : + Library(params,app) { } double -systemAPI::ssthg_block() +SystemLibrary::ssthg_block() { os::currentOs()->block(); return os::currentOs()->now().sec(); } unsigned int -systemAPI::ssthg_sleep(unsigned int secs){ +SystemLibrary::ssthg_sleep(unsigned int secs){ os* cos = os::currentOs(); Thread* t = cos->activeThread(); UnblockEvent* ev = new UnblockEvent(cos, t); diff --git a/src/sst/elements/mercury/libraries/system/system_library.h b/src/sst/elements/mercury/libraries/system/system_library.h new file mode 100644 index 0000000000..53a7fb7645 --- /dev/null +++ b/src/sst/elements/mercury/libraries/system/system_library.h @@ -0,0 +1,79 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + + +#pragma once + +#include +#include +#include +#include + +namespace SST { +namespace Hg { + +class SystemLibrary : public SST::Hg::Library { + +public: + + SST_ELI_REGISTER_DERIVED( + Library, + SystemLibrary, + "hg", + "SystemLibrary", + SST_ELI_ELEMENT_VERSION(1,0,0), + "implements the Hg system API") + +SystemLibrary(SST::Params& params, App* app); + +virtual ~SystemLibrary() { } + +/** Block and return the time when unblocked */ +double ssthg_block(); + +/** + * @brief sleep SST virtual equivalent of Linux sleep + * @param secs + * @return Always zero, successful return code for Linux + */ +static unsigned int ssthg_sleep(unsigned int secs); + +///** +// * @brief ssthg_usleep SST virtual equivalent of Linux usleep +// * @param usecs +// * @return Always zero, successful return code for Linux +// */ +//int ssthg_usleep(unsigned int usecs); + +//int ssthg_nanosleep(unsigned int nsecs); + +//int ssthg_msleep(unsigned int msecs); + +//int ssthg_fsleep(double secs); + +//void ssthg_memread(uint64_t bytes); + +//void ssthg_memwrite(uint64_t bytes); + +//void ssthg_memcopy(uint64_t bytes); + +//void* ssthg_alloc_stack(int sz, int md_sz); + +//void ssthg_free_stack(void* ptr); + +}; + +} // end namepace Hg +} // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/libraries/api.cc b/src/sst/elements/mercury/operating_system/libraries/api.cc deleted file mode 100644 index 36f7deabb5..0000000000 --- a/src/sst/elements/mercury/operating_system/libraries/api.cc +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#include -#include -#include -#include -#include -#include -#include - -namespace SST { -namespace Hg { - -extern template class HgBase; -extern template class HgBase; -extern template SST::TimeConverter* HgBase::time_converter_; - -static thread_lock the_api_lock; - -void -apiLock() { - the_api_lock.lock(); -} - -void -apiUnlock() { - the_api_lock.unlock(); -} - -API::~API() -{ -} - -SST::Hg::SoftwareId -API::sid() const { - return api_parent_app_->sid(); -} - -NodeId -API::addr() const { - return api_parent_app_->os()->addr(); -} - -Thread* -API::activeThread() -{ - return api_parent_app_->os()->activeThread(); -} - -void -API::startAPICall() -{ - activeThread()->startAPICall(); -} -void -API::endAPICall() -{ - activeThread()->endAPICall(); -} - -Timestamp -API::now() const -{ - return api_parent_app_->os()->now(); -} - -void -API::schedule(Timestamp t, ExecutionEvent* ev) -{ - api_parent_app_->os()->sendExecutionEvent(t, ev); -} - -void -API::scheduleDelay(TimeDelta t, ExecutionEvent* ev) -{ - api_parent_app_->os()->sendDelayedExecutionEvent(t, ev); -} - -API::API(SST::Params & /*params*/, App *parent, SST::Component*) : - api_parent_app_(parent) -{ } - -} // end namespace Hg -} // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/libraries/api.h b/src/sst/elements/mercury/operating_system/libraries/api.h deleted file mode 100644 index 6bb662afe1..0000000000 --- a/src/sst/elements/mercury/operating_system/libraries/api.h +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace SST { -namespace Hg { - -class API -{ - public: - SST_ELI_DECLARE_BASE(API) - SST_ELI_DECLARE_DEFAULT_INFO() - SST_ELI_DECLARE_CTOR(SST::Params&,App*,SST::Component*) - - virtual ~API(); - - SoftwareId sid() const; - - NodeId addr() const; - - App* parent() const { - return api_parent_app_; - } - - Thread* activeThread(); - - virtual void init(){} - - virtual void finish(){} - - Timestamp now() const; - - void schedule(Timestamp t, ExecutionEvent* ev); - - void scheduleDelay(TimeDelta t, ExecutionEvent* ev); - - /** - * @brief start_api_call - * Enter a call such as MPI_Send. Any perf counters or time counters - * collected since the last API call can then advance time or - * increment statistics. - */ - void startAPICall(); - - /** - * @brief end_api_call - * Exit a call such as MPI_Send. Perf counters or time counters - * collected since the last API call can then clear counters for - * the next time window. - */ - void endAPICall(); - - protected: - API(SST::Params& params, App* parent, SST::Component* comp); - App* api_parent_app_; - -}; - -void apiLock(); -void apiUnlock(); - -} // end namespace Hg -} // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/libraries/event_library.cc b/src/sst/elements/mercury/operating_system/libraries/event_library.cc new file mode 100644 index 0000000000..d4b6520ae4 --- /dev/null +++ b/src/sst/elements/mercury/operating_system/libraries/event_library.cc @@ -0,0 +1,56 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#include +#include + +namespace SST { +namespace Hg { + +extern template class HgBase; +extern template class HgBase; + +EventLibrary::EventLibrary(const std::string& libname, SoftwareId sid, OperatingSystem* os) : + os_(os), + sid_(sid), + addr_(os->addr()), + libname_(libname) +{ + os_->registerEventLib(this); +} + +EventLibrary::~EventLibrary() +{ + os_->unregisterEventLib(this); +} + +void +EventLibrary::incomingEvent(Event* /*ev*/) +{ + sst_hg_throw_printf(SST::Hg::UnimplementedError, + "%s::incomingEvent: this library should only block, never receive incoming", + toString().c_str()); +} + +void +EventLibrary::incomingRequest(Request* /*ev*/) +{ + sst_hg_throw_printf(SST::Hg::UnimplementedError, + "%s::incomingRequest: this library should only block, never receive incoming", + toString().c_str()); +} + +} // end namespace Hg +} // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/libraries/event_library.h b/src/sst/elements/mercury/operating_system/libraries/event_library.h new file mode 100644 index 0000000000..f8a2b6c1af --- /dev/null +++ b/src/sst/elements/mercury/operating_system/libraries/event_library.h @@ -0,0 +1,100 @@ +// Copyright 2009-2024 NTESS. Under the terms +// of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2024, NTESS +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// of the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace SST { +namespace Hg { + +class EventLibrary +{ + public: + std::string toString() const { + return libname_; + } + + const std::string& libName() const { + return libname_; + } + + virtual void incomingEvent(Event* ev) = 0; + + virtual void incomingRequest(Request* req) = 0; + + OperatingSystem* os() const { + return os_; + } + + SoftwareId sid() const { + return sid_; + } + + int aid() const { + return sid_.app_; + } + + NodeId addr() const { + return addr_; + } + + virtual ~EventLibrary(); + + protected: + EventLibrary(const std::string& libname, SoftwareId sid, OperatingSystem* os); + + EventLibrary(const char* prefix, SoftwareId sid, OperatingSystem* os) : + EventLibrary(standardLibname(prefix, sid), sid, os) + { + } + + static std::string standardLibname(const char* prefix, SoftwareId sid){ + return standardLibname(prefix, sid.app_, sid.task_); + } + + static std::string standardLibname(const char* prefix, AppId aid, TaskId tid){ + std::string app_prefix = standardAppPrefix(prefix, aid); + return standardAppLibname(app_prefix.c_str(), tid); + } + + static std::string standardAppLibname(const char* prefix, TaskId tid){ + return SST::Hg::sprintf("%s-%d", prefix, tid); + } + + static std::string standardAppPrefix(const char* prefix, AppId aid){ + return SST::Hg::sprintf("%s-%d", prefix, aid); + } + + protected: + OperatingSystem* os_; + SoftwareId sid_; + NodeId addr_; + + private: + std::string libname_; + +}; + +} // end namespace Hg +} // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/process/compute_scheduler_fwd.h b/src/sst/elements/mercury/operating_system/libraries/event_library_fwd.h similarity index 93% rename from src/sst/elements/mercury/operating_system/process/compute_scheduler_fwd.h rename to src/sst/elements/mercury/operating_system/libraries/event_library_fwd.h index 8880bc60be..ceea58758b 100644 --- a/src/sst/elements/mercury/operating_system/process/compute_scheduler_fwd.h +++ b/src/sst/elements/mercury/operating_system/libraries/event_library_fwd.h @@ -18,7 +18,8 @@ namespace SST { namespace Hg { -class ComputeScheduler; +class EventLibrary; +class library_builder; } // end namespace Hg } // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/libraries/library.cc b/src/sst/elements/mercury/operating_system/libraries/library.cc index bcdf5a78d6..5dcdc6bd0d 100644 --- a/src/sst/elements/mercury/operating_system/libraries/library.cc +++ b/src/sst/elements/mercury/operating_system/libraries/library.cc @@ -13,44 +13,85 @@ // information, see the LICENSE file in the top level directory of the // distribution. +#include #include +#include +#include #include +#include +#include namespace SST { namespace Hg { extern template class HgBase; extern template class HgBase; +extern template SST::TimeConverter* HgBase::time_converter_; -Library::Library(const std::string& libname, SoftwareId sid, OperatingSystem* os) : - os_(os), - sid_(sid), - addr_(os->addr()), - libname_(libname) -{ - os_->registerLib(this); +static thread_lock the_api_lock; + +void +apiLock() { + the_api_lock.lock(); +} + +void +apiUnlock() { + the_api_lock.unlock(); } Library::~Library() { - os_->unregisterLib(this); +} + +SST::Hg::SoftwareId +Library::sid() const { + return api_parent_app_->sid(); +} + +NodeId +Library::addr() const { + return api_parent_app_->os()->addr(); +} + +Thread* +Library::activeThread() +{ + return api_parent_app_->os()->activeThread(); +} + +void +Library::startLibraryCall() +{ + activeThread()->startLibraryCall(); +} +void +Library::endLibraryCall() +{ + activeThread()->endLibraryCall(); +} + +Timestamp +Library::now() const +{ + return api_parent_app_->os()->now(); } void -Library::incomingEvent(Event* /*ev*/) +Library::schedule(Timestamp t, ExecutionEvent* ev) { - sst_hg_throw_printf(SST::Hg::UnimplementedError, - "%s::incomingEvent: this library should only block, never receive incoming", - toString().c_str()); + api_parent_app_->os()->sendExecutionEvent(t, ev); } void -Library::incomingRequest(Request* /*ev*/) +Library::scheduleDelay(TimeDelta t, ExecutionEvent* ev) { - sst_hg_throw_printf(SST::Hg::UnimplementedError, - "%s::incomingRequest: this library should only block, never receive incoming", - toString().c_str()); + api_parent_app_->os()->sendDelayedExecutionEvent(t, ev); } +Library::Library(SST::Params & params, App *parent) : + api_parent_app_(parent) +{ } + } // end namespace Hg } // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/libraries/library.h b/src/sst/elements/mercury/operating_system/libraries/library.h index 1510fa3fc0..83267d9771 100644 --- a/src/sst/elements/mercury/operating_system/libraries/library.h +++ b/src/sst/elements/mercury/operating_system/libraries/library.h @@ -15,16 +15,17 @@ #pragma once -#include +#include +#include +#include +#include #include -#include -#include -#include #include -#include -#include -#include - +#include +#include +#include +#include +#include namespace SST { namespace Hg { @@ -32,70 +33,56 @@ namespace Hg { class Library { public: - std::string toString() const { - return libname_; - } - - const std::string& libName() const { - return libname_; - } + SST_ELI_DECLARE_BASE(Library) + SST_ELI_DECLARE_DEFAULT_INFO() + SST_ELI_DECLARE_CTOR(SST::Params&,SST::Hg::App*) - virtual void incomingEvent(Event* ev) = 0; + virtual ~Library(); - virtual void incomingRequest(Request* req) = 0; + SoftwareId sid() const; - OperatingSystem* os() const { - return os_; - } - - SoftwareId sid() const { - return sid_; - } + NodeId addr() const; - int aid() const { - return sid_.app_; + App* parent() const { + return api_parent_app_; } - NodeId addr() const { - return addr_; - } + Thread* activeThread(); - virtual ~Library(); + virtual void init(){} - protected: - Library(const std::string& libname, SoftwareId sid, OperatingSystem* os); + virtual void finish(){} - Library(const char* prefix, SoftwareId sid, OperatingSystem* os) : - Library(standardLibname(prefix, sid), sid, os) - { - } + Timestamp now() const; - static std::string standardLibname(const char* prefix, SoftwareId sid){ - return standardLibname(prefix, sid.app_, sid.task_); - } + void schedule(Timestamp t, ExecutionEvent* ev); - static std::string standardLibname(const char* prefix, AppId aid, TaskId tid){ - std::string app_prefix = standardAppPrefix(prefix, aid); - return standardAppLibname(app_prefix.c_str(), tid); - } + void scheduleDelay(TimeDelta t, ExecutionEvent* ev); - static std::string standardAppLibname(const char* prefix, TaskId tid){ - return SST::Hg::sprintf("%s-%d", prefix, tid); - } + /** + * @brief start_api_call + * Enter a call such as MPI_Send. Any perf counters or time counters + * collected since the last API call can then advance time or + * increment statistics. + */ + void startLibraryCall(); - static std::string standardAppPrefix(const char* prefix, AppId aid){ - return SST::Hg::sprintf("%s-%d", prefix, aid); - } + /** + * @brief end_api_call + * Exit a call such as MPI_Send. Perf counters or time counters + * collected since the last API call can then clear counters for + * the next time window. + */ + void endLibraryCall(); protected: - OperatingSystem* os_; - SoftwareId sid_; - NodeId addr_; - - private: - std::string libname_; + Library(SST::Params& params, App* parent); + App* api_parent_app_; }; +void apiLock(); +void apiUnlock(); + } // end namespace Hg } // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/libraries/library_fwd.h b/src/sst/elements/mercury/operating_system/libraries/library_fwd.h index 69ccb46a9b..da24551e76 100644 --- a/src/sst/elements/mercury/operating_system/libraries/library_fwd.h +++ b/src/sst/elements/mercury/operating_system/libraries/library_fwd.h @@ -19,7 +19,6 @@ namespace SST { namespace Hg { class Library; -class library_builder; } // end namespace Hg } // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/libraries/service.h b/src/sst/elements/mercury/operating_system/libraries/service.h index 2ac2f786f0..29f072dbc1 100644 --- a/src/sst/elements/mercury/operating_system/libraries/service.h +++ b/src/sst/elements/mercury/operating_system/libraries/service.h @@ -16,13 +16,13 @@ #pragma once #include -#include +#include namespace SST { namespace Hg { class Service : - public Library + public EventLibrary { public: @@ -30,11 +30,11 @@ class Service : protected: Service(const std::string& libname, SoftwareId sid, OperatingSystem* os) : - Library(libname, sid, os) + EventLibrary(libname, sid, os) {} Service(const char* prefix, SoftwareId sid, OperatingSystem* os) : - Library(prefix, sid, os) + EventLibrary(prefix, sid, os) {} ~Service() override{} diff --git a/src/sst/elements/mercury/operating_system/process/app.cc b/src/sst/elements/mercury/operating_system/process/app.cc index 854d555138..5491fa0e21 100644 --- a/src/sst/elements/mercury/operating_system/process/app.cc +++ b/src/sst/elements/mercury/operating_system/process/app.cc @@ -111,31 +111,31 @@ App::unlockDlopen(int aid) } void -App::lockDlopen_API(std::string api_name) +App::lockDlopen_Library(std::string api_name) { dlopen_entry& entry = api_dlopens_[api_name]; entry.refcount++; } void -App::unlockDlopen_API(std::string api_name) +App::unlockDlopen_Library(std::string api_name) { - dlcloseCheck_API(api_name); + dlcloseCheck_Library(api_name); } void App::dlopenCheck(int aid, SST::Params& params, bool check_name) { - std::vector apis; - if (params.contains("apis")){ - params.find_array("apis", apis); + std::vector libs; + if (params.contains("libraries")){ + params.find_array("libraries", libs); } else { - apis.push_back("systemAPI:libsystemapi.so"); + libs.push_back("SystemLibrary:libsystemlibrary.so"); } - // parse apis and dlopen the libraries - for (auto& str : apis){ + // parse libs and dlopen them + for (auto& str : libs){ std::string name; std::string file; auto pos = str.find(":"); @@ -211,7 +211,7 @@ App::dlcloseCheck(int aid) } void -App::dlcloseCheck_API(std::string api_name) +App::dlcloseCheck_Library(std::string api_name) { dlopen_lock.lock(); auto iter = api_dlopens_.find(api_name); @@ -264,14 +264,14 @@ App::App(SST::Params& params, SoftwareId sid, env_[key] = env_params.find(key); } - std::vector apis; - if (params.contains("apis")){ - params.find_array("apis", apis); + std::vector libs; + if (params.contains("libraries")){ + params.find_array("libraries", libs); } else { - apis.push_back("systemAPI:libsystemapi.so"); + libs.push_back("SystemLibrary:libsystemlibrary.so"); } - for (auto& str : apis){ + for (auto& str : libs){ std::string alias; std::string name; auto pos = str.find(":"); @@ -283,16 +283,20 @@ App::App(SST::Params& params, SoftwareId sid, alias = str.substr(pos + 1); } - out_->debug(CALL_INFO, 1, 0, "checking %s API\n", name.c_str()); + out_->debug(CALL_INFO, 1, 0, "checking %s\n", name.c_str()); if (name != "SimTransport") { auto iter = apis_.find(name); if (iter == apis_.end()){ - out_->debug(CALL_INFO, 1, 0, "loading %s API\n", name.c_str()); - SST::Params api_params = params.get_scoped_params(name); - API* api = SST::Hg::create( - "hg", name, api_params, this, os->node()); - apis_[name] = api; + out_->debug(CALL_INFO, 1, 0, "loading %s\n", name.c_str()); + // It'll take some work to make this possible in pymerlin + //SST::Params lib_params = params.get_scoped_params(name); + //lib_params.print_all_params(std::cerr); + // Library* lib = SST::Hg::create( + // "hg", name, lib_params, this); + Library *lib = + SST::Hg::create("hg", name, params, this); + apis_[name] = lib; } apis_[alias] = apis_[name]; } @@ -361,6 +365,14 @@ App::~App() if (globals_storage_) delete[] globals_storage_; } +void +App::addAPI(std::string name, Library* lib) { + auto iter = apis_.find(name); + if (iter == apis_.end()) { + apis_[name] = lib; + } +} + std::ostream& App::coutStream(){ if (cout_.is_open()){ @@ -440,19 +452,17 @@ App::cleanup() Thread::cleanup(); } -void -App::sleep(TimeDelta time) -{ - os_->blockTimeout(time); - //computeLib()->sleep(time); -} +// void +// App::sleep(TimeDelta time) +// { +// os_->blockTimeout(time); +// } -void -App::compute(TimeDelta time) -{ - os_->blockTimeout(time); - //computeLib()->compute(time); -} +// void +// App::compute(TimeDelta time) +// { +// os_->blockTimeout(time); +// } SST::Params App::getParams() @@ -460,12 +470,12 @@ App::getParams() return OperatingSystem::currentThread()->parentApp()->params(); } -API* -App::getAPI(const std::string &name) +Library* +App::getLibrary(const std::string &name) { auto iter = apis_.find(name); if (iter == apis_.end()){ - sst_hg_abort_printf("API %s not found for app %d", + sst_hg_abort_printf("Library %s not found for app %d", name.c_str(), aid()); } return iter->second; @@ -474,33 +484,20 @@ App::getAPI(const std::string &name) void App::run() { -// CallGraphAppend(main); -// os_->incrementAppRefcount(); - endAPICall(); //this initializes things, "fake" api call at beginning + endLibraryCall(); //this initializes things, "fake" api call at beginning rc_ = skeletonMain(); //we are ending but perform the equivalent //to a start api call to flush any compute - startAPICall(); + startLibraryCall(); - std::set unique; + std::set unique; //because of aliasing... for (auto& pair : apis_){ unique.insert(pair.second); } apis_.clear(); - for (API* api : unique) delete api; - - //now we have to send a message to the job launcher to let it know we are done -// os_->decrementAppRefcount(); - //for now assume that the application has finished with a barrier - which is true of like everything -// if (sid_.task_ == 0 && notify_){ -// int launchRoot = os_->node()->launchRoot(); -// JobStopRequest* lev = new JobStopRequest(os_->node()->allocateUniqueId(), -// sid_.app_, unique_name_, launchRoot, os_->addr()); -// os_->nicCtrlIoctl()(lev); -// } -// TaskMapping::removeGlobalMapping(sid_.app_, unique_name_); -// ThreadInfo::deregisterUserSpaceVirtualThread(stack_); + for (Library* api : unique) delete api; + dlcloseCheck(); app_rc_ = rc_; diff --git a/src/sst/elements/mercury/operating_system/process/app.h b/src/sst/elements/mercury/operating_system/process/app.h index ac643544c0..e0eb2be59f 100644 --- a/src/sst/elements/mercury/operating_system/process/app.h +++ b/src/sst/elements/mercury/operating_system/process/app.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include @@ -68,9 +68,9 @@ class App : public Thread static void deleteStatics(); - void sleep(TimeDelta time); + // void sleep(TimeDelta time); - void compute(TimeDelta time); + // void compute(TimeDelta time); ~App() override; @@ -100,6 +100,8 @@ class App : public Thread OperatingSystem* os() {return os_;} + void addAPI(std::string,Library*); + /** * Let a parent application know about the existence of a subthread * If thread does not have an initialized ID, a unique ID is allocated for the thread @@ -178,11 +180,11 @@ class App : public Thread static void unlockDlopen(int aid); - static void dlcloseCheck_API(std::string api_name); + static void dlcloseCheck_Library(std::string api_name); - static void lockDlopen_API(std::string api_name); + static void lockDlopen_Library(std::string api_name); - static void unlockDlopen_API(std::string api_name); + static void unlockDlopen_Library(std::string api_name); static int appRC(){ return app_rc_; @@ -196,6 +198,8 @@ class App : public Thread return stderr_; } + Library* getLibrary(const std::string& name); + std::ostream& coutStream(); std::ostream& cerrStream(); @@ -208,8 +212,7 @@ class App : public Thread SST::Params params_; private: - API* getAPI(const std::string& name); - + void dlcloseCheck(){ dlcloseCheck(aid()); } @@ -228,7 +231,7 @@ class App : public Thread std::map subthreads_; std::map tls_key_fxns_; // these can alias - so I can't use unique_ptr - std::map apis_; + std::map apis_; std::map env_; char env_string_[64]; diff --git a/src/sst/elements/mercury/operating_system/process/compute_scheduler.h b/src/sst/elements/mercury/operating_system/process/compute_scheduler.h deleted file mode 100644 index 3d25bd36b3..0000000000 --- a/src/sst/elements/mercury/operating_system/process/compute_scheduler.h +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#pragma once - -#include -#include -#include -#include -#include -#include - -namespace SST { -namespace Hg { - -class ComputeScheduler -{ - public: - SST_ELI_DECLARE_BASE(ComputeScheduler) - SST_ELI_DECLARE_DEFAULT_INFO() - SST_ELI_DECLARE_CTOR(SST::Params&, OperatingSystem*, int/*ncores*/, int/*nsockets*/) - - ComputeScheduler(SST::Params& /*params*/, OperatingSystem* os, - int ncores, int nsockets) : - ncores_(ncores), - nsocket_(nsockets), - os_(os) - { - } - - virtual ~ComputeScheduler() {} - - - int ncores() const { - return ncores_; - } - - int nsockets() const { - return nsocket_; - } - - /** - * @brief reserve_core - * @param thr The physical thread requesting to compute - */ - virtual void reserveCores(int ncore, Thread* thr) = 0; - - virtual void releaseCores(int ncore, Thread* thr) = 0; - - - protected: - int ncores_; - int nsocket_; - int cores_per_socket_; - OperatingSystem* os_; - -}; - -} // end namespace Hg -} // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/process/simple_compute_scheduler.cc b/src/sst/elements/mercury/operating_system/process/simple_compute_scheduler.cc deleted file mode 100644 index 9830a80a53..0000000000 --- a/src/sst/elements/mercury/operating_system/process/simple_compute_scheduler.cc +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#include -#include -#include - -namespace SST { -namespace Hg { - -extern template class HgBase; -extern template class HgBase; - -void -SimpleComputeScheduler::reserveCores(int ncores, Thread* thr) -{ -//#if SST_HG_SANITY_CHECK -// if (ncore_active_ > ncores_){ -// spkt_abort_printf( -// "simple_compute_scheduler::reserve_core: %d cores active, only %d cores total", -// ncore_active_, ncores_); -// } -//#endif - int total_cores_needed = ncores + ncore_active_; - while (total_cores_needed > ncores_){ -// debug_printf(sprockit::dbg::compute_scheduler, -// "Need %d cores, have %d for thread %ld - blocking", -// ncores, ncores_ - ncore_active_, thr->threadId()); - pending_threads_.emplace_back(ncores, thr); - os_->block(); - //we can accidentally unblock due to "race" conditions - //reset the core check to make sure we have what we need - total_cores_needed = ncores + ncore_active_; - } -//#if SST_HG_SANITY_CHECK -// if (ncores > (ncores_ - ncore_active_)){ -// spkt_abort_printf( -// "simple_compute_scheduler::reserve_core: %d cores free, but needed %d for thread %d", -// ncores_ - ncore_active_, ncores_, thr->threadId()); -// } -//#endif -// debug_printf(sprockit::dbg::compute_scheduler, -// "Reserved %d cores for thread %ld", -// ncores, thr->threadId()); - //no worrying about masks - for (int i=ncore_active_; i < ncore_active_ + ncores; ++i){ - thr->addActiveCore(i); - } - ncore_active_ += ncores; -} - -void -SimpleComputeScheduler::releaseCores(int ncores, Thread* thr) -{ - ncore_active_ -= ncores; -// debug_printf(sprockit::dbg::compute_scheduler, -// "Released %d cores for thread %ld - now %d active, %d free", -// ncores, thr->threadId(), ncore_active_, ncores_ - ncore_active_); - for (int i=0; i < ncores; ++i){ - thr->popActiveCore(); - } - - - int nfree_cores = ncores_ - ncore_active_; - Thread* to_unblock = nullptr; - for (auto iter = pending_threads_.begin(); iter != pending_threads_.end(); ++iter){ - auto pair = *iter; - int ncores_needed = pair.first; -// debug_printf(sprockit::dbg::compute_scheduler, -// "Thread %d trying to restart thread %d with %d free cores - need %d", -// thr->threadId(), pair.second->threadId(), -// nfree_cores, ncores_needed); - if (nfree_cores >= ncores_needed){ - pending_threads_.erase(iter); - to_unblock = pair.second; - break; - } - } - if (to_unblock){ - os_->unblock(to_unblock); - } -} - -} // end namespace Hg -} // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/process/simple_compute_scheduler.h b/src/sst/elements/mercury/operating_system/process/simple_compute_scheduler.h deleted file mode 100644 index b889d30bb8..0000000000 --- a/src/sst/elements/mercury/operating_system/process/simple_compute_scheduler.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#pragma once - -#include -#include - -namespace SST { -namespace Hg { - -class SimpleComputeScheduler : public ComputeScheduler -{ - public: - SST_ELI_REGISTER_DERIVED( - ComputeScheduler, - SimpleComputeScheduler, - "hg", - "simple", - SST_ELI_ELEMENT_VERSION(1,0,0), - "Compute scheduler that migrates work to any open core") - - SimpleComputeScheduler(SST::Params& params, OperatingSystem* os, - int ncore, int nsocket) - : ComputeScheduler(params, os, ncore, nsocket), - ncore_active_(0) - {} - - void reserveCores(int ncore, Thread* thr) override; - - void releaseCores(int ncore, Thread* thr) override; - - private: - std::list> pending_threads_; - int ncore_active_; -}; - -} // end namespace Hg -} // end namespace SST diff --git a/src/sst/elements/mercury/operating_system/process/thread.cc b/src/sst/elements/mercury/operating_system/process/thread.cc index 0f780069d0..df9cd315da 100644 --- a/src/sst/elements/mercury/operating_system/process/thread.cc +++ b/src/sst/elements/mercury/operating_system/process/thread.cc @@ -164,7 +164,7 @@ Thread::Thread(SST::Params& params, SoftwareId sid, OperatingSystem* os) : } void -Thread::startAPICall() +Thread::startLibraryCall() { // if (host_timer_){ // double duration = host_timer_->stamp(); @@ -175,7 +175,7 @@ Thread::startAPICall() } void -Thread::endAPICall() +Thread::endLibraryCall() { // if (host_timer_){ // host_timer_->start(); @@ -194,10 +194,10 @@ Thread::initId() return thread_id_; } -API* -Thread::getAppApi(const std::string &name) const +Library* +Thread::getAppLibrary(const std::string &name) const { - return parentApp()->getAPI(name); + return parentApp()->getLibrary(name); } void* diff --git a/src/sst/elements/mercury/operating_system/process/thread.h b/src/sst/elements/mercury/operating_system/process/thread.h index 7acc2b0836..918f6b27f0 100644 --- a/src/sst/elements/mercury/operating_system/process/thread.h +++ b/src/sst/elements/mercury/operating_system/process/thread.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -68,11 +68,11 @@ class Thread static Thread* current(); - template T* getApi(const std::string& name) { - API* a = getAppApi(name); + template T* getLibrary(const std::string& name) { + Library* a = getAppLibrary(name); T* casted = dynamic_cast(a); if (!casted) { - sst_hg_abort_printf("Failed to cast API to correct type for %s: got %s", + sst_hg_abort_printf("Failed to cast Library to correct type for %s: got %s", name.c_str(), typeid(a).name()); } return casted; @@ -266,8 +266,8 @@ class Thread return active_cores_.size(); } - void computeDetailed(uint64_t flops, uint64_t intops, - uint64_t bytes, int nthread=use_omp_num_threads); + // void computeDetailed(uint64_t flops, uint64_t intops, + // uint64_t bytes, int nthread=use_omp_num_threads); void* getTlsValue(long thekey) const; @@ -275,9 +275,9 @@ class Thread Timestamp now(); - void startAPICall(); + void startLibraryCall(); - void endAPICall(); + void endLibraryCall(); protected: Thread(SST::Params& params, @@ -328,7 +328,7 @@ class Thread // HostTimer* host_timer_; private: - API* getAppApi(const std::string& name) const; + SST::Hg::Library* getAppLibrary(const std::string& name) const; int last_bt_collect_nfxn_; diff --git a/src/sst/elements/mercury/pymercury.py b/src/sst/elements/mercury/pymercury.py index ebd95d8215..d35e4d375d 100644 --- a/src/sst/elements/mercury/pymercury.py +++ b/src/sst/elements/mercury/pymercury.py @@ -50,13 +50,21 @@ class HgNode(TemplateBase): def __init__(self): TemplateBase.__init__(self) - self._declareParams("params",["verbose",]) + self._declareParams("params",["name", + "verbose", + "negligible_compute_bytes", + "parallelism", + "frequency", + "flow_mtu", + "channel_bandwidth", + "num_channels", + ]) self._subscribeToPlatformParamSet("node") def build(self,nid,lid,nranks): if self._check_first_build(): sst.addGlobalParams("params_%s"%self._instance_name, self._getGroupParams("params")) - node = sst.Component("node" + str(nid), "hg.node") + node = sst.Component("node" + str(nid), self.name) node.addGlobalParamSet("params_%s"%self._instance_name) node.addParam("nodeID", nid) node.addParam("logicalID", lid) @@ -80,13 +88,31 @@ class HgOS(TemplateBase): def __init__(self): TemplateBase.__init__(self) - self._declareParams("params",["verbose",]) - self._declareParamsWithUserPrefix("params","app1",["name","exe","apis","verbose"],"app1.") + self._declareParams("params",["name", + "verbose", + "ncores", + "nsockets", + ]) + self._declareParamsWithUserPrefix("params","app1", + ["name", + "exe", + "libraries", + "verbose", + "post_rdma_delay", + "post_header_delay", + "poll_delay", + "rdma_pin_latency", + "rdma_page_delay", + "rdma_page_size", + "compute_library_access_width", + "compute_library_loop_overhead", + ], + "app1.") self._subscribeToPlatformParamSet("operating_system") def build(self,comp,slot): if self._check_first_build(): sst.addGlobalParams("params_%s"%self._instance_name, self._getGroupParams("params")) - sub = comp.setSubComponent(slot,"hg.operating_system") + sub = comp.setSubComponent(slot,self.name) sub.addGlobalParamSet("params_%s"%self._instance_name) return sub diff --git a/src/sst/elements/mercury/tests/ostest.py b/src/sst/elements/mercury/tests/ostest.py index 12a06355b9..b9338af1da 100644 --- a/src/sst/elements/mercury/tests/ostest.py +++ b/src/sst/elements/mercury/tests/ostest.py @@ -1,10 +1,10 @@ import sst import sst.hg -node0 = sst.Component("Node0", "hg.node") -node1 = sst.Component("Node1", "hg.node") -os0 = node0.setSubComponent("os_slot", "hg.operating_system") -os1 = node1.setSubComponent("os_slot", "hg.operating_system") +node0 = sst.Component("Node0", "hg.Node") +node1 = sst.Component("Node1", "hg.Node") +os0 = node0.setSubComponent("os_slot", "hg.OperatingSystem") +os1 = node1.setSubComponent("os_slot", "hg.OperatingSystem") link0 = sst.Link("link0") link0.connect( (node0,"network","1ns"), (node1,"network","1ns") ) From bd88fd03c2eb50c96ef4cf7e761d53c1c8c563b3 Mon Sep 17 00:00:00 2001 From: jpkenny Date: Sun, 8 Dec 2024 22:29:20 -0800 Subject: [PATCH 2/2] Mercury: remove duplicate header from Makefile.am --- src/sst/elements/mercury/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sst/elements/mercury/Makefile.am b/src/sst/elements/mercury/Makefile.am index d6db4d1049..a1b1167af1 100644 --- a/src/sst/elements/mercury/Makefile.am +++ b/src/sst/elements/mercury/Makefile.am @@ -133,7 +133,6 @@ nobase_library_include_HEADERS = \ components/node_CL.h \ components/node_CL_fwd.h \ components/operating_system_base.h \ - components/operating_system_fwd.h \ components/operating_system.h \ components/operating_system_fwd.h \ components/operating_system_CL.h \