-
Notifications
You must be signed in to change notification settings - Fork 405
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
HPCBIND: Prevent hwloc-ls from opening graphic windows unintentionally #7010
base: develop
Are you sure you want to change the base?
Conversation
@@ -635,7 +635,9 @@ if [[ ${HPCBIND_TEE} -eq 0 || ${HPCBIND_VERBOSE} -eq 0 ]]; then | |||
|
|||
if [[ ${HPCBIND_HAS_HWLOC} -eq 1 ]]; then | |||
echo "[BINDINGS]" >> ${HPCBIND_LOG} | |||
hwloc-ls --restrict "${HPCBIND_HWLOC_CPUSET}" >> ${HPCBIND_LOG} | |||
if [[ ${HPCBIND_LSTOPO} -eq 1 && ! -z ${DISPLAY} ]]; then | |||
hwloc-ls --restrict "${HPCBIND_HWLOC_CPUSET}" >> ${HPCBIND_LOG} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would passing --output-format console
resolve your issue?
(I have no experience with hpcbind
nor hwloc
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a fix that should occur on the user's machine?
@@ -635,7 +635,9 @@ if [[ ${HPCBIND_TEE} -eq 0 || ${HPCBIND_VERBOSE} -eq 0 ]]; then | |||
|
|||
if [[ ${HPCBIND_HAS_HWLOC} -eq 1 ]]; then | |||
echo "[BINDINGS]" >> ${HPCBIND_LOG} | |||
hwloc-ls --restrict "${HPCBIND_HWLOC_CPUSET}" >> ${HPCBIND_LOG} | |||
if [[ ${HPCBIND_LSTOPO} -eq 1 && ! -z ${DISPLAY} ]]; then | |||
hwloc-ls --restrict "${HPCBIND_HWLOC_CPUSET}" >> ${HPCBIND_LOG} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't $DISPLAY
set / unset on the user's machine? Assuming that's the case, then conditioning hwloc-ls --restrict "${HPCBIND_HWLOC_CPUSET}" >> ${HPCBIND_LOG}
upon ${DISPLAY}
being non zero (if it's set at all) could have negative downstream effects for users who wish to use hpcbind
, but do not have $DISPLAY
set. I checked a couple of (non-Windows) machines, and $DISPLAY
wasn't set, appearing to be the default scenario. Would it be possible for you to simply unset $DISPLAY
before using hpcbind
?
hwloc-ls --restrict "${HPCBIND_HWLOC_CPUSET}" --no-io --no-bridges > >(tee -a ${HPCBIND_LOG}) | ||
if [[ ${HPCBIND_LSTOPO} -eq 1 && ! -z ${DISPLAY} ]]; then | ||
hwloc-ls --restrict "${HPCBIND_HWLOC_CPUSET}" --no-io --no-bridges > >(tee -a ${HPCBIND_LOG}) | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above above the logic and potential risk of the proposed change.
I noticed that
hpcbind
unconditionally opens two lstopo X windows when a display is present. The command I ran to trigger this behavior washpcbind --distribute=2 --distribute-partition=1 -v
in combination with hwloc version 2.7.0 on ubuntu 22.04 lts.
This PR changes this behavior to only open these windows when the
--lstopo
flag is passed at the command line.