Skip to content

Commit

Permalink
Merge pull request #650 from abouteiller/hotfix/atomic_hwloc_init
Browse files Browse the repository at this point in the history
Initialize the parsec's HWLOC subsystem before starting threads.
  • Loading branch information
abouteiller authored Apr 17, 2024
2 parents e95ec85 + e43e4a5 commit 74d9dcd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
11 changes: 11 additions & 0 deletions tests/class/atomics.c
Original file line number Diff line number Diff line change
@@ -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 <stdlib.h>
#include <stdio.h>
#include <string.h>
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions tests/class/future.c
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -13,7 +13,6 @@
#include <signal.h>
#include <stdarg.h>
#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"
Expand Down
4 changes: 1 addition & 3 deletions tests/class/future_datacopy.c
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -13,8 +13,6 @@
#include <signal.h>
#include <stdarg.h>
#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"

Expand Down
3 changes: 1 addition & 2 deletions tests/class/lifo.c
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand All @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions tests/class/list.c
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand All @@ -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;
Expand Down

0 comments on commit 74d9dcd

Please sign in to comment.