简体   繁体   English

在 SBATCH / SLURM 中使用 ptemcee(Monte Carlo 的 package)运行 python 脚本

[英]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 (ie runs a monte carlo markov chain).我需要使用sbatch / slurm运行 python 脚本该脚本一直运行到它必须使用ptemcee的步骤(即运行蒙特卡洛马尔可夫链)。 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.我知道脚本没有错误,因为当我从 slurm 中运行它时,它工作正常。 Someone knows what should I do to run a ptemcee (or emcee) in sbatch / slurm?有人知道我应该怎么做才能在 sbatch / slurm 中运行 ptemcee(或 emcee)?

#!/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

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希望你刚才解决了这个问题,但我一直在使用#SBATCH --ntasks-per-node=48通过 slurm 运行 ptemcee - 所以你的提交脚本将是

    #!/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.如果我没记错的话,如果您请求了错误的资源,脚本将花费非常长的时间来运行,因为您实际上是在一个 CPU 上运行脚本。 Perhaps that's why your script hangs.也许这就是您的脚本挂起的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM