Skip to content

Commit

Permalink
Slurm restapi v0.0.40 environment variables were not being found
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-riggs committed Aug 13, 2024
1 parent 83f1fb4 commit b40b507
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cryoemservices/util/slurm_submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ def slurm_submission(
"current_working_directory": str(project_dir),
}
if api_version == "v0.0.38":
slurm_config["environment"] = {"USER": user, "HOME": user_home}
slurm_config["environment"] = {"USER": user, "HOME": user_home} # type: ignore
else:
slurm_config["environment"] = [f"USER: {user}", f"HOME: {user_home}"]
slurm_config["environment"] = [f"USER={user}", f"HOME={user_home}"] # type: ignore

# Add slurm partition and cluster preferences if given
if slurm_rest.get("partition"):
Expand All @@ -138,7 +138,7 @@ def slurm_submission(
slurm_json_job["memory_per_gpu"] = memory_request
else:
slurm_json_job["tres_per_task"] = "gres/gpu:1"
slurm_json_job["memory_per_node"]["number"] = memory_request
slurm_json_job["memory_per_node"]["number"] = memory_request # type: ignore
elif api_version == "v0.0.38":
slurm_json_job["memory_per_cpu"] = 1000

Expand Down

0 comments on commit b40b507

Please sign in to comment.