Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise number of threads used by GASNet by default + add warning if exceeded #26448

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bradcray
Copy link
Member

As noted in #26379, we've recently had a user on a high-core-count system get surprised when we quietly dialed the maximum number of tasks down to 255 rather than using the number of cores on that system. This PR addresses that issue in two ways:

While here, I also noticed that we seemed to be passing the list of GASNet configuration options to it twice, introduced in 2014 in d765982. I don't see any indication that that's any more than a typo, so here, I've removed one of the occurrences, leaving the one at the end of the line there, thinking it'd support overriding other, earlier options.

Copy link
Contributor

@bonachea bonachea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes!

Made a few minor observations, in case they're helpful.

"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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New warning text LGTM, and should usually achieve the goal of avoiding silent under-utilization of cores.

However IIUC the new warning won't be printed on a heterogeneous system where node 0 has a smaller core count than maxThreads, but some other node might have a higher core count.

Not sure if such node heterogeneity is of interest (or even permitted by Chapel?) so feel free to ignore this observation if it seems irrelevant or not worth addressing.

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hunk partially overlaps the same fix proposed in the first commit of #25414 for the same cosmetic defect.

It sounds like we both independently made the same observation about the GASNet configure line and arrived at the same fix, so feel free to close #25414 in favor of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants