Eureka Installation: Computing Node - calab-ntu/gpu-cluster GitHub Wiki
Choose one of the following two approaches.
- Component list: CPU, GPU, motherboard, power supply, SSD (256G), RAM (16G*8), water cooler
- Wash hands, dry, and touch metal to discharge
- NVIDIA RTX 2080 Super GPU:
- Plug-in two (6+2)-pin power cables
- Install on the PCIe x16 slot closest to RAM
- Remove the protective film on the back of GPU and repaste the NTU property tag
- Verify that the GPU BIOS hardware switch is set to
P MODE(performance) instead ofQ MODE(quiet)
- Power cable: use the one shipped together with the power supply
- Water cooler
- Cooling fan orientation: consistent with other nodes
- Use the PWM instead of AUTO mode
- Thermal paste MUST firmly touches CPU
- Copper pillar x10
- Reset and power switches
- Wire trimming
- Labels: MB, power cable, IB cable, Ethernet cable, cabinet
- Ethernet cable: use the left (black) RJ45 port instead of the right (red) one
- Connect all power plugs on the MB
- CPU 8 pin x2
- ATX 24 pin
- Water cooler (use CPU_FAN2/WP)
- Ground both MB and power supply
-
Update BIOS to 1.30
- Install the USB stick
Packages - Press
F2during boot -
Tool->Instant Flash-> It should automatically find the file\bios\X399PGH1.30->Update(use Tab to switch)
- Install the USB stick
-
Enable NUMA
- Reboot and
F2 -
Advanced->AMD CBS->DF Common Options->Memory interleaving->Channel
- Reboot and
-
Verification
- Reboot and
F2 -
Main:UEFI Version=P1.30 -
Main:-
Total Memory= 131072MB
--> If less than this number, check the missing slot(s) (e.g.,DDR4_A1) and reinstall the RAM Quadruple-Channel Memory Mode- Frequency of all 8 slots should be
DDR4-2933
--> If the frequency is wrong, clickOC Tweakerand set
-
Load XMP Setting=XMP 2.0 Profile 1
-
DRAM Frequency=DDR4-2933
-
-
-
CPU_FAN2=WMP
- Reboot and
-
Shut down the system
-
Install USB stick
CentOS -
Turn on the computer and press
F2to go to the BIOS-
Boot->Boot Option #1->UEFI: KingstonDataTraveler 3.0 Partition 2 -
Exit->Save Changes and Exit
-
-
Test this media & install CentOS 7 -
Installation summary:
-
LANGUAGE:English (United States) -
DATE & TIME:Asia, Taipei -
SOFTWARE SELECTION:Development and Creative Workstation- Additional Development
- Compatibility Libraries
- Development Tools
- Emacs
- File and Storage Server
- Hardware Monitoring Utilities
- Infiniband Support
- Legacy X Window System Compatibility
- Network File System Client
- Platform Development
- Python
- Technical Writing
- Additional Development
-
INSTALLATION DESTINATION:- Select
INTEL SSD -
Partitioning->I will configure partitioning->Done->Click here to create them automatically
-> Verify that the total space is about 256 GB (238.47 GiB in my test)
->/home: click-to remove it since we will mount a remote home
/: 221 GiB
swap: 16 GiB
->Done->Accept Changes
- Select
- NETWORK & HOST NAME:
-
Ethernet->ON -
Host name(on the bottom left corner): eurekaXX ->Apply
-
- After finishing (a)-(e) above, press
Begin Installation(ignore the warning about SMT) - Set root password
-
-
The installation will take ~10 min
- Reboot -> Accept the EULA agreement ->
FINISH CONFIGURATION -
Location Services: OFF
Time Zone:Taipei, Taiwan
Connect Your Online Accounts:Skip
About You: (this account will be removed later)
Full Name: tmp_account
Username: tmp_account
Password: ********
- Unplug the USB stick
- Reboot -> Accept the EULA agreement ->
-
Validate kernel (switch to root)
uname -r # 3.10.0-1062.el7.x86_64 -
Set up network
-
Edit
/etc/sysconfig/network-scripts/ifcfg-XXX, where XXX is usually "enpXXX"BOOTPROTO=static ONBOOT=yes IPADDR=192.168.0.1XX # Replace XX by the node number + 50 (node number = 00 for the login node) GATEWAY=192.168.0.1 NETMASK=255.255.255.0 DNS1=140.112.254.4 -
Disable the network interface
virbr0
--> It prevents MPI from working properly
--> Ref: https://www.thegeekdiary.com/centos-rhel-67-how-to-disable-or-delete-virbr0-interface/virsh net-autostart default --disable
-
Disable SELinux and firewall (necessary for torque)
setenforce 0 sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config # or just edit "/etc/selinux/config" directly systemctl stop firewalld systemctl disable firewalld sestatus # Check the SELinux status # --> Before reboot, it should show # SELinux status: enabled # Current mode: permissive # --> After reboot, it should show # SELinux status: disabled
-
Shut down the system, move it to the computer room, and plug in the Ethernet cable
-
Boot -> validate network
- Ethernet port LED is on
- Switch LED is on (green for 1 Gb/s)
ping 192.168.0.150-
ifconfig: Novirbr0interface
-
-
Update kernel to kernel-3.10.0-1160.****
- Edit
/etc/yum.repos.d/CentOS-*: Change the mirror source frommirror.centos.orgtovault.centos.orgref. https://serverfault.com/questions/1161816/mirrorlist-centos-org-no-longer-resolve
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo - Update kernel
yum install -y kernel-3.10.0-1160 #press <tab> to fill up availible version
- Edit
-
Remove the temporary user
userdel -r tmp_account -
NFS client
- Auto mount
scp 192.168.0.150:/work1/shared/eureka/etc/hosts /etc/hosts ssh eureka00 cat /work1/shared/eureka/etc/fstab >> /etc/fstab - Create folders
mkdir /software /work1 /project /projectX /projectY /projectZ
- Check the accessibility of the target NFS servers:
showmount -e eureka00 # /software 192.168.0.0/24 showmount -e tumaz # /home 192.168.0.0/24 showmount -e ironman # /volume1/gpucluster1 192.168.0.0/24 # /volume2/gpucluster2 192.168.0.0/24 # /volume3/gpucluster3 192.168.0.0/24 showmount -e eater # /volume1/gpucluster3 192.168.0.0/24 # /volume2/gpucluster4 192.168.0.0/24
- Mount all remote folders
mount /software; mount /home; mount /work1; mount /project; mount /projectX; mount /projectY; mount /projectZ df # Check if all folders have been mounted
- Auto mount
-
CUDA
-
[For current system] Update system
yum -y update -
Set the text mode as default (since the NVIDIA driver cannot be installed while X window is running)
systemctl set-default multi-user.target
Check it with
systemctl get-default # It should show "multi-user.target" instead of "graphical.target" -
Reboot
-
Install EPEL and ELRepo
# [Optional] yum may fail due to incorrect local system time (which causes failure of certification) # --> Solution 1: reset system time directly with, for example, 'date -s "2020-03-22 19:06:26"' # --> Solution 2: enable NTP by following step 3-(5) below yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum -y install https://www.elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm
-
Install dkms
yum -y install dkms
-
Disable the display driver
nouveau-
Add the following line to the end of
GRUB_CMDLINE_LINUXin/etc/default/grubrd.driver.blacklist=nouveau nouveau.modeset=0
Alternatively, one can simply copy it from
cp /work1/shared/eureka/etc/grub /etc/default/grub
-
Execute the following
grub2-mkconfig -o /boot/grub2/grub.cfg echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf echo "options nouveau modeset=0" >> /etc/modprobe.d/blacklist.conf mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img dracut /boot/initramfs-$(uname -r).img $(uname -r) grub2-mkconfig -o /boot/grub2/grub.cfg
-
Reboot
-
Verify that the nouveau driver is not loaded
lsmod | grep nouveau # It should print nothing
-
-
Install the CUDA driver
-
[Optional] Disable persistence and MPS daemons if you are upgrading an existing driver
nvidia-smi -pm 0 echo quit | nvidia-cuda-mps-control
-
Install with
sh /work1/shared/eureka/package/cuda/cuda_11.3.1_465.19.01_linux.run --silent --driver
-
Validate with
cat /proc/driver/nvidia/version # NVIDIA driver: 465.19.01; gcc: 4.8.5 -
Copy initialization scripts
cp /work1/shared/eureka/init_script/*.sh /etc/profile.d/ cp /work1/shared/eureka/init_script/*.csh /etc/profile.d/ cp /work1/shared/eureka/etc/rc.local /etc/rc.d/ chmod +x /etc/rc.d/rc.local
-
[Optional] Comment out the line
nvidia-cuda-mps-control -din/etc/rc.d/rc.localto disable MPS on nodes runningtensorflowon pre-Volta GPUs (e.g.,eureka32andeureka33). It is because stream callbacks are not supported on pre-Volta MPS clients; see https://docs.nvidia.com/deploy/pdf/CUDA_Multi_Process_Service_Overview.pdf. -
[Optional] Edit
/etc/rc.d/rc.localto make cuda double GPU node could identify both GPUsexport CUDA_VISIBLE_DEVICE=0,1 nvidia-smi -i 0,1 -c EXELUSIVE_PROCESS -
Reboot
-
Validate the following
nvidia-smi -q | grep Persistence # Enabled nvidia-smi -q | grep "Driver Version" # 440.33.01 nvidia-smi -q | grep "CUDA Version" # 10.2 nvidia-smi -q | grep "Compute Mode" # Exclusive_Process ps -ef | grep mps # nvidia-cuda-mps-control -d
-
-
-
NIS client
-
Install
yum -y install ypbind
-
Configure
setup # [Authentication configuration] -> [Use NIS]Domain: tumaz.gpucluster.calab IP: tumazsystemctl is-enabled ypbind # enabled -
Do not create the perl5 directory by setting
PERL_HOMEDIR=0in/etc/profile.d/perl-homedir.sh
-
Reboot
-
Validate the following
yptest # "1 tests failed" # "Test 9: yp_all" should list all accounts # "Test 3" may fail with the message "WARNING: No such key in map (Map passwd.byname, key nobody)" ypwhich # tumaz.gpucluster.calab ls -l /home # Show correct user and group names instead of just UID and GID # Log in using an existing user account
-
-
NTP client
yum -y install ntp systemctl start ntpd systemctl enable ntpd systemctl is-enabled ntpd # enabled
-
TORQUE
-
Install the required packages
yum -y install tcl-devel tk-devel
-
Install torque
cd /work1/shared/eureka/package/torque/src/torque-3.0.6 # WARNING: do NOT run "Fish_Install.sh" in parallel (i.e., install one node at a time) sh Fish_Install.sh >& log.eurekaXX cd ../../etc cp pbs /etc/init.d/ # Login node only: edit "pbs.conf" to set "start_server=1" and "start_mom=0" cp pbs.conf /etc/ cp nodes /var/spool/TORQUE/server_priv/nodes systemctl enable pbs source /etc/profile.d/torque.sh cd ../src/torque-3.0.6/ ./torque.setup root killall pbs_server systemctl start pbs # This error message is fine: "LOG_ERROR::No such file or directory (2) in read_config, fstat: config" systemctl status pbs
-
Check
cat /var/spool/TORQUE/pbs_environment # LANG=en_US.utf-8
-
-
InfiniBand
-
Install driver
Follow Eureka Installation: InfiniBand -->
ADAPTOR-->Install Driver -
[Ref] Hardware list
Adaptor: MCX555A-ECAT
ConnectX®-5 VPI adapter card, EDR IB (100Gb/s) and 100GbE,
single-port QSFP28, PCIe3.0 x16, tall bracketSwitch: MSB7800-ES2F
Switch-IB(TM) 2 based EDR InfiniBand 1U Switch, 36 QSFP28
ports, 2 Power Supplies (AC), x86 dual core, standard depth, P2C
airflow, Rail Kit
-
-
Miscellaneous setup
-
sensorsyum -y install lm_sensors # sensors-detect --auto # skip this since it could be dangerous; see WARNING in “man sensors-detect” sensors # Verify that the reading of "temp1" under "k10temp-pci-XXXX" is normal (~50C) # Ref: https://hwmon.wiki.kernel.org/device_support_status_a_c # https://www.guru3d.com/articles-pages/amd-ryzen-threadripper-2950x-review,8.html # I **guess** temp1 is Tctl and thus Tdie=temp1-offset, where offset=27C, is the correct temperature # to be compared with the CPU critical temperature
-
gnuplot,htopyum -y install gnuplot htop
-
ssh without password for the root
cd /work1/shared/eureka/ssh_root/ cp authorized_keys id_rsa* /root/.ssh/ # Verification ssh eureka00 # "yes" to "continue connecting" ssh eurekaXX # "yes" to "continue connecting" exit exit
-
Intel compiler
cd /opt ln -s /software/intel rm -rf ./rh # not related to Intel, actually
-
ffmpegrpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm yum -y install ffmpeg ffmpeg-devel
-
Time stamp of command history
su- Add
export HISTTIMEFORMAT='%d/%m/%y %T 'to the end of file/etc/profile source /etc/profile- Check by
history
-
-
Python2 (Choose)
*. [For current system]sh /work1/xuanshan/install-python-packages.sh*. [Original steps] (Not usable due to pip version is too old to be update.)# install packages sh /work1/shared/eureka/package/python/install-packages.sh # [Optional] If the installation of mpi4py fails (which somehow freezes the screen and causes failure of yt after reboot), # follow the steps below: pip uninstall mpi4py cd /usr/lib64/python2.7/site-packages rm -rf yt yt-3.5.1.dist-info pip install yt pip install mpi4py # check dependency pip check ipython numpy cython jupyter h5py scipy astropy matplotlib yt mpi4py # No broken requirements found. # check MPI su YOUR_ACCOUNT mpirun -n 16 python -m mpi4py.bench helloworld # Hello, World! I am process ? of 16 on eurekaXX. # check yt cd /tmp cp -r /work1/shared/eureka/test/yt ./test-yt cd test-yt sh test.sh # It should generate two PNG images Data_000000_Projection_z_density.png & Data_000001_Projection_z_density.png cd .. rm -rf test-yt # check HDF5 python -c 'import h5py; print( "%s"%h5py.version.hdf5_version )' # 1.0.6 -
Python3
cd /work1/shared/eureka/package/python3/Python3.9.10make clean./configure --enable-optimizations --enable-sharedmake altinstallcp libpython3.9.so.1.0 /usr/lib64/- Check
python3.9 - Make link python3 to python3.9:
rm /usr/bin/python3ln -s /usr/local/bin/python3.9 /usr/bin/python3 - Update pip
pip3 install -U pip - Install necessary packages
pip3 install --ignore-installed pyparsing pip3 install --upgrade dnspython pip3 install --upgrade pyudev pip3 install --ignore-installed --upgrade python-ldap pip3 install --upgrade ipython pip3 install --upgrade numpy pip3 install --upgrade cython pip3 install --upgrade six pip3 install --upgrade urllib3 pip3 install idna==2.10 pip3 install --upgrade certifi pip3 install chardet==4.0.0 pip3 install --upgrade jupyter export HDF5_DIR=/software/hdf5/default pip3 install --no-binary=h5py h5py pip3 install --upgrade scipy pip3 install --upgrade astropy pip3 install --upgrade matplotlib pip3 install --upgrade gitpython pip3 install --upgrade pandas - Install yt [Choose one]
If option 1 failed, remove yt package and try option 2
- [Option 1]
- Install:
pip3 intsall -U yt - Check:
python3 -c "import yt"
- Install:
- [Option 2]
cd /work1/shared/eureka/package/python3/ytpip3 install -e .- Check:
python3 -c "import yt"
- Final check:
yt version
- [Option 1]
- Install remain packages
pip3 install mpi4py pip3 install dulwich pip3 install girder-client - Install
cmakeyum -y install cmake3
-
Check
-
NUMA
lscpu | grep NUMA # It should show **2** NUMA nodes
-
Memory frequency
dmidecode -t memory | grep Speed # It should show **Speed: 2933 MT/s; Configured Memory Speed: 2933 MT/s**
-
Queuing system and GAMER performance
# log in to eureka00 su your_account qsub -I -lnodes=eurekaXX:ppn=16 cd /tmp cp -r /work1/shared/eureka/test/gamer/bin/template/ tmp-gamer cd tmp-gamer mpirun -map-by ppr:4:socket:pe=4 --report-bindings ./gamer awk 'NR>1 {print $7}' Record__Performance # Performance should be ~4.2e7 cd .. rm -rf ./tmp-gamer/ exit
-
[Optional] CPU/GPU temperature
/work1/shared/eureka/benchmark/temperature
-
Malware scanner
ClamAV- Install
ClamVA:yum install -y clamav clamd clamav-update - Download and update ClamAV’s official virus signature databases:
freshclam - Scan directories:
clamscan /etc/* /opt/* /boot/* /usr/* /tmp/* /sys/* /run/* /root/* /var/* - Check result:
If
----------- SCAN SUMMARY ----------- Engine version: 0.103.5 Scanned directories: 5 Scanned files: 2774 Infected files: 0 Data scanned: 565.18 MB Data read: 668.04 MB (ratio 0.85:1) Time: 50.516 sec (0 m 50 s) Start Date: 2022:05:12 10:21:31 End Date: 2022:05:12 10:22:22Infected filesis 0, then pass.
- Install
-
Ref:
- https://docs.clamav.net/Introduction.html
- https://openfind.freshdesk.com/support/solutions/articles/35000185768-centos-7-%E5%AE%89%E8%A3%9D-clamav-sop
Boot this machine with Ubuntu Live USB
-
Show all the disk found on this machine
lsblk -
Make the mount point
mkdir /mnt/slash mkdir /mnt/boot mkdir /mnt/boot_efi #if the successful installed centos 7 has mkdir /mnt/usb -
Mount centos 7 on the
/mntin Ubuntu Live USB -
Mount the root , since it is LV(logical volume) , required more cared
lvscan # scan lv are to be fount vgchange -ay # activate this lvm volume (if not activated) , so that we can mount lvscan mount /dev/centos/root /mnt/slash
-
Mount Centos 7
/bootand/boot/efi(if has) , on the/mntin Ubuntu Live USBmount /dev/nvme0n1p1 /mnt/boot_efi mount /dev/nvme0n1p2 /mnt/boot
-
Clone each partition inside the mounted USB
cd /mnt/usb mkdir slash mkdir boot mkdir boot_efi rsync -avHX /mnt/slash/ /mnt/usb/slash/ # Clone the root, may take a while rsync -avHX /mnt/boot_efi/ /mnt/usb/boot_efi/ # Clone the /boot/efi (if has) rsync -avHX /mnt/boot/ /mnt/usb/boot/ # Clone the /boot
-
Unmount the usb
umount /mnt/usb # Might take a while umount /mnt/slash umount /mnt/boot umount /mnt/boot_efi
(Boot with Ubuntu Live USB), NOT TESTED YET
-
Using GParted, to partition the (target) disk, should be the same as (source) disk
boot boot efi centos swap -
Mount the ssd to Ubuntu Live USB
mkdir /mnt/slash mkdir /mnt/boot mkdir /mnt/boot_efi (if the successful installed centos 7 has) mkdir /mnt/usb mount ... # same steps as mounting the source , mount (target)ssd and the usb -
Clone the OS for each partition from the usb to ssd
rsync -avHX /mnt/usb/slash/ /mnt/slash/ rsync -avHX /mnt/usb/boot/ /mnt/boot/ rsync -avHX /mnt/usb/boot_efi/ /mnt/boot_efi/
-
Change the UUID in
/etc/fstabfile on the target machinels -l /dev/disk/by-uuid # ways to view the disk UUID blkid /dev/sdaX # ways to view the disk UUID, but I think should change to "blkid /dev/centos/root" , since that's how we mount it. vim /mnt/slash/etc/fstab # Since we mount the centos root (ssd) at /mnt/slash/
-
Reinstall Grub
mount --bind /proc /mnt/slash/proc # Bind mount some system directories needed by grub mount --bind /sys /mnt/slash/sys mount --bind /dev /mnt/slash/dev mount --bind /run /mnt/slash/run chroot /mnt/slash # Change the root environment, so that we can call grub install inside # the migrated system (now, the target system) grub-install /dev/sda # Probably should change to "grub-install /dev/centos/root" , since that's how we mount it. update-grub
-
Done, reboot the target machine!