'running a python script with ptemcee (a package of Monte Carlo) in SBATCH / SLURM
I need to run a python script using sbatch / slurm The script works until the step which it must use the ptemcee (i.e. runs a monte carlo markov chain). In this step, nothing happens (as if the script fell in a infinite loop). I know that there is no mistake in the script because when I run it out of the slurm, it works ok. Someone knows what should I do to run a ptemcee (or emcee) in sbatch / slurm ?
#!/usr/bin/env bash
#SBATCH -J Exemplo # Nome do job
#SBATCH --cpus-per-task=15
#SBATCH --ntasks 1 # Numero total de processos
#SBATCH --partition=batch
#bash bash.sh
module load python
srun python teste.py
date
Solution 1:[1]
hope you solved this a while ago, but I've been running ptemcee via slurm using #SBATCH --ntasks-per-node=48
- so your submission script would be
#!/usr/bin/env bash
#SBATCH -J Exemplo #Nome do job
#SBATCH --ntasks-per-node=48
#SBATCH --partition=batch
If I remember correctly, if you request the wrong resources, the script takes an extremely long time to run, as you're essentially running your script on one CPU. Perhaps that's why your script hangs.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Shannon |