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

hpx: Invalid default variant #44194

Closed
wspear opened this issue May 14, 2024 · 2 comments · Fixed by #44220
Closed

hpx: Invalid default variant #44194

wspear opened this issue May 14, 2024 · 2 comments · Fixed by #44220

Comments

@wspear
Copy link
Contributor

wspear commented May 14, 2024

The max_cpu_count variant for hpx is set to 64 by default. If that value doesn't match the actual number of cpus this can result in runtime failures like:

mpirun -np 1 ./build/test_future --hpx:use-process-mask
hpx::init: hpx::exception caught: Currently, HPX_HAVE_MAX_CPU_COUNT is set to 64 while your system has 96 processing units. Please reconfigure HPX with -DHPX_WITH_MAX_CPU_COUNT=96 (or higher) to increase the maximal CPU count supported by HPX.: HPX(invalid_status)

Does the correct cpu count need to be determined at install time (making binary relocation ungeneralizable for hpx), or is there a flag that can be added at build or runtime to force hpx to allow a sub-optimal cpu count? Alternatively, is there a way to determine the correct value from inside the spack package and use that for configuration?

@albestro @hkaiser @msimberg @teonnik

@msimberg
Copy link
Contributor

HPX itself actually already defaults to not setting a max CPU count and uses dynamic bitsets instead for CPU masks (that's what the max count is primarily for). The default in the spack package doesn't reflect the HPX default. From previous testing performance was not affected by using dynamic bitsets so changing the default in the spack package would probably make sense. @hkaiser do any of the new schedulers care more about using static or dynamic bitsets?

variant(
"max_cpu_count",
default="64",
description="Max number of OS-threads for HPX applications",
values=lambda x: isinstance(x, str) and x.isdigit(),
)
would need to be changed to allow some special value to represent no limit. In HPX's CMake logic it's represented by an empty string, but maybe something like none is a better way to represent it in the spack package?

@hkaiser
Copy link
Contributor

hkaiser commented May 15, 2024

I think currently HPX still uses a maximum of 64 cores as the default internal value (if nothing else was specified). However @msimberg is right that we could (and should) remove this restriction. I will prepare a PR to be integrated with the upcoming HPX V1.10.0 release.

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 a pull request may close this issue.

3 participants