Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
LenkaNovak committed Mar 28, 2024
1 parent fc6144e commit d36ea0b
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,42 +429,42 @@ steps:
slurm_mem: 20GB
slurm_gpus: 1

- group: "Bash scripts"
steps:
- label: "Submit and Monitor sbatch Job on Caltech HPC"
# check that (1) the script can be succesfully submitted, (2) it runs successfully
command: |
"
#!/bin/bash
# # Submit the sbatch script and capture its job ID
# JOB_ID=$(sbatch test/mpi_tests/local_checks.sh | awk '{print $4}')
# echo "Submitted job with ID: $JOB_ID, output log: slurm-$JOB_ID.out"
# START_TIME=$(date +%s)
# # Loop until the job finishes
# while true; do
# # Check the status of the job
# STATUS=$(squeue -j $JOB_ID | grep $JOB_ID | awk '{print $5}')
# ELAPSED_TIME=$(( $(date +%s) - $START_TIME ))
# # If the job status is 'PD' (pending) or 'R' (running), wait and continue checking
# if [ "$STATUS" == "PD" ] || [ "$STATUS" == "R" ]; then
# sleep 60
# echo "Job is still running... Elapsed time: $ELAPSED_TIME seconds."
# # If the job status is 'CF' (completed successfully), print success message and exit
# elif [ "$STATUS" == "CF" ]; then
# echo "Job completed successfully."
# exit 0
# # If the job status is anything else, print error message and exit
# else
# echo "Error: Job failed or terminated. See slurm-$JOB_ID.out for more information."
# exit 1
# fi
# done
"
agents:
slurm_ntasks: 1
# - group: "Bash scripts"
# steps:
# - label: "Submit and Monitor sbatch Job on Caltech HPC"
# # check that (1) the script can be succesfully submitted, (2) it runs successfully
# command: |
# "
# #!/bin/bash

# # Submit the sbatch script and capture its job ID
# JOB_ID=$(sbatch test/mpi_tests/local_checks.sh | awk '{print $4}')
# echo "Submitted job with ID: $JOB_ID, output log: slurm-$JOB_ID.out"
# START_TIME=$(date +%s)

# # Loop until the job finishes
# while true; do
# # Check the status of the job
# STATUS=$(squeue -j $JOB_ID | grep $JOB_ID | awk '{print $5}')
# ELAPSED_TIME=$(( $(date +%s) - $START_TIME ))

# # If the job status is 'PD' (pending) or 'R' (running), wait and continue checking
# if [ "$STATUS" == "PD" ] || [ "$STATUS" == "R" ]; then
# sleep 60
# echo "Job is still running... Elapsed time: $ELAPSED_TIME seconds."
# # If the job status is 'CF' (completed successfully), print success message and exit
# elif [ "$STATUS" == "CF" ]; then
# echo "Job completed successfully."
# exit 0
# # If the job status is anything else, print error message and exit
# else
# echo "Error: Job failed or terminated. See slurm-$JOB_ID.out for more information."
# exit 1
# fi
# done
# "
# agents:
# slurm_ntasks: 1

- wait

Expand Down

0 comments on commit d36ea0b

Please sign in to comment.