run_python.sh 791 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env bash
  2. #output to slurm file, use partition Brody, run for 50h and use 24 CPUs
  3. #SBATCH -o %j.out
  4. #SBATCH -p Brody
  5. #SBATCH -J alltest
  6. #SBATCH --ntasks=24
  7. #SBATCH --ntasks-per-core=1
  8. #SBATCH --time=50:00:00
  9. module load anacondapy/5.3.1
  10. . activate testenvironment
  11. profile=ms81_${SLURM_JOB_ID}_$(hostname)
  12. echo "Creating profile ${profile}"
  13. ipython profile create ${profile}
  14. echo "Launching controller"
  15. ipcontroller --ip="*" --profile=${profile} --log-to-file &
  16. sleep 10
  17. echo "Launching engines"
  18. srun ipengine --profile=${profile} --location=$(hostname) --log-to-file &
  19. sleep 45
  20. echo "Launching job"
  21. python -u make_movie_PC.py --profile ${profile}
  22. if [ $? -eq 0 ]
  23. then
  24. echo "Job ${SLURM_JOB_ID} completed successfully!"
  25. else
  26. echo "FAILURE: Job ${SLURM_JOB_ID}"
  27. fi