The author disables SMT (hyperthreading) like this:
disabled_cpus=(1 3 5 7 9 11 13 15)
for cpu_no in $disabled_cpus ; do
echo 0 | sudo tee /sys/devices/system/cpu/cpu$cpu_no/online
done
But there is an easier way on Linux that doesn't require parsing /sys/devices/system/cpu/cpu*/topology/thread_siblings_list:
sudo tee /sys/devices/system/cpu/smt/control <<< off