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

hwloc: open topology request to user role, add simple "info" subcommand #1043

Merged
merged 6 commits into from Apr 13, 2017

Conversation

Projects
None yet
4 participants
@grondo
Copy link
Contributor

grondo commented Apr 13, 2017

A bit of a diversion here. While playing with system instance of flux, I found it handy for FLUX_ROLE_USER to be able to query hwloc topology. No other resource-hwloc service is exposed further than the owner role.

Additionally, for a terse view of resources across the instance, I added a flux hwloc info subcommand, which gives the simplest possible view of Machines, Cores, and PUs available from the instance. This should be viewed as a stand-in for a better replacement down the road (it should use a separate service in resource-hwloc to calculate counts at each broker, reduce and forward results for scalability, and other resources like Memory should be added), however, this simple approach has proved useful for now.

$ srun --pty -N24 --mpi=none src/cmd/flux start
(flux-923ktt) $ flux hwloc info
24 Machines, 384 Cores, 384 PUs

Tests were added for this new subcommand, and its output is used to sanity check the expected results from flux hwloc reload testing in the testsuite.

One drawback is that the flux command driver now needs to be linked with libhwloc, so I'll understand if the subcommand is a pass for now.

grondo added some commits Apr 13, 2017

resource-hwloc: open topo queries to USER role
Allow users with FLUX_ROLE_USER to access resource-hwloc.topo
and therefore use `flux-hwloc` topology and `flux-hwloc lstopo`
flux-hwloc: don't silently fail when no lstopo found
When lstopo or lstopo-no-graphics aren't found, flux-hwloc lstopo
currently exits silently. Instead, return an error message indicating
that no suitable lstopo(1) variant was found.
flux-hwloc: add simple info subcommand
Add a simple flux-hwloc info subcommand which presents a short-form
summary of Machines, Cores, and processing units (PUs) available
from the current instance.
testsuite: add tests for flux-hwloc info
Add simple tests for `flux hwloc info`. Additionally, use
flux-hwloc info summary as a double check on the first couple
of `reload` tests.
@coveralls

This comment has been minimized.

Copy link

coveralls commented Apr 13, 2017

Coverage Status

Coverage increased (+0.006%) to 78.179% when pulling a21a6b0 on grondo:multiuser-hwloc into e99071f on flux-framework:master.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Apr 13, 2017

Codecov Report

Merging #1043 into master will increase coverage by <.01%.
The diff coverage is 78.94%.

@@            Coverage Diff             @@
##           master    #1043      +/-   ##
==========================================
+ Coverage   77.92%   77.92%   +<.01%     
==========================================
  Files         150      150              
  Lines       25666    25686      +20     
==========================================
+ Hits        20000    20016      +16     
- Misses       5666     5670       +4
Impacted Files Coverage Δ
src/modules/resource-hwloc/resource.c 71.62% <ø> (ø) ⬆️
src/cmd/builtin/hwloc.c 80.64% <78.94%> (-0.1%) ⬇️
src/common/libflux/rpc.c 90.47% <0%> (-0.74%) ⬇️
src/common/libflux/dispatch.c 83.24% <0%> (-0.28%) ⬇️
src/modules/kvs/kvs.c 80.92% <0%> (-0.25%) ⬇️
src/modules/connector-local/local.c 70.49% <0%> (+0.2%) ⬆️
src/common/libflux/message.c 81.44% <0%> (+0.36%) ⬆️
src/common/libflux/response.c 84.61% <0%> (+0.85%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e99071f...a21a6b0. Read the comment docs.

@garlick

This comment has been minimized.

Copy link
Member

garlick commented Apr 13, 2017

Looks reasonable to me! Merging.

@garlick garlick merged commit bef29dc into flux-framework:master Apr 13, 2017

4 checks passed

codecov/patch 78.94% of diff hit (target 77.92%)
Details
codecov/project 77.92% (+<.01%) compared to e99071f
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.006%) to 78.179%
Details

@grondo grondo deleted the grondo:multiuser-hwloc branch Apr 20, 2017

@grondo grondo referenced this pull request Aug 23, 2017

Closed

0.8.0 Release #1160

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.