hpc05.profile module¶
-
hpc05.profile.
create_local_pbs_profile
(profile='pbs', local_controller=False, custom_template=None)[source]¶ Creata a PBS profile for ipyparallel.
- Parameters
profile (str) – Profile name.
local_controller (bool) – Create a ipcontroller on a seperate node if True and locally if False.
custom_template (str) – A custom job script template, see the example below.
Examples
By default no memory is specified, using the following custom_template allows you to request a certain amount of memory.
import hpc05 import sys custom_template = f'''\ #!/bin/sh #PBS -t 1-{{n}} #PBS -V #PBS -N ipengine #PBS -l mem=15GB {sys.executable} -m ipyparallel.engine --profile-dir="{{profile_dir}}" --cluster-id="" ''' hpc05.create_local_pbs_profile('pbs_15GB', local_controller=False, custom_template=custom_template)
-
hpc05.profile.
create_local_slurm_profile
(profile='slurm', local_controller=False, custom_template=None)[source]¶ Creata a SLURM profile for ipyparallel.
- Parameters
profile (str) – Profile name.
local_controller (bool) – Create a ipcontroller on a seperate node if True and locally if False.
custom_template (str) – A custom job script template, see the example below.
Examples
By default no memory is specified, using the following custom_template allows you to request a certain amount of memory.
import hpc05 custom_template = '''\ #!/bin/sh #SBATCH --ntasks={n} #SBATCH --mem-per-cpu=4G #SBATCH --job-name=ipy-engine- srun ipengine --profile-dir='{profile_dir}' --cluster-id='' ''' hpc05.create_local_pbs_profile('pbs', False, custom_template)
-
hpc05.profile.
create_remote_pbs_profile
(hostname='hpc05', username=None, password=None, profile='pbs', local_controller=False, custom_template=None)[source]¶