Skip to content
Snippets Groups Projects

Change default node and core requests for policy runs

1 file
+ 9
9
Compare changes
  • Side-by-side
  • Inline
@@ -26,15 +26,15 @@ def parse_args():
help="Include directories as entries in the policy output (Default: false)")
sbatch = parser.add_argument_group('sbatch parameters')
sbatch.add_argument('-N','--nodes',type=int,default=1,
help='Number of nodes to run job across')
sbatch.add_argument('-c','--cores',type=int,default=16,
help='Number of cores to request')
sbatch.add_argument('-N','--nodes',type=int,default=6,
help='Number of nodes to run job across. Can be between 1 and 16')
sbatch.add_argument('-c','--cores',type=int,default=8,
help='Number of cores to request per node. Can be between 1 and 16')
sbatch.add_argument('-p','--partition',type=str,default='amd-hdr100,medium',
help='Partition to submit job to. Can be a comma-separated list of multiple partitions')
sbatch.add_argument('-t','--time',type=str,default='24:00:00',
help='Time limit for job formatted as [D-]HH:MM:SS')
sbatch.add_argument('-m','--mem-per-cpu',type=str,default='8G',
sbatch.add_argument('-m','--mem-per-cpu',type=str,default='6G',
help='Amount of RAM to allocate per core')
parser.add_argument('--dry-run', action='store_true',
@@ -94,12 +94,12 @@ def validate_partition(partition):
return partition
def validate_nodes(n):
if not isinstance(n,int) and n >= 1 and n <= 4:
raise ValueError('Nodes must be an integer between 1 and 4')
if not (n >= 1 and n <= 16):
raise ValueError('Nodes must be an integer between 1 and 16')
def validate_cores(n):
if not isinstance(n,int) and n >= 1 and n <= 48:
raise ValueError('Cores must be an integer between 1 and 48')
if not (n >= 1 and n <= 16):
raise ValueError('Cores per node must be an integer between 1 and 16')
# Need to validate that the output directory exists. This will not create a directory that does not already exist.
def validate_output_directory(outdir):
Loading