This guide covers the setup and improvements made to run your parallel video recognition experiments on NEU Explorer cluster.
Scripts now use flexible GPU requests that work with both A100 and V100:
#SBATCH --gres=gpu:2 # Request any 2 GPUs
# Commented alternatives for specific GPU types:
# #SBATCH --gres=gpu:a100:2 # For A100 specifically
# #SBATCH --gres=gpu:v100:2 # For V100 specificallyBefore running full experiments, verify your setup:
# Make script executable
chmod +x scripts/slurm/test_gpu.sh
# Submit test job
sbatch scripts/slurm/test_gpu.sh
# Check status
squeue -u $USER
# View output when complete
cat logs/gpu/test_gpu_<job_id>.outsbatch scripts/slurm/gpu/single_gpu.shsbatch scripts/slurm/gpu/ddp_2gpu_frozen.shsbatch scripts/slurm/gpu/ddp_4gpu_frozen.shsbatch scripts/slurm/gpu/fsdp1_2gpu.sh
sbatch scripts/slurm/gpu/fsdp1_4gpu.sh# Make script executable
chmod +x scripts/slurm/run_all.sh
# Submit all with dependencies
bash scripts/slurm/run_all.shsqueue -u $USERtail -f logs/gpu/single_gpu_<job_id>.out
tail -f logs/gpu/ddp_2gpu_frozen_<job_id>.out# Cancel specific job
scancel <job_id>
# Cancel all your jobs
scancel -u $USERsacct -u $USER --format=JobID,JobName,Partition,State,Elapsed,MaxRSSIf you want to use a specific GPU type, edit the SLURM script:
Uncomment the A100 line:
#SBATCH --gres=gpu:a100:2Uncomment the V100 line:
#SBATCH --gres=gpu:v100:2After experiments complete, results will be in:
results/metrics/gpu_training_results.csv- Master CSV trackerresults/metrics/single_gpu_metrics.json- Single GPU detailsresults/metrics/ddp_2gpu_metrics.json- DDP 2 GPU detailsresults/metrics/fsdp1_2gpu_metrics.json- FSDP1 2 GPU details
results/metrics/all_results.csv- CPU preprocessing trackerresults/metrics/baseline.json- Baseline metricsresults/metrics/joblib_comparison.csv- Joblib resultsresults/metrics/dask_comparison.csv- Dask results
- Training time: ~2-3 hours for 10,000 videos, 10 epochs
- Throughput: ~8-10 videos/sec
- Memory usage: ~20-25 GB
- Training time: ~1-1.5 hours for 10,000 videos, 10 epochs
- Throughput: ~16-20 videos/sec
- Speedup: ~2x vs single GPU
- Training time: ~0.5-1 hour for 10,000 videos, 10 epochs
- Throughput: ~30-40 videos/sec
- Speedup: ~3.5-4x vs single GPU
- Check:
cat logs/gpu/<job_name>_<job_id>.err - Common issues:
- Conda environment not activated
- Missing modules
- Incorrect partition
- Reduce batch size in SLURM script
- Try with mixed precision training
- Use gradient accumulation (would need to add this)
- Check partition availability:
sinfo -p multigpu - Consider using different partition
- Check job dependencies
- Check NCCL environment variables are set
- Verify all GPUs are on same node
- Check network connectivity between GPUs
- Start Small: Test with
test_gpu.shfirst - Use Interactive Jobs for debugging:
srun --partition=gpu-interactive --gres=gpu:1 --pty bash
- Monitor Resources: Use
nvidia-smiin your jobs - Save Checkpoints: For long-running jobs (not yet implemented)
- Log Everything: All scripts save detailed logs