Advertisement
viniciusferrao

Prerelease Cloyster script

Apr 29th, 2023
956
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.59 KB | None | 0 0
  1. [ferrao@westfall html]$ cat workstation-install.sh
  2. #!/bin/sh
  3. # CloysterHPC Workstation
  4.  
  5. # vars: ${sms_name} ${sms_ip} ${ntp_server}
  6.  
  7. echo ${sms_ip} ${sms_name} >> /etc/hosts
  8. dnf -y install http://repos.openhpc.community/OpenHPC/2/EL_8/x86_64/ohpc-release-2-1.el8.x86_64.rpm
  9.  
  10. dnf -y install dnf-plugins-core
  11. dnf config-manager --set-enabled powertools
  12.  
  13. # OpenHPC Base
  14. dnf -y install ohpc-base
  15.  
  16. # Chrony
  17. systemctl enable chronyd.service
  18. echo "local stratum 10" >> /etc/chrony.conf
  19. echo "server ${ntp_server}" >> /etc/chrony.conf
  20. echo "allow all" >> /etc/chrony.conf
  21. systemctl restart chronyd
  22.  
  23. # SLURM Server
  24. dnf -y install ohpc-slurm-server
  25. cp /etc/slurm/slurm.conf.ohpc /etc/slurm/slurm.conf
  26. perl -pi -e "s/ControlMachine=\S+/ControlMachine=${sms_name}/" /etc/slurm/slurm.conf
  27.  
  28. echo >> /etc/slurm/slurm.conf << 'EOF'
  29. # CloysterHPC Changes
  30. ReturnToService=2
  31. PartitionName=execution Nodes=ALL Default=YES MaxTime=INFINITE State=UP Oversubscribe=EXCLUSIVE
  32. NodeName=${sms_name} Sockets=1 CoresPerSocket=1 ThreadsPerCore=1 State=UNKNOWN
  33. EOF
  34.  
  35. systemctl enable --now munge
  36. systemctl enable --now slurmctld
  37.  
  38. # Infiniband
  39. dnf -y groupinstall "InfiniBand Support"
  40.  
  41. # Hijack Network Manager DNS
  42. echo "[main]" > /etc/NetworkManager/conf.d/90-dns-none.conf
  43. echo "dns=none" >> /etc/NetworkManager/conf.d/90-dns-none.conf
  44.  
  45. # OpenHPC Base Compute
  46. dnf -y install ohpc-base-compute
  47.  
  48. # SLURM Client
  49. dnf -y ohpc-slurm-client
  50. echo SLURMD_OPTIONS="--conf-server ${sms_ip}" > /etc/sysconfig/slurmd
  51. systemctl enable --now slurmd
  52.  
  53. # lmod
  54. dnf -y install lmod-ohpc
  55.  
  56. # Limits
  57. perl -pi -e 's/# End of file/\* soft memlock unlimited\n$&/s' /etc/security/limits.conf
  58. perl -pi -e 's/# End of file/\* hard memlock unlimited\n$&/s' /etc/security/limits.conf
  59.  
  60. # OpenHPC packages
  61. dnf -y install ohpc-autotools EasyBuild-ohpc hwloc-ohpc spack-ohpc valgrind-ohpc cmake-ohpc docs-ohpc
  62. dnf -y install openmpi4-gnu9-ohpc mpich-ofi-gnu9-ohpc mpich-ucx-gnu9-ohpc mvapich2-gnu9-ohpc
  63. dnf -y install lmod-defaults-gnu9-openmpi4-ohpc
  64. dnf -y install ohpc-gnu9*
  65.  
  66. # Intel
  67. dnf -y install intel-oneapi-toolkit-release-ohpc
  68. dnf -y install intel-basekit intel-hpckit
  69. dnf -y install intel-compilers-devel-ohpc intel-mpi-devel-ohpc
  70. dnf -y install ohpc-intel*
  71.  
  72. # CUDA
  73. cat > /etc/yum.repos.d/cuda-rhel8.repo << 'EOF'
  74. [cuda-rhel8-x86_64]
  75. name=cuda-rhel8-x86_64
  76. baseurl=https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64
  77. enabled=1
  78. gpgcheck=0
  79. EOF
  80.  
  81. # NVHPC
  82. cat > /etc/yum.repos.d/nvhpc.repo << 'EOF'
  83. [nvhpc]
  84. name=nvhpc
  85. baseurl=https://developer.download.nvidia.com/hpc-sdk/rhel/$basearch
  86. enabled=1
  87. gpgcheck=0
  88. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement