Skip to content

Commit 205ee16

Browse files
npe9hppritcha
authored andcommitted
Add threads framework
Add a framework to support different types of threading models including user space thread packages such as Qthreads and argobot: https://github.com/pmodels/argobots https://github.com/Qthreads/qthreads The default threading model is pthreads. Alternate thread models are specificed at configure time using the --with-threads=X option. The framework is static. The theading model to use is selected at Open MPI configure/build time. mca/threads: implement Argobots threading layer config: fix thread configury - Add double quotations - Change Argobot to Argobots config: implement Argobots check If the poll time is too long, MPI hangs. This quick fix just sets it to 0, but it is not good for the Pthreads version. Need to find a good way to abstract it. Note that even 1 (= 1 millisecond) causes disastrous performance degradation. rework threads MCA framework configury It now works more like the ompi/mca/rte configury, modulo some edge items that are special for threading package linking, etc. qthreads module some argobots cleanup Signed-off-by: Noah Evans <[email protected]> Signed-off-by: Shintaro Iwasaki <[email protected]> Signed-off-by: Howard Pritchard <[email protected]>
1 parent b3f0bc5 commit 205ee16

File tree

141 files changed

+3402
-763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+3402
-763
lines changed

config/opal_check_pthread_pids.m4

Lines changed: 0 additions & 112 deletions
This file was deleted.

config/opal_config_threads.m4

Lines changed: 0 additions & 69 deletions
This file was deleted.

configure.ac

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
# Copyright (c) 2018 Amazon.com, Inc. or its affiliates.
2727
# All Rights reserved.
2828
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
29+
# Copyright (c) 2019 Triad National Security, LLC. All rights
30+
# reserved.
2931
# $COPYRIGHT$
3032
#
3133
# Additional copyrights may follow
@@ -945,22 +947,6 @@ OPAL_CHECK_BROKEN_QSORT
945947
# all: type of getsockopt optlen
946948
# all: type of recvfrom optlen
947949

948-
#
949-
# Check out what thread support we have
950-
#
951-
OPAL_CONFIG_THREADS
952-
953-
CFLAGS="$CFLAGS $THREAD_CFLAGS"
954-
CPPFLAGS="$CPPFLAGS $THREAD_CPPFLAGS"
955-
LDFLAGS="$LDFLAGS $THREAD_LDFLAGS"
956-
LIBS="$LIBS $THREAD_LIBS"
957-
958-
OPAL_WRAPPER_FLAGS_ADD([CFLAGS], [$THREAD_CFLAGS])
959-
OPAL_WRAPPER_FLAGS_ADD([CXXFLAGS], [$THREAD_CXXFLAGS])
960-
OPAL_WRAPPER_FLAGS_ADD([FCFLAGS], [$THREAD_FCFLAGS])
961-
OPAL_WRAPPER_FLAGS_ADD([LDFLAGS], [$THREAD_LDFLAGS])
962-
# no need to update WRAPPER_EXTRA_LIBS - we'll get it from LT later
963-
964950
#
965951
# What is the local equivalent of "ln -s"
966952
#
@@ -1113,6 +1099,14 @@ AC_MSG_RESULT([$opal_subdir_args])
11131099

11141100
OPAL_MCA
11151101

1102+
#
1103+
# Now that we know how to support threads with wrappers, update
1104+
#
1105+
OPAL_WRAPPER_FLAGS_ADD([CFLAGS], [$THREAD_CFLAGS])
1106+
OPAL_WRAPPER_FLAGS_ADD([CXXFLAGS], [$THREAD_CXXFLAGS])
1107+
OPAL_WRAPPER_FLAGS_ADD([FCFLAGS], [$THREAD_FCFLAGS])
1108+
OPAL_WRAPPER_FLAGS_ADD([LDFLAGS], [$THREAD_LDFLAGS])
1109+
11161110
m4_ifdef([project_ompi], [OMPI_REQUIRE_ENDPOINT_TAG_FINI])
11171111

11181112
# Last minute disable of OpenSHMEM if we didn't find any oshmem SPMLs

ompi/attribute/attribute.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
#include "ompi_config.h"
233233

234234
#include "opal/class/opal_bitmap.h"
235-
#include "opal/threads/mutex.h"
235+
#include "opal/mca/threads/mutex.h"
236236
#include "opal/sys/atomic.h"
237237

238238
#include "ompi/attribute/attribute.h"

ompi/communicator/comm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include "opal/util/string_copy.h"
4242

4343
#include "ompi/proc/proc.h"
44-
#include "opal/threads/mutex.h"
44+
#include "opal/mca/threads/mutex.h"
4545
#include "opal/util/bit_ops.h"
4646
#include "opal/util/output.h"
4747
#include "ompi/mca/topo/topo.h"

ompi/communicator/communicator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include "opal/class/opal_hash_table.h"
3737
#include "opal/util/info_subscriber.h"
3838
#include "ompi/errhandler/errhandler.h"
39-
#include "opal/threads/mutex.h"
39+
#include "opal/mca/threads/mutex.h"
4040
#include "ompi/communicator/comm_request.h"
4141

4242
#include "mpi.h"

ompi/file/file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "mpi.h"
3131
#include "opal/class/opal_list.h"
3232
#include "ompi/errhandler/errhandler.h"
33-
#include "opal/threads/mutex.h"
33+
#include "opal/mca/threads/mutex.h"
3434
#include "opal/util/info_subscriber.h"
3535
#include "ompi/mca/io/io.h"
3636

