Commit 5e04c99c authored by julian.gethmann's avatar julian.gethmann

Add blas/Pelegant

* Install blas and Pelegant and open ports for Pelegant runs
parent ae26072a
#!/bin/bash
# bash >= 4 required
# This script assumes to be run only once per day and overwrites files
# It also does shouldn't be run for different hosts in parallel
# Search the "Edit"-line
#
# - This script has not been tested so far
# - Mounting via sshfs is not included yet
set -euo pipefail
IFS=$'\n\t'
############################################################
# Edit:
declare -A hosts_cpus=( ["las113"]="6" ["las126"]="11" )
############################################################
filename="~/.ssh/Pelegant_$(date --iso)"
ssh-keygen -f "${filename}" -q
if [ -f ~/.mpihosts ]; then
mv ~/.mpihosts ~/.mpihosts.${date --iso}
fi
for cpus in "${!host_cpus[@]}"; do
echo "${host_cpus[$cpus]}":${cpus} user=${USER} >> ~/.mpihosts
done
for cpus in "${!host_cpus[@]}"; do
dest="${host_cpus[$cpus]}"
ssh-copy-id -i "${filename}" ${dest}
scp "${filename}" "${dest}:~/.ssh/"
scp "${mpifile}" "${dest}:.mpihosts"
done
---
- name: "BLAS (needed by elegant)"
become: yes
dnf:
name: "{{ item }}"
state: present
with_items: "{{ prePelegant }}"
tags: pelegant
- name: ansible dependencies for firewalld
become: yes
dnf:
name: "{{ item }}"
state: present
with_items:
- python-decorator
- python-slip
- python-firewall
tags: pelegant
- name: Pelegant open ports
become: yes
firewalld:
state: enabled
permanent: true
rich_rule: 'rule family="ipv4" source address="129.13.108.96/27" port port="10000-10100" protocol="tcp" accept'
notify:
- reload firewall
- restart firewall
tags: pelegant
- name: export variable
become: yes
copy:
src: mpich.sh
dest: /etc/profile.d/pelegant.sh
group: root
owner: root
backup: yes
notify: run profiled
tags: pelegant
- name: install sshfs
become: yes
dnf:
name: fuse-sshfs
state: present
tags: pelegant
---
# - import_tasks: blas.yml
- import_tasks: blas.yml
- import_tasks: elegant.yml
- import_tasks: examples.yml
# - import_tasks: pyhonsdds.yml
---
- name: install SDDS for Python 2
pip:
name:
- name: install SDDS for Python 3
pip:
name:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment