See below for example of slurm batch script.
Let N= (number_of_nodes) * (number_of_cores_per_node)
number_of_cores_per_node is 16 for ikt.hyak and 32 for varies but could be more than 40 on mox.hyak assuming you had access to this newer node model.
Add these lines and end of the slurm script. Replace -n 32 by