ompi/info/info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "opal/util/info.h"
3333
#include "opal/class/opal_list.h"
3434
#include "opal/class/opal_pointer_array.h"
35-
#include "opal/threads/mutex.h"
35+
#include "opal/mca/threads/mutex.h"
3636

3737
#include "opal/mca/base/mca_base_var_enum.h"
3838

ompi/mca/common/monitoring/monitoring_prof.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ writing 4x4 matrix to monitoring_avg.mat
5858
#define OMPI_COMPILING_FORTRAN_WRAPPERS 1
5959
#endif
6060

61-
#include "opal/threads/thread_usage.h"
61+
#include "opal/mca/threads/thread_usage.h"
6262

6363
#include "ompi/include/mpi.h"
6464
#include "ompi/mpi/fortran/base/constants.h"

ompi/mca/common/ompio/common_ompio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "mpi.h"
3030
#include "opal/class/opal_list.h"
3131
#include "ompi/errhandler/errhandler.h"
32-
#include "opal/threads/mutex.h"
32+
#include "opal/mca/threads/mutex.h"
3333
#include "ompi/file/file.h"
3434
#include "ompi/mca/io/io.h"
3535
#include "ompi/mca/fs/fs.h"

ompi/mca/io/ompio/io_ompio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "mpi.h"
3030
#include "opal/class/opal_list.h"
3131
#include "ompi/errhandler/errhandler.h"
32-
#include "opal/threads/mutex.h"
32+
#include "opal/mca/threads/mutex.h"
3333
#include "ompi/file/file.h"
3434
#include "ompi/mca/io/io.h"
3535
#include "ompi/mca/fs/fs.h"

ompi/mca/io/ompio/io_ompio_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#include "mpi.h"
3030
#include "opal/class/opal_list.h"
31-
#include "opal/threads/mutex.h"
31+
#include "opal/mca/threads/mutex.h"
3232
#include "opal/mca/base/base.h"
3333
#include "ompi/mca/io/io.h"
3434
#include "ompi/mca/fs/base/base.h"

ompi/mca/io/ompio/io_ompio_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "ompi_config.h"
2121

2222
#include "mpi.h"
23-
#include "opal/threads/mutex.h"
23+
#include "opal/mca/threads/mutex.h"
2424
#include "ompi/mca/io/io.h"
2525
#include "io_ompio.h"
2626

ompi/mca/io/romio321/src/io_romio321.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define MCA_IO_ROMIO321_H
2525

2626
#include "ompi_config.h"
27-
#include "opal/threads/mutex.h"
27+
#include "opal/mca/threads/mutex.h"
2828
#include "ompi/request/request.h"
2929
#include "ompi/file/file.h"
3030
#include "ompi/mca/io/io.h"

ompi/mca/io/romio321/src/io_romio321_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#include "mpi.h"
2929
#include "opal/class/opal_list.h"
30-
#include "opal/threads/mutex.h"
30+
#include "opal/mca/threads/mutex.h"
3131
#include "opal/mca/base/base.h"
3232
#include "ompi/mca/io/io.h"
3333
#include "io_romio321.h"

ompi/mca/osc/pt2pt/osc_pt2pt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "opal/class/opal_list.h"
3131
#include "opal/class/opal_free_list.h"
3232
#include "opal/class/opal_hash_table.h"
33-
#include "opal/threads/threads.h"
33+
#include "opal/mca/threads/threads.h"
3434
#include "opal/util/output.h"
3535

3636
#include "ompi/win/win.h"

ompi/mca/osc/pt2pt/osc_pt2pt_active_target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
#include "mpi.h"
3535
#include "opal/runtime/opal_progress.h"
36-
#include "opal/threads/mutex.h"
36+
#include "opal/mca/threads/mutex.h"
3737
#include "ompi/communicator/communicator.h"
3838
#include "ompi/mca/osc/base/base.h"
3939

ompi/mca/osc/pt2pt/osc_pt2pt_passive_target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#include "mpi.h"
3333
#include "opal/runtime/opal_progress.h"
34-
#include "opal/threads/mutex.h"
34+
#include "opal/mca/threads/mutex.h"
3535
#include "ompi/communicator/communicator.h"
3636
#include "ompi/mca/osc/base/base.h"
3737
#include "opal/include/opal_stdint.h"

ompi/mca/osc/pt2pt/osc_pt2pt_sync.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "ompi_config.h"
1616
#include "opal/class/opal_free_list.h"
17-
#include "opal/threads/threads.h"
17+
#include "opal/mca/threads/threads.h"
1818

1919
enum ompi_osc_pt2pt_sync_type_t {
2020
/** default value */

ompi/mca/osc/rdma/osc_rdma.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "ompi_config.h"
2828
#include "opal/class/opal_free_list.h"
2929
#include "opal/class/opal_hash_table.h"
30-
#include "opal/threads/threads.h"
30+
#include "opal/mca/threads/threads.h"
3131
#include "opal/util/output.h"
3232

3333
#include "opal/mca/shmem/shmem.h"

ompi/mca/osc/rdma/osc_rdma_active_target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "osc_rdma_active_target.h"
3232

3333
#include "mpi.h"
34-
#include "opal/threads/mutex.h"
34+
#include "opal/mca/threads/mutex.h"
3535
#include "ompi/communicator/communicator.h"
3636
#include "ompi/mca/osc/base/base.h"
3737

0 commit comments

Comments
 (0)