diskpy.pychanga.mox package¶
Module contents¶
Created on Thu Apr 13 12:16:06 2017
@author: ibackus
-
diskpy.pychanga.mox.
sbatch_script
(workdir=None, param=’snapshot.param’, nodes=1, ppn=None, walltime=48, jobname=’sbatch_job’, email=None, changa_preset=’default’, partition=’vsm’, savepath=None, changa_args=”, runner_args=”, **kwargs)[source]¶ A not very robust function to generate SBATCH submission scripts for ChaNGa jobs on hyak. Some of the requirements include:
SBATCH (it’s on mox akak hyak2, don’t worry)
By default, any directory with ‘lastcheckpoint’ in it will be restarted! If you don’t want to just restart a simulation, delete lastcheckpoint from the simulation directory!
Parameters: workdir : str
(optional) Directory of the simulation. Default is current working directory
param : str
Filename of the .param file (not full path)
nodes : int
Number of computation nodes to request
ppn : int
(optional) Number of cores per node
walltime : float or int
Walltime to request in hours
jobname : str
Name of the job
email : str
Email address for PBS to send updates to
changa_preset : str
ChaNGa preset to use (see diskpy.global_settings and diskpy.pychanga.changa_command)
partition : str
mox partition (e.g. per group) to submit job to.
savepath : str
(optional) If supplied, save this script as an executable to this path.
changa_args, runner_args : str
Optional extra command line arguments to pass to changa and the runner (i.e. charmrun, mpirun…)
**kwargs
flag pairs. CAREFUL: these must not conflict with other flags. Flag,val
pairs (ie -flag val) are passed as: flag=val. To add an extra command
line parameter to sbatch, e.g. -flag val
Returns: PBS_script : str
A string for the PBS script. Can be saved easily to file