-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds patches to ATLAS to fix issues with grep 3.8+
- Loading branch information
1 parent
a334a05
commit 826f71a
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,40 @@ | ||
- name: Checking to see if patches need to be applied. | ||
ansible.builtin.stat: | ||
path: "{{ hpl_root }}/tmp/ATLAS_PATCHING_COMPLETE" | ||
register: no_patches_needed | ||
|
||
# Fixes fgrep warning being added to output and causing | ||
# the ATLAS configuration to fail to identify aspects of | ||
# the given node | ||
- name: Patching ATLAS source code (Part 1). | ||
ansible.builtin.replace: | ||
path: "{{ hpl_root }}tmp/ATLAS/CONFIG/include/atlas_sys.h" | ||
regexp: '2>&1' | ||
replace: '2>/dev/null' | ||
when: no_patches_needed.stat.exists == false | ||
|
||
# Fixes 'free(): invalid pointer' error during | ||
# ATLAS configuration | ||
- name: Patching ATLAS source code (Part 2). | ||
ansible.builtin.lineinfile: | ||
path: "{{ hpl_root }}tmp/ATLAS/CONFIG/src/probe_comp.c" | ||
insertbefore: 'free\(cmnd\)' | ||
line: ' printf("\n");' | ||
firstmatch: true | ||
when: no_patches_needed.stat.exists == false | ||
|
||
# Fixes 'corrupted size vs. prev_size' error during | ||
# ATLAS configuration | ||
- name: Patching ATLAS source code (Part 3). | ||
ansible.builtin.lineinfile: | ||
path: "{{ hpl_root }}tmp/ATLAS/CONFIG/include/atlas_sys.h" | ||
insertbefore: 'if \(fgets\(sout, len, fpin\)\)' | ||
line: ' printf("\n");' | ||
firstmatch: true | ||
when: no_patches_needed.stat.exists == false | ||
|
||
- name: Create 'ATLAS_PATCHING_COMPLETE' file. | ||
ansible.builtin.file: | ||
path: "{{ hpl_root }}/tmp/ATLAS_PATCHING_COMPLETE" | ||
state: touch | ||
mode: 0644 |