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

Print warning when ABT_MAX_NUM_XSTREAMS is too small #99

wants to merge 2 commits into
base: master


None yet
1 participant
Copy link

commented May 9, 2019

This is an interim solution mentioned by @carns in #34.

This patch is simple; Argobots prints warning (only once) if # of ESs > ABT_MAX_NUM_XSTREAMS so that users can set a larger number to ABT_MAX_NUM_XSTREAMS (i.e., ABT_MAX_NUM_XSTREAMS=XXX ./a.out, or to do it in a program, see #35).

This is a real pain in the neck; currently the priority-/locality-aware mutex implementation (specifically ABTI_thread_htable uses a preallocated array whose size is ABT_MAX_NUM_XSTREAMS (by default, the number of cores), so any ABT_mutex created before creating all the execution streams can cause SEGV if the total number of executions streams happen to be larger than the number of cores). Many users complained about this annoying behavior.

Note that another possible option is returning an error in ABT_xstream_create, but this might be too much regarding compatibility since Argobots works (and worked) in the other cases.

Better mutex implementation which does not rely on ABT_MAX_NUM_XSTREAMS is future work; it is not very trivial, and importantly we don't know the current mutex implementation is good.

shintaro-iwasaki added some commits May 9, 2019

global: show warning if # of ESs > ABT_MAX_NUM_XSTREAMS
Some Argobots functions cause an error (including SEGV) when the number of
execution streams becomes larger than ABT_MAX_NUM_XSTREAMS (e.g., ABT_mutex).
This patch implements one-time warning if such happens so that users can set
an appropriate value to ABT_MAX_NUM_XSTREAMS. Fundamental solutions (e.g.,
removal of ABT_MAX_NUM_XSTREAMS) are future work.

Note that Argobots mostly works even if it happens; as far as confirmed, an
error happens only when ABT_mutex is created before launching all the execution

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2019


@shintaro-iwasaki shintaro-iwasaki requested a review from yfguo Jul 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.