File tree Expand file tree Collapse file tree 8 files changed +61
-0
lines changed
Expand file tree Collapse file tree 8 files changed +61
-0
lines changed Original file line number Diff line number Diff line change 3333 - limits
3434 - mpi-hostfiles
3535 - boot-volume
36+ - mpivars
3637
3738- hosts : compute
3839 become : true
Original file line number Diff line number Diff line change 3131 - ssh
3232 - limits
3333 - boot-volume
34+ - mpivars
3435
3536- hosts : compute_to_add
3637 become : true
Original file line number Diff line number Diff line change 1+ ---
2+ # defaults file for mpivars
Original file line number Diff line number Diff line change 1+ ---
2+ # tasks file for mpivars
3+ - include : ubuntu.yml
4+ when : ansible_distribution == 'Ubuntu'
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Get the openmpi version
3+ shell :
4+ cmd : ls /usr/mpi/gcc/
5+ warn : false
6+ register : openmpi
7+ failed_when : false
8+
9+
10+ - name : Check if mpivars.sh exists
11+ stat :
12+ path : /usr/mpi/gcc/{{ openmpi.stdout_lines[0] }}/bin/mpivars.sh
13+ register : mpivars
14+ when : openmpi.stdout_lines[0] != ""
15+
16+
17+ - name : Create mpivars.sh
18+ become : true
19+ template :
20+ src : mpivars.j2
21+ dest : /usr/mpi/gcc/{{ openmpi.stdout_lines[0] }}/bin/mpivars.sh
22+ force : yes
23+ owner : root
24+ group : root
25+ when : openmpi.stdout_lines[0] != "" and not mpivars.stat.exists
Original file line number Diff line number Diff line change 1+ # NOTE: This is an automatically-generated file! (generated by the
2+ # Open MPI/SHMEM RPM). Any changes made here will be lost if the RPM is
3+ # uninstalled or upgraded.
4+
5+ # PATH
6+ if test -z "`echo $PATH | grep /usr/mpi/gcc/{{ openmpi.stdout_lines[0] }}/bin`"; then
7+ PATH=/usr/mpi/gcc/{{ openmpi.stdout_lines[0] }}/bin:${PATH}
8+ export PATH
9+ fi
10+
11+ # LD_LIBRARY_PATH
12+ if test -z "`echo $LD_LIBRARY_PATH | grep /usr/mpi/gcc/{{ openmpi.stdout_lines[0] }}/lib`"; then
13+ LD_LIBRARY_PATH=/usr/mpi/gcc/{{ openmpi.stdout_lines[0] }}/lib${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}
14+ export LD_LIBRARY_PATH
15+ fi
16+
17+ # MANPATH
18+ if test -z "`echo $MANPATH | grep /usr/mpi/gcc/{{ openmpi.stdout_lines[0] }}/share/man`"; then
19+ MANPATH=/usr/mpi/gcc/{{ openmpi.stdout_lines[0] }}/share/man:${MANPATH}
20+ export MANPATH
21+ fi
22+
23+ # MPI_ROOT
24+ MPI_ROOT=/usr/mpi/gcc/{{ openmpi.stdout_lines[0] }}
25+ export MPI_ROOT
Original file line number Diff line number Diff line change 1+ ---
2+ # vars file for mpivars
Original file line number Diff line number Diff line change 3535 - mpi-hostfiles
3636 - etc-hosts
3737 - boot-volume
38+ - mpivars
3839
3940- hosts : all
4041 become : true
You can’t perform that action at this time.
0 commit comments