mllg / batchtools

Tools for computation on batch systems
https://mllg.github.io/batchtools/
GNU Lesser General Public License v3.0
170 stars 51 forks source link

Specify username for Slurm #229

Open sklas opened 5 years ago

sklas commented 5 years ago

Hi,

is it possible to specify a username for job submission to slurm? I would like to use different users on the slurm and the system where batchtools is running, but could not find an option for that.

Best, Steffen

mllg commented 5 years ago

How would you do this without batchtools?

Do you want to login as a different user via ssh? Then you should be able to set your username as part of the nodename, e.g. sklas@ip.of.masternode instead of ip.of.masternode.

sklas commented 5 years ago

Yes, thats what I wanted to do. Thanks! Does this also work with all clusterfunctions? I've seen some calls to the $USER environment variable in the code, but don't know if called on the cluster or on the submitting system

mllg commented 5 years ago

$USER should evaluate to the user on the remote machine. However, getting the quoting right is horrible, so I would not be surprised if you encounter any bugs here.