Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ferrao@westfall html]$ cat workstation-install.sh
- #!/bin/sh
- # CloysterHPC Workstation
- # vars: ${sms_name} ${sms_ip} ${ntp_server}
- echo ${sms_ip} ${sms_name} >> /etc/hosts
- dnf -y install http://repos.openhpc.community/OpenHPC/2/EL_8/x86_64/ohpc-release-2-1.el8.x86_64.rpm
- dnf -y install dnf-plugins-core
- dnf config-manager --set-enabled powertools
- # OpenHPC Base
- dnf -y install ohpc-base
- # Chrony
- systemctl enable chronyd.service
- echo "local stratum 10" >> /etc/chrony.conf
- echo "server ${ntp_server}" >> /etc/chrony.conf
- echo "allow all" >> /etc/chrony.conf
- systemctl restart chronyd
- # SLURM Server
- dnf -y install ohpc-slurm-server
- cp /etc/slurm/slurm.conf.ohpc /etc/slurm/slurm.conf
- perl -pi -e "s/ControlMachine=\S+/ControlMachine=${sms_name}/" /etc/slurm/slurm.conf
- echo >> /etc/slurm/slurm.conf << 'EOF'
- # CloysterHPC Changes
- ReturnToService=2
- PartitionName=execution Nodes=ALL Default=YES MaxTime=INFINITE State=UP Oversubscribe=EXCLUSIVE
- NodeName=${sms_name} Sockets=1 CoresPerSocket=1 ThreadsPerCore=1 State=UNKNOWN
- EOF
- systemctl enable --now munge
- systemctl enable --now slurmctld
- # Infiniband
- dnf -y groupinstall "InfiniBand Support"
- # Hijack Network Manager DNS
- echo "[main]" > /etc/NetworkManager/conf.d/90-dns-none.conf
- echo "dns=none" >> /etc/NetworkManager/conf.d/90-dns-none.conf
- # OpenHPC Base Compute
- dnf -y install ohpc-base-compute
- # SLURM Client
- dnf -y ohpc-slurm-client
- echo SLURMD_OPTIONS="--conf-server ${sms_ip}" > /etc/sysconfig/slurmd
- systemctl enable --now slurmd
- # lmod
- dnf -y install lmod-ohpc
- # Limits
- perl -pi -e 's/# End of file/\* soft memlock unlimited\n$&/s' /etc/security/limits.conf
- perl -pi -e 's/# End of file/\* hard memlock unlimited\n$&/s' /etc/security/limits.conf
- # OpenHPC packages
- dnf -y install ohpc-autotools EasyBuild-ohpc hwloc-ohpc spack-ohpc valgrind-ohpc cmake-ohpc docs-ohpc
- dnf -y install openmpi4-gnu9-ohpc mpich-ofi-gnu9-ohpc mpich-ucx-gnu9-ohpc mvapich2-gnu9-ohpc
- dnf -y install lmod-defaults-gnu9-openmpi4-ohpc
- dnf -y install ohpc-gnu9*
- # Intel
- dnf -y install intel-oneapi-toolkit-release-ohpc
- dnf -y install intel-basekit intel-hpckit
- dnf -y install intel-compilers-devel-ohpc intel-mpi-devel-ohpc
- dnf -y install ohpc-intel*
- # CUDA
- cat > /etc/yum.repos.d/cuda-rhel8.repo << 'EOF'
- [cuda-rhel8-x86_64]
- name=cuda-rhel8-x86_64
- baseurl=https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64
- enabled=1
- gpgcheck=0
- EOF
- # NVHPC
- cat > /etc/yum.repos.d/nvhpc.repo << 'EOF'
- [nvhpc]
- name=nvhpc
- baseurl=https://developer.download.nvidia.com/hpc-sdk/rhel/$basearch
- enabled=1
- gpgcheck=0
- EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement