99 run-command :
1010 runs-on : [self-hosted, linux] # adjust labels if you used custom ones
1111 steps :
12- - name : Checkout code
13- uses : actions/checkout@v4
12+ # - name: Checkout code
13+ # uses: actions/checkout@v4
1414
1515 # - name: Run your HPC command
1616 # run: |
2121 # sbatch test.sh
2222 - name : Submit and monitor SLURM job
2323 run : |
24- ## set -e
25-
26- ml --force purge
27- ml Stages/2024 GCC OpenMPI CUDA/12 cuDNN MPI-settings/CUDA
28- ml Python CMake HDF5 PnetCDF libaio mpi4py
29- ml X11/20230603 OpenGL/2023a
30-
31-
32- module list
33-
34-
35- echo "Submitting job..."
36- cd /p/home/jusers/krochak1/juwels/cslfse/pulsar-plugin/ || exit
37- JOBID=$(sbatch --parsable test.sh)
38- echo "Submitted as $JOBID"
39-
40- echo "Waiting for job to complete..."
41- while squeue -j "$JOBID" 2>/dev/null | grep -q "$JOBID"; do
42- sleep 10
43- done
44-
45- echo "Job $JOBID appears to have finished."
46-
47- # Optional: wait for output file to appear if your system writes it after job end
48- OUTFILE="output.${JOBID}.out"
49- for _ in {1..10}; do
50- if [[ -f $OUTFILE ]]; then break; fi
51- echo "Waiting for output file $OUTFILE..."
52- sleep 5
53- done
54-
55- if [[ ! -f $OUTFILE ]]; then
56- echo "ERROR : Output file $OUTFILE not found."
57- exit 1
58- fi
59-
60- echo "Output file found. Checking for success..."
61- if grep -q "FAILED" "$OUTFILE"; then
62- echo "Job output indicates failure."
63- exit 1
64- else
65- echo "Job appears successful."
66- fi
24+ hostname
25+ whoami
26+ cd /p/home/jusers/krochak1/juwels/cslfse/pulsar-plugin/
27+ sbatch test.sh
0 commit comments