From 016cc3889cadc441013380f88eb739d318f2a89b Mon Sep 17 00:00:00 2001
From: Matthew K Defenderfer <mdefende@uab.edu>
Date: Wed, 15 Jan 2025 12:02:38 -0600
Subject: [PATCH 1/2] Changed the default nodes and cores to make the job more
 parallel. Specifically increasing node count greatly reduces the runtime of
 mmpol, but that may also be due to the increase in the number of tasks (1
 task per node is created by default)

---
 src/run-policy/run-submit-pol-job.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/run-policy/run-submit-pol-job.py b/src/run-policy/run-submit-pol-job.py
index 064edc0..fb1a753 100755
--- a/src/run-policy/run-submit-pol-job.py
+++ b/src/run-policy/run-submit-pol-job.py
@@ -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',
-- 
GitLab


From 4559cc7377ce187bf096fa36641961636b544d49 Mon Sep 17 00:00:00 2001
From: Matthew K Defenderfer <mdefende@uab.edu>
Date: Wed, 15 Jan 2025 12:04:06 -0600
Subject: [PATCH 2/2] Implement changes to accepted node and core values. Also
 remove the type check as that is done implicitly by argparse. That type check
 was incorrectly causing the value validation to be skipped

---
 src/run-policy/run-submit-pol-job.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/run-policy/run-submit-pol-job.py b/src/run-policy/run-submit-pol-job.py
index fb1a753..38891ea 100755
--- a/src/run-policy/run-submit-pol-job.py
+++ b/src/run-policy/run-submit-pol-job.py
@@ -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):
-- 
GitLab