我目前正在使用一个使用SGE的群集。在这里,我通过调用qsub run.sh
向并行队列提交一个.sh
脚本,该脚本调用python
脚本(使用multiprocessing.pool
进行多线程处理)。python
脚本本身正在通过print(...)
打印某种进度。这将出现在SGE创建的输出文件中。现在有一个巨大的问题:当我手动执行脚本时,一切工作都很顺利,但是当我在某个(随机)迭代中使用并行队列时,池工作线程似乎停止工作,因为在输出文件中看不到进一步的进展。此外,CPU使用率突然下降到0%,脚本的所有线程都处于空闲状态。在
我能做些什么来解决这个问题?或者我怎么能调试它呢?由于输出文件中没有错误消息,我真的很困惑。在
编辑:下面是添加到q中的shell脚本的一些部分和必要的python文件。在
在主.sh公司名称:
#!/bin/bash
# Use python as shell
#$ -S /bin/bash
# Preserve environment variables
#$ -V
# Execute from current working directory
#$ -cwd
# Merge standard output and standard error into one file
#$ -j yes
# Standard name of the job (if none is given on the command line):
#$ -N vh_esn_gs
# Path for the output files
#$ -o /home/<username>/q-out/
# Limit memory usage
#$ -hard -l h_vmem=62G
# array range
#$ -t 1-2
# parallel
#$ -pe <qname> 16
#$ -q <qname>
python mainscript.py
在mainscript.py公司名称:
^{pr2}$其中ClassWorker
的定义如下:
也许这有助于发现问题。我没有包括真正的计算部分,因为到目前为止这并没有给集群带来任何麻烦,所以这应该是安全的。在
目前没有回答
相关问题 更多 >
编程相关推荐