job dependency
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
### Give all resources to a single Ray task, ray can manage the resources internally
|
||||
#SBATCH --ntasks-per-node=1
|
||||
#SBATCH --cpus-per-task={cpus_per_node}
|
||||
|
||||
{dependency}
|
||||
|
||||
# Load modules or your own conda environment here
|
||||
{environment_setup}
|
||||
|
||||
@@ -92,6 +92,7 @@ def create_parser():
|
||||
parser.add_argument(
|
||||
"--command", default="run", choices=["run", "resume", "merge"], help="command to run"
|
||||
)
|
||||
parser.add_argument("--dependency", default=None, help="sbatch dependency argument")
|
||||
return parser
|
||||
|
||||
|
||||
@@ -112,6 +113,11 @@ def main():
|
||||
template = Paths.gets("submit_job_template")
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.dependency is None:
|
||||
args.dependency = ""
|
||||
else:
|
||||
args.dependency = f"#SBATCH --dependency={args.dependency}"
|
||||
|
||||
if not re.match(r"^[0-9]{2}:[0-9]{2}:[0-9]{2}$", args.time) and not re.match(
|
||||
r"^[0-9]+$", args.time
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user