简体   繁体   English

脚本不适用于高性能计算机

[英]Script is not working with high performance computer

I am using Tinaroo (a high-performance computer in University of Queensland)我正在使用 Tinaroo(昆士兰大学的高性能计算机)

I built a demo python code (demo1.py), simple that creates a file that has the time of the execution of the code.我构建了一个演示 python 代码 (demo1.py),很简单,它创建了一个包含代码执行时间的文件。

import datetime

StartTime = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
print("Start : " + StartTime)
out = "Hello This working at " + StartTime
text_file = open("Result_"  + "_" + StartTime , "w")
n = text_file.write(out)
text_file.close()

I tested it, works fine我测试了它,工作正常

Now I want to send it as a PBS JOB to the server.现在我想将它作为 PBS JOB 发送到服务器。

I built this PBS file (simpledemo.pbs)我构建了这个 PBS 文件 (simpledemo.pbs)

#!/bin/bash
#PBS -j oe
#PBS -m ae
#PBS -N SimpleDemo
#PBS -o out.log
#PBS -e out.log
#PBS -l walltime=01:00:00
#PBS -l select=1:ncpus=1:mem=4GB

shopt -s expand_aliases
source /etc/profile.d/modules.sh
cd ${PBS_O_WORKDIR}
module load python3
python3 demo1.py

But it does not execute the python code and I get this out.log file但它不执行 python 代码,我得到了这个out.log文件

########################### Execution Started #############################
JobId:731935.tinmgr2
UserName:asmgx
GroupName:qj
ExecutionHost:tn327a
###############################################################################
/var/spool/pbs/mom_priv/jobs/731935.tinmgr2.SC: line 14: python3: command not found
########################### Job Execution History #############################
JobId:731935.tinmgr2
UserName:asmgx
GroupName:qj
JobName:SimpleDemo
SessionId:27100
ResourcesRequested:mem=4gb,ncpus=1,place=free,walltime=01:00:00
ResourcesUsed:cpupercent=100,cput=00:00:05,mem=0kb,ncpus=1,vmem=0kb,walltime=00:00:05
QueueUsed:General
AccountString:qj
ExitStatus:127
###############################################################################

And it is clearly getting this error:它显然得到了这个错误:

python3: command not found

Does anyone have an idea how to resolve this?有谁知道如何解决这个问题?

Message error shows that in this script: /var/spool/pbs/mom_priv/jobs/731935.tinmgr2.SC , it cannot find command python3 .消息错误显示在此脚本中: /var/spool/pbs/mom_priv/jobs/731935.tinmgr2.SC ,它找不到命令python3 You can modify it to python , or create a softlink of the real executable python and name it as python3 (and add it to your PATH environment variable).您可以将其修改为python ,或者创建一个真正的可执行文件python的软链接并将其命名为python3 (并将其添加到您的PATH环境变量)。

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

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