Skip to content

Commit e41562b

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 <noah.evans@gmail.com> Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov> Signed-off-by: Howard Pritchard <howardp@lanl.gov>
1 parent 207b267 commit e41562b

File tree

138 files changed

+3375
-620
lines changed

Some content is hidden

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

138 files changed

+3375
-620
lines changed

config/opal_config_threads.m4

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

configure.ac

Lines changed: 10 additions & 18 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
@@ -953,24 +955,6 @@ OPAL_CHECK_BROKEN_QSORT
953955
# all: type of getsockopt optlen
954956
# all: type of recvfrom optlen
955957

956-
#
957-
# Check out what thread support we have
958-
#
959-
OPAL_CONFIG_THREADS
960-
961-
CFLAGS="$CFLAGS $THREAD_CFLAGS"
962-
CPPFLAGS="$CPPFLAGS $THREAD_CPPFLAGS"
963-
CXXFLAGS="$CXXFLAGS $THREAD_CXXFLAGS"
964-
CXXCPPFLAGS="$CXXCPPFLAGS $THREAD_CXXCPPFLAGS"
965-
LDFLAGS="$LDFLAGS $THREAD_LDFLAGS"
966-
LIBS="$LIBS $THREAD_LIBS"
967-
968-
OPAL_WRAPPER_FLAGS_ADD([CFLAGS], [$THREAD_CFLAGS])
969-
OPAL_WRAPPER_FLAGS_ADD([CXXFLAGS], [$THREAD_CXXFLAGS])
970-
OPAL_WRAPPER_FLAGS_ADD([FCFLAGS], [$THREAD_FCFLAGS])
971-
OPAL_WRAPPER_FLAGS_ADD([LDFLAGS], [$THREAD_LDFLAGS])
972-
# no need to update WRAPPER_EXTRA_LIBS - we'll get it from LT later
973-
974958
#
975959
# What is the local equivalent of "ln -s"
976960
#
@@ -1123,6 +1107,14 @@ AC_MSG_RESULT([$opal_subdir_args])
11231107

11241108
OPAL_MCA
11251109

1110+
#
1111+
# Now that we know how to support threads with wrappers, update
1112+
#
1113+
OPAL_WRAPPER_FLAGS_ADD([CFLAGS], [$THREAD_CFLAGS])
1114+
OPAL_WRAPPER_FLAGS_ADD([CXXFLAGS], [$THREAD_CXXFLAGS])
1115+
OPAL_WRAPPER_FLAGS_ADD([FCFLAGS], [$THREAD_FCFLAGS])
1116+
OPAL_WRAPPER_FLAGS_ADD([LDFLAGS], [$THREAD_LDFLAGS])
1117+
11261118
m4_ifdef([project_ompi], [OMPI_REQUIRE_ENDPOINT_TAG_FINI])
11271119

11281120
# 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"

0 commit comments

Comments
 (0)