From e43e4a5da736abbc89f66f12f29336539a14ba38 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Sun, 3 Mar 2024 16:27:00 +0000 Subject: [PATCH] Initialize the parsec's HWLOC subsystem before starting threads. Signed-off-by: George Bosilca --- tests/class/atomics.c | 11 +++++++++++ tests/class/future.c | 3 +-- tests/class/future_datacopy.c | 4 +--- tests/class/lifo.c | 3 +-- tests/class/list.c | 3 +-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/class/atomics.c b/tests/class/atomics.c index 4b6b465fb..fc7f0ecbb 100644 --- a/tests/class/atomics.c +++ b/tests/class/atomics.c @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2018-2024 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2023-2024 NVIDIA CORPORATION. All rights reserved. + */ + #include #include #include @@ -7,6 +14,7 @@ #include "parsec/sys/atomic.h" #include "parsec/bindthread.h" #include "parsec/class/barrier.h" +#include "parsec/parsec_hwloc.h" typedef struct { int32_t mo32; @@ -284,6 +292,9 @@ int main(int argc, char *argv[]) #endif } + /* Make sure the HWLOC subsystem is ready for binding */ + parsec_hwloc_init(); + for(i = 0; i < nb_threads; i++) { params[i].nb_tests = nb_tests; params[i].thid = i; diff --git a/tests/class/future.c b/tests/class/future.c index 2a33839e0..ff3ee4f05 100644 --- a/tests/class/future.c +++ b/tests/class/future.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 The University of Tennessee and The University + * Copyright (c) 2018-2024 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2023 NVIDIA CORPORATION. All rights reserved. @@ -13,7 +13,6 @@ #include #include #include "parsec/parsec_config.h" -#include "parsec/bindthread.h" #include "parsec/parsec_hwloc.h" #include "parsec/os-spec-timing.h" #include "parsec/utils/mca_param.h" diff --git a/tests/class/future_datacopy.c b/tests/class/future_datacopy.c index 7e941ed48..effad1fe7 100644 --- a/tests/class/future_datacopy.c +++ b/tests/class/future_datacopy.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 The University of Tennessee and The University + * Copyright (c) 2018-2024 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2023 NVIDIA CORPORATION. All rights reserved. @@ -13,8 +13,6 @@ #include #include #include "parsec/parsec_config.h" -#include "parsec/bindthread.h" -#include "parsec/parsec_hwloc.h" #include "parsec/os-spec-timing.h" #include "parsec/utils/mca_param.h" diff --git a/tests/class/lifo.c b/tests/class/lifo.c index ca4c2370c..907d215d7 100644 --- a/tests/class/lifo.c +++ b/tests/class/lifo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 The University of Tennessee and The University + * Copyright (c) 2009-2024 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. */ @@ -20,7 +20,6 @@ #include "parsec/class/lifo.h" #include "parsec/os-spec-timing.h" -#include "parsec/bindthread.h" static unsigned int NBELT = 8192; static unsigned int NBTIMES = 1000000; diff --git a/tests/class/list.c b/tests/class/list.c index 3d9ae9de8..d85a728bb 100644 --- a/tests/class/list.c +++ b/tests/class/list.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 The University of Tennessee and The University + * Copyright (c) 2009-2024 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. */ @@ -20,7 +20,6 @@ #endif #include "parsec/class/list.h" #include "parsec/os-spec-timing.h" -#include "parsec/bindthread.h" static unsigned int NBELT = 8192; static unsigned int NBTIMES = 1000000;