Advertisement
Sander447

seleniumloadtest20.sbatch

Feb 7th, 2025
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.08 KB | Source Code | 0 0
  1. #!/bin/bash
  2. #SBATCH --job-name=selenium-test          # Job name
  3. #SBATCH --partition=belleman              # Partition name
  4. #SBATCH --account=belleman                # Account name
  5. #SBATCH --nodes=3                         # Number of nodes
  6. #SBATCH --ntasks-per-node=7               # Limit number of tasks per node
  7. #SBATCH --ntasks=20                       # Number of tasks
  8. #SBATCH --mem=8G                          # Memory per node
  9. #SBATCH --gres=gpu:titan_rtx:1            # GPU resource allocation
  10. #SBATCH --output=selenium_test_%j.log     # Standard output log
  11. #SBATCH --error=selenium_test_%j.err      # Standard error log
  12. #SBATCH --distribution=cyclic             # Even task distribution across nodes
  13.  
  14. # Run tasks in parallel, each with its own Xvfb instance
  15. srun bash -c "
  16.    RANDOM_DISPLAY=\$((RANDOM + 1000))
  17.    DISPLAY=:\$RANDOM_DISPLAY Xvfb :\$RANDOM_DISPLAY -screen 0 1920x1080x24 &
  18.    XVFB_PID=\$!
  19.    echo \"Started Xvfb on DISPLAY :\$RANDOM_DISPLAY with PID \$XVFB_PID\"
  20.    export DISPLAY=:\$RANDOM_DISPLAY
  21.    python seleniumloadtest.py
  22.    kill \$XVFB_PID
  23. "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement