运行python脚本运行shell fi时退出代码191

2024-05-29 06:00:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图使用python脚本在unix集群上运行一系列oommf模拟,但我在从python向bash发送命令时遇到了困难。我用的是行:-在

subprocess.check_call('qsub shellfile.sh')

返回退出代码191。什么是出口代码191,我好像在网上找不到。这可能是PBS错误而不是unix错误,但我不确定。错误似乎不在shell文件本身中,因为在那里:在

#!/bin/bash

# This is an example submit script for the hello world program.

# OPTIONS FOR PBS PRO ==============================================================

#PBS -l walltime=1:00:00

# This specifies the job should run for no longer than 24 hours

#PBS -l select=1:ncpus=8:mem=2048mb

# This specifies the job needs 1 'chunk', with 1 CPU core, and 2048 MB of RAM (memory).

#PBS -j oe

# This joins up the error and output into one file rather that making two files

##PBS -o $working_folder/$PBS_JOBID-oommf_log

# This send your output to the file "hello_output" rather than the standard filename

# OPTIONS FOR PBS PRO ==============================================================

#PBS -P HPCA-000987-EFR

#PBS -M ppxsb3@nottingham.ac.uk

#PBS -m abe

# Here we just use Unix command to run our program echo "Running on hostname"

sleep 20

echo "Finished job now""

只需打印主机名和“立即完成作业”

谢谢


Tags: the代码bashhelloforoutput错误unix

热门问题