Skip to content

Fix hpctests HPL where cluster has more more than one partition #201

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

Merged
merged 3 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/stackhpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ jobs:
. venv/bin/activate
. environments/${{ matrix.cloud }}/activate
cd $APPLIANCES_ENVIRONMENT_ROOT/terraform
echo "::set-output name=messages::$(../../skeleton/\{\{cookiecutter.environment\}\}/terraform/getfaults.py $PWD)"
TF_FAIL_MSGS="$(../../skeleton/\{\{cookiecutter.environment\}\}/terraform/getfaults.py $PWD)"
echo $TF_FAIL_MSGS
echo "::set-output name=messages::${TF_FAIL_MSGS}"
env:
OS_CLOUD: openstack
TF_VAR_cluster_name: ci${{ github.run_id }}
Expand Down
9 changes: 4 additions & 5 deletions ansible/roles/hpctests/library/slurm_node_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,16 @@ def run_module():
if module.check_mode:
module.exit_json(**result)

node_spec = ','.join(module.params['nodes'])
_, stdout,_ = module.run_command("sinfo --Format All --node %s" % node_spec, check_rc=True)
_, stdout,_ = module.run_command("sinfo --Format All --Node", check_rc=True) # `--nodes` doesn't filter enough, other partitions are still shown
lines = stdout.splitlines()
# if len(lines) > 2:
# raise ValueError('Info requested for nodes which are not homogenous: %s' % lines)
info = {}
params = [v.strip() for v in lines[0].split('|')]
values = [line.split('|') for line in lines[1:]]
nodelist_ix = params.index('NODELIST')
print(values)
for ix, param in enumerate(params):
info[param] = [nodeinfo[ix].strip() for nodeinfo in values]
info[param] = [nodeinfo[ix].strip() for nodeinfo in values if nodeinfo[nodelist_ix].strip() in module.params['nodes']]
# info[param] = [nodeinfo[nodelist_ix] for nodeinfo in values]
result['info'] = info

module.exit_json(**result)
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/hpctests/tasks/hpl-solo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- name: Check nodes are homogenous
assert:
that: "{{ hpctests_nodeinfo.info[item] | unique | length == 1 }}"
fail_msg: "Selected nodes are not homogenous: {{ item }} = {{ hpctests_nodeinfo.info[item] }}"
fail_msg: "Selected nodes are not homogenous: {{ item }} ({{ hpctests_nodeinfo.info['NODELIST'] }}) = {{ hpctests_nodeinfo.info[item] }}"
loop:
- SOCKETS
- CORES
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/hpctests/templates/hpl-build.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#SBATCH --output=%x.%a.out
#SBATCH --error=%x.%a.out
#SBATCH --exclusive
{%if hpctests_nodes is defined %}#SBATCH --nodelist={{ hpctests_nodes }}{% endif %}
{%if hpctests_nodes is defined %}#SBATCH --nodelist={{ hpctests_computes.stdout_lines[0] }}{% endif %}

echo HPL arch: {{ hpctests_hpl_arch }}

Expand Down