From 73e90e6dbf7bb01e4ba08f25fd54b215a5803d4e Mon Sep 17 00:00:00 2001 From: lenka Date: Thu, 28 Mar 2024 11:43:24 -0700 Subject: [PATCH] now sol passes --- .buildkite/pipeline.yml | 100 +++++++++++++++------------------------- 1 file changed, 36 insertions(+), 64 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index db9751183..7e0da909b 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -429,70 +429,42 @@ steps: slurm_mem: 20GB slurm_gpus: 1 - - group: "Bash scripts" - - # OPTION 1: - steps: - # - label: "batch script - part 1: first srun" - # command: - # - "sed -n '8,34p' test/mpi_tests/local_checks.sh | bash" - # env: - # CLIMACORE_DISTRIBUTED: "MPI" - # agents: - # slurm_ntasks: 2 - # slurm_mem: 16GB - - # - wait - - # - label: "batch script - part 2: second srun" - # command: - # - "sed -n '8,33p; 36,46p' test/mpi_tests/local_checks.sh | bash" - # env: - # CLIMACORE_DISTRIBUTED: "MPI" - # agents: - # slurm_ntasks: 2 - # slurm_mem: 16GB - - # - wait - - # - label: "batch script - part 3: check for output" - # command: "sed -n '8,24p; 47,$$p' test/mpi_tests/local_checks.sh | bash" - # agents: - # slurm_mem: 16GB - - # OPTION 2: - # - label: "Submit and Monitor sbatch Job on Caltech HPC" - # 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" - - # # 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}') - # START_TIME=$(date +%s) - # 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." - # exit 1 - # fi - # done - # agents: - # slurm_ntasks: 1 - # slurm_mem: 16GB + # - group: "Bash scripts" + + # steps: + + # - label: "Submit and Monitor sbatch Job on Caltech HPC" + # 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." + # exit 1 + # fi + # done + # agents: + # slurm_ntasks: 1 + # slurm_mem: 16GB - wait