Unverified Commit 1b8943c1 authored by Pascal Roth's avatar Pascal Roth Committed by GitHub

Removes additional sbatch and fixes default profile in cluster deployment (#1229)

# Description

In the slum workflow, currently, there was an unnecessary `sbatch`
command; this PR removes it. In addition, the profile argument was
marked as optional, but when a job was submitted, and job arguments were
passed, it became necessary. This PR fixes this behavior.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent cc7112c6
...@@ -62,11 +62,9 @@ submit_job() { ...@@ -62,11 +62,9 @@ submit_job() {
case $CLUSTER_JOB_SCHEDULER in case $CLUSTER_JOB_SCHEDULER in
"SLURM") "SLURM")
CMD=sbatch
job_script_file=submit_job_slurm.sh job_script_file=submit_job_slurm.sh
;; ;;
"PBS") "PBS")
CMD=bash
job_script_file=submit_job_pbs.sh job_script_file=submit_job_pbs.sh
;; ;;
*) *)
...@@ -75,7 +73,7 @@ submit_job() { ...@@ -75,7 +73,7 @@ submit_job() {
;; ;;
esac esac
ssh $CLUSTER_LOGIN "cd $CLUSTER_ISAACLAB_DIR && $CMD $CLUSTER_ISAACLAB_DIR/docker/cluster/$job_script_file \"$CLUSTER_ISAACLAB_DIR\" \"isaac-lab-$profile\" ${@}" ssh $CLUSTER_LOGIN "cd $CLUSTER_ISAACLAB_DIR && bash $CLUSTER_ISAACLAB_DIR/docker/cluster/$job_script_file \"$CLUSTER_ISAACLAB_DIR\" \"isaac-lab-$profile\" ${@}"
} }
#== #==
...@@ -162,11 +160,17 @@ case $command in ...@@ -162,11 +160,17 @@ case $command in
scp $SCRIPT_DIR/exports/isaac-lab-$profile.tar $CLUSTER_LOGIN:$CLUSTER_SIF_PATH/isaac-lab-$profile.tar scp $SCRIPT_DIR/exports/isaac-lab-$profile.tar $CLUSTER_LOGIN:$CLUSTER_SIF_PATH/isaac-lab-$profile.tar
;; ;;
job) job)
[ $# -ge 1 ] && profile=$1 && shift if [ $# -ge 1 ]; then
passed_profile=$1
if [ -f ".env.$passed_profile" ]; then
profile=$passed_profile
shift
fi
fi
job_args="$@" job_args="$@"
echo "Executing job command" echo "[INFO] Executing job command"
[ -n "$profile" ] && echo "Using profile: $profile" [ -n "$profile" ] && echo -e "\tUsing profile: $profile"
[ -n "$job_args" ] && echo "Job arguments: $job_args" [ -n "$job_args" ] && echo -e "\tJob arguments: $job_args"
source $SCRIPT_DIR/.env.cluster source $SCRIPT_DIR/.env.cluster
# Get current date and time # Get current date and time
current_datetime=$(date +"%Y%m%d_%H%M%S") current_datetime=$(date +"%Y%m%d_%H%M%S")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment