Skip to content

Commit

Permalink
Raise number of threads used by GASNet by default + add warning if ex…
Browse files Browse the repository at this point in the history
…ceeded

---
Signed-off-by: Brad Chamberlain <bradcray@users.noreply.github.com>
  • Loading branch information
bradcray committed Dec 21, 2024
1 parent 2cfd1a2 commit c96fc9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion runtime/src/tasks/qthreads/tasks-qthreads.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,17 @@ static void setupAvailableParallelism(int32_t maxThreads) {
if (hwpar > 0) {
// Limit the parallelism to the maximum imposed by the comm layer.
if (0 < maxThreads && maxThreads < hwpar) {
hwpar = maxThreads;
if (chpl_nodeID == 0) {
char msg[1024];
snprintf(msg, sizeof(msg),
"The CHPL_COMM setting is limiting the number of threads "
"to %d, rather than the hardware's preference of %d. "
"If using CHPL_COMM=gasnet, set 'GASNET_MAX_THREADS' to "
"a higher number in your environment to address this.\n",
maxThreads, hwpar);
chpl_warning(msg, 0, 0);
}
hwpar = maxThreads;
}

//
Expand Down
2 changes: 1 addition & 1 deletion third-party/gasnet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ gasnet-config: FORCE
mkdir -p $(GASNET_BUILD_DIR)
cd $(GASNET_SUBDIR) && ./Bootstrap -T
$(XTRA_CONFIG_COMMAND)
$(ENSURE_GASNET_COMPATIBLE_COMPILER) cd $(GASNET_BUILD_DIR) && $(CHPL_GASNET_ENV_VARS) $(GASNET_SUBDIR)/$(CHPL_GASNET_CFG_SCRIPT) --prefix=$(GASNET_INSTALL_DIR) $(CHPL_GASNET_CFG_OPTIONS) --disable-seq --enable-par --disable-parsync $(CHPL_GASNET_CFG_OPTIONS)
$(ENSURE_GASNET_COMPATIBLE_COMPILER) cd $(GASNET_BUILD_DIR) && $(CHPL_GASNET_ENV_VARS) $(GASNET_SUBDIR)/$(CHPL_GASNET_CFG_SCRIPT) --prefix=$(GASNET_INSTALL_DIR) --disable-seq --enable-par --disable-parsync --with-max-pthreads-per-node=65535 $(CHPL_GASNET_CFG_OPTIONS)

gasnet-build: FORCE
$(ENSURE_GASNET_COMPATIBLE_COMPILER) cd $(GASNET_BUILD_DIR) && $(MAKE) all
Expand Down

0 comments on commit c96fc9d

Please sign in to comment.