Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #SBATCH --job-name=selenium-test # Job name
- #SBATCH --partition=belleman # Partition name
- #SBATCH --account=belleman # Account name
- #SBATCH --nodes=3 # Number of nodes
- #SBATCH --ntasks-per-node=7 # Limit number of tasks per node
- #SBATCH --ntasks=20 # Number of tasks
- #SBATCH --mem=8G # Memory per node
- #SBATCH --gres=gpu:titan_rtx:1 # GPU resource allocation
- #SBATCH --output=selenium_test_%j.log # Standard output log
- #SBATCH --error=selenium_test_%j.err # Standard error log
- #SBATCH --distribution=cyclic # Even task distribution across nodes
- # Run tasks in parallel, each with its own Xvfb instance
- srun bash -c "
- RANDOM_DISPLAY=\$((RANDOM + 1000))
- DISPLAY=:\$RANDOM_DISPLAY Xvfb :\$RANDOM_DISPLAY -screen 0 1920x1080x24 &
- XVFB_PID=\$!
- echo \"Started Xvfb on DISPLAY :\$RANDOM_DISPLAY with PID \$XVFB_PID\"
- export DISPLAY=:\$RANDOM_DISPLAY
- python seleniumloadtest.py
- kill \$XVFB_PID
- "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement