diff --git a/README.md b/README.md index 6b1bdbc..68b651c 100644 --- a/README.md +++ b/README.md @@ -80,5 +80,5 @@ Here are a few of the results I've acquired in my testing: |--- |--- |--- |--- | | Turing Pi 2 (4x CM4 @ 1.5 GHz) | 44.942 Gflops | 24.5W | 1.83 Gflops/W | | Turing Pi 2 (4x CM4 @ 2.0 GHz) | 51.327 Gflops | 33W | 1.54 Gflops/W | -| DeskPi Super6c (6x CM4 @ 1.5 GHz) | TODO Gflops | TODOW | TODO Gflops/W | +| DeskPi Super6c (6x CM4 @ 1.5 GHz) | 57.634 Gflops | 40W | 1.44 Gflops/W | | M2 MacBook Air (1x M2 @ 3.5 GHz, in Docker) | 104.68 Gflops | TODOW | TODO Gflops/W | diff --git a/example.config.yml b/example.config.yml index 53ffd67..232a49a 100644 --- a/example.config.yml +++ b/example.config.yml @@ -6,12 +6,9 @@ hpl_root: /opt/top500 ssh_user: pi ssh_user_home: /home/pi -# Use this option if running on a single node. +# Replace ansible_memtotal_mb with cluster memory total if running on cluster. ram_in_gb: "{{ ( ansible_memtotal_mb / 1024 * 0.75 ) | int | abs }}" -# Use this option if running on multiple nodes in a cluster; calculate manually. -# ram_in_gb: "44" - # Count the nodes for accurate HPL.dat calculations. nodecount: "{{ ansible_play_hosts | length | int }}" @@ -21,6 +18,8 @@ nodecount: "{{ ansible_play_hosts | length | int }}" hpl_dat_opts: # sqrt((Memory in GB * 1024 * 1024 * 1024 * Node count) / 8) * 0.9 Ns: "{{ (((((ram_in_gb | int) * 1024 * 1024 * 1024 * (nodecount | int)) / 8) | root) * 0.90) | int }}" - NBs: 192 - Ps: 2 - Qs: 2 + NBs: 256 + # (P * Q) should be roughly equivalent to total core count, with Qs higher. + # If running on a single system, Ps should be 1 and Qs should be core count. + Ps: 1 + Qs: 4 diff --git a/main.yml b/main.yml index 71b4fad..6d0e9dd 100644 --- a/main.yml +++ b/main.yml @@ -178,6 +178,15 @@ ssh {{ ssh_user }}@{{ item }} -o StrictHostKeyChecking=accept-new date loop: "{{ host_ips }}" + - name: Write chunk of hosts information to the hosts file. + ansible.builtin.blockinfile: + path: /etc/hosts + marker: "# {mark} Ansible MPI host {{ item }}" + block: | + {{ hostvars[item].ansible_default_ipv4.address }} {{ item }} {{ item | replace('.local', '') }} + loop: "{{ groups['cluster'] }}" + become: true + - name: Run linpack benchmark. hosts: cluster become: false diff --git a/templates/mpi-node-config.j2 b/templates/mpi-node-config.j2 index cb689cf..3df23f0 100644 --- a/templates/mpi-node-config.j2 +++ b/templates/mpi-node-config.j2 @@ -1,3 +1,3 @@ {% for host in groups['cluster'] %} -{{ hostvars[host].ansible_default_ipv4.address }}:4 -{% endfor %} \ No newline at end of file +{{ hostvars[host].ansible_default_ipv4.address }}:{{ hostvars[host].ansible_processor_vcpus }} +{% endfor %}