-
Notifications
You must be signed in to change notification settings - Fork 19
Fix jobcompletion logfile existance #103
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
eec3099
fix logfile not existing when openhpc_slurm_job_comp_type = jobcomp/f…
sjpb e15c31e
update README for job accounting
sjpb e99a129
apply fix from b167d4b for molecule role name to test12
sjpb ab4ad18
fix jobcomp logfile idempotency
sjpb e012801
remove commented-out code
sjpb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
tasks: | ||
- name: "Include ansible-role-openhpc" | ||
include_role: | ||
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" | ||
vars: | ||
openhpc_enable: | ||
control: "{{ inventory_hostname in groups['testohpc_login'] }}" | ||
batch: "{{ inventory_hostname in groups['testohpc_compute'] }}" | ||
runtime: true | ||
openhpc_slurm_control_host: "{{ groups['testohpc_login'] | first }}" | ||
openhpc_slurm_partitions: | ||
- name: "compute" | ||
openhpc_cluster_name: testohpc | ||
openhpc_slurm_configless: true | ||
openhpc_slurm_job_comp_type: jobcomp/filetxt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
name: single partition, group is partition | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: testohpc-login-0 | ||
image: ${MOLECULE_IMAGE} | ||
pre_build_image: true | ||
groups: | ||
- testohpc_login | ||
command: /sbin/init | ||
tmpfs: | ||
- /run | ||
- /tmp | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
networks: | ||
- name: net1 | ||
- name: testohpc-compute-0 | ||
image: ${MOLECULE_IMAGE} | ||
pre_build_image: true | ||
groups: | ||
- testohpc_compute | ||
command: /sbin/init | ||
tmpfs: | ||
- /run | ||
- /tmp | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
networks: | ||
- name: net1 | ||
- name: testohpc-compute-1 | ||
image: ${MOLECULE_IMAGE} | ||
pre_build_image: true | ||
groups: | ||
- testohpc_compute | ||
command: /sbin/init | ||
tmpfs: | ||
- /run | ||
- /tmp | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
networks: | ||
- name: net1 | ||
provisioner: | ||
name: ansible | ||
verifier: | ||
name: ansible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
|
||
- name: Check slurm hostlist | ||
hosts: testohpc_login | ||
tasks: | ||
- name: Get slurm partition info | ||
command: sinfo --noheader --format="%P,%a,%l,%D,%t,%N" # using --format ensures we control whitespace | ||
register: sinfo | ||
changed_when: false | ||
- name: Assert slurm running ok | ||
assert: # PARTITION AVAIL TIMELIMIT NODES STATE NODELIST | ||
that: "sinfo.stdout_lines == ['compute*,up,60-00:00:00,2,idle,testohpc-compute-[0-1]']" | ||
fail_msg: "FAILED - actual value: {{ sinfo.stdout_lines }}" | ||
- name: Run a slurm job | ||
command: | ||
cmd: "sbatch -N2 --wrap 'srun hostname'" | ||
register: sbatch | ||
- name: Set fact for slurm jobid | ||
set_fact: | ||
jobid: "{{ sbatch.stdout.split()[-1] }}" | ||
- name: Get job completion info | ||
command: | ||
cmd: "sacct --completion --noheader --parsable2" | ||
changed_when: false | ||
register: sacct | ||
- assert: | ||
that: "(jobid + '|0|wrap|compute|2|testohpc-compute-[0-1]|COMPLETED') in sacct.stdout" | ||
fail_msg: "Didn't find expected output for {{ jobid }} in sacct output: {{ sacct.stdout }}" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.