Sure. You just have to be a bit careful with the setup, depending on the network topology on the cluster.
There is a bit of a discussion in the manual. Often you need to dynamically adjust the settings of i-PI from
the SLURM script, e.g. change <address> field to reflect the IP of the node i-pi runs on, and change
accordingly the input of the driver code to connect to it