Some machines need specific preparations before a job can be run. Provide some simple functionality to run some local preparation code, if it is available.
This could look like this:
Add a local_setup() function at the beginning of your script.
This function checks if a ~/.pythonrc.pyexists and execute it if it exists.
The important use case for us is to set up the Gurobi-license, which is individual for every workstation. We usually do this via the .bashrc resp. .zshrc but this is not executed when using slurm.
Can now be done via node_setup. This function can be anywhere in the imported code, thus, enabling simple setup e.g. by just importing a custom package import ibr_alg_utils.
Some machines need specific preparations before a job can be run. Provide some simple functionality to run some local preparation code, if it is available. This could look like this:
local_setup()
function at the beginning of your script.~/.pythonrc.py
exists and execute it if it exists.The important use case for us is to set up the Gurobi-license, which is individual for every workstation. We usually do this via the
.bashrc
resp..zshrc
but this is not executed when using slurm.