Skip to content
Snippets Groups Projects
Commit e6992db0 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

tweak SLURM script setup

parent 32c41a12
Branches
Tags
No related merge requests found
Pipeline #54578 passed
...@@ -664,8 +664,14 @@ class _code(_base): ...@@ -664,8 +664,14 @@ class _code(_base):
# output file # output file
if not type(out_file) == type(None): if not type(out_file) == type(None):
script_file.write('#SBATCH -o ' + out_file + '\n') script_file.write('#SBATCH -o ' + out_file + '\n')
# set up environment
script_file.write('#SBATCH --get-user-env\n')
script_file.write('#SBATCH --partition={0}\n'.format( script_file.write('#SBATCH --partition={0}\n'.format(
self.host_info['environment'])) self.host_info['environment']))
if 'account' in self.host_info.keys():
script_file.write('#SBATCH --account={0}\n'.format(
self.host_info['account']))
nb_cpus_per_node = self.host_info['deltanprocs'] nb_cpus_per_node = self.host_info['deltanprocs']
assert isinstance(nb_cpus_per_node, int) \ assert isinstance(nb_cpus_per_node, int) \
......
...@@ -29,8 +29,9 @@ host_info = {'type' : 'pc'} ...@@ -29,8 +29,9 @@ host_info = {'type' : 'pc'}
# {'type' : info_template_type, # {'type' : info_template_type,
# 'MPI' : info_template_MPI, # 'MPI' : info_template_MPI,
# 'environment' : info_template_environment, # 'environment' : info_template_environment,
# 'deltanprocs' : info_template_deltanprocs # 'deltanprocs' : info_template_deltanprocs,
# 'mail_address': info_template_mail_address} # 'mail_address': info_template_mail_address,
# 'account' : info_template_account}
# info_template_type can be one of: # info_template_type can be one of:
# 'pc' --- jobs run interactively # 'pc' --- jobs run interactively
...@@ -50,3 +51,6 @@ host_info = {'type' : 'pc'} ...@@ -50,3 +51,6 @@ host_info = {'type' : 'pc'}
# info_template_mail_address, relevant for clusters, # info_template_mail_address, relevant for clusters,
# is the contact e-mail address placed in the job scripts. # is the contact e-mail address placed in the job scripts.
# info_template_account, relevant for some clusters,
# is the name of the account to be budgeted for the job.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment