diff --git a/main.yml b/main.yml index 5ad0c2a..237d0c5 100644 --- a/main.yml +++ b/main.yml @@ -12,21 +12,14 @@ vars_files: ['config.yml'] tasks: - - name: Update apt cache. - ansible.builtin.apt: - update_cache: true - cache_valid_time: 600 + - include_tasks: dependencies/rhel-based.yml + when: ansible_os_family == 'RedHat' + + - include_tasks: dependencies/debian-based.yml when: ansible_os_family == 'Debian' - become: true - - name: Install dependencies. - ansible.builtin.package: - name: - - build-essential - - gfortran - - automake - state: present - become: true + - include_tasks: dependencies/arch-based.yml + when: ansible_os_family == 'Archlinux' - name: Create required temporary directories. ansible.builtin.file: @@ -89,6 +82,24 @@ remote_src: true creates: "{{ hpl_root }}/tmp/ATLAS/README" + # The source code for the configure script that ATLAS uses makes calls + # with fgrep to find information about the system from its various + # outputs to set the configuration accordingly. However, + # grep versions 3.8+ throw the following warning when calling fgrep: + # 'fgrep: warning: fgrep is obsolescent; using grep -F' + # This occurs as output from fgrep which causes the ATLAS configuration + # to get invalid return values, causing the configuration to fail + # due to it assuming the first value is the number it's looking for. + # + # If the version of grep is 3.8 or newer, we have to patch the ATLAS + # source code to get rid of the warning produced by fgrep. + - name: Checking installed software. + package_facts: + manager: auto + + - include_tasks: patch-atlas-src.yml + when: ansible_facts.packages['grep'][0].version is version("3.8", ">=") + - name: Install ATLAS (takes a LONG time). ansible.builtin.command: "{{ item }}" args: @@ -188,6 +199,11 @@ loop: "{{ groups['cluster'] }}" become: true + # If this is not done, the nodes will fail to connect to each other + # causing the playbook to hang at 'Run the benchmark.' + - include_tasks: firewall/configure-firewall.yml + when: ansible_os_family == "RedHat" + - name: Run linpack benchmark. hosts: cluster become: false @@ -217,5 +233,8 @@ register: mpirun_output run_once: true + - include_tasks: firewall/reset-firewall.yml + when: ansible_os_family == "RedHat" + - name: Output the results. debug: var=mpirun_output.stdout