Skip to content

Commit

Permalink
Make playbook slightly less fragile, fix lint error.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy committed Nov 16, 2022
1 parent a0cb0cf commit 0fd9834
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ mpirun -f cluster-hosts ./xhpl

To run locally on a single node, clone or download this repository to the node where you want to run HPL. Make sure the `hosts.ini` is set up with the default options (with just one node, `127.0.0.1`).

Then, run the following command so the cluster networking portion of the playbook is not run:
All the default configuration from `example.config.yml` should be copied to a `config.yml` file, and all the variables should scale dynamically for your node.

Run the following command so the cluster networking portion of the playbook is not run:

```
ansible-playbook main.yml --tags "setup,benchmark"
Expand Down Expand Up @@ -95,3 +97,4 @@ Here are a few of the results I've acquired in my testing:
| DeskPi Super6c (6x CM4 @ 1.5 GHz) | 60.293 Gflops | 40W | 1.50 Gflops/W |
| DeskPi Super6c (6x CM4 @ 2.0 GHz) | 70.338 Gflops | 51W | 1.38 Gflops/W |
| M2 MacBook Air (1x M2 @ 3.5 GHz, in Docker) | 104.68 Gflops | TODOW | TODO Gflops/W |
| M1 Max Mac Studio (1x M1 Max @ 3.2 GHz, in Docker) | TODO Gflops | TODOW | TODO Gflops/W |
2 changes: 1 addition & 1 deletion example.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hpl_root: /opt/top500
ssh_user: pi
ssh_user_home: /home/pi

# Replace ansible_memtotal_mb with cluster memory total if running on cluster.
# Specify manually if needed for mixed-RAM-capacity clusters.
ram_in_gb: "{{ ( ansible_memtotal_mb / 1024 * 0.75 ) | int | abs }}"

# Count the nodes for accurate HPL.dat calculations.
Expand Down
4 changes: 2 additions & 2 deletions main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
owner: "{{ ansible_user | default(ansible_env.USER, true) | default(ansible_user_id, true) }}"
group: "{{ ansible_user | default(ansible_env.USER, true) | default(ansible_user_id, true) }}"
mode: 0755
loop:
- "{{ hpl_root }}/tmp"
Expand Down
1 change: 1 addition & 0 deletions overclock-pi.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Set up overclock on Raspberry Pis.
hosts: cluster
become: true
Expand Down

0 comments on commit 0fd9834

Please sign in to comment.