【发布时间】:2016-11-01 20:42:27
【问题描述】:
我正在尝试在细胞搅拌器中检查点。为了检查点,我在 Canopy 中运行这个 py 代码:
import random
from math import sqrt
import subprocess
import time
# Set clock
START=time.clock()
# Simulation Parameters - num_real_runs is needed to set the range command in python
num_runs=2
# Counter Variable for total numbers of runs
running=1
while (running<num_runs):
# Execute mcell Part1
subprocess.call("mcell -seed "+str(running)+" change_dc1.mdl", shell=True)
# Execute mcell Part2
subprocess.call("mcell -seed "+str(running)+" change_dc2.mdl", shell=True)
# Calculate elapsed time for executing python script only (in min)
END=time.clock()
ELAPSED=(END-START)
print "Man, it took me only", ELAPSED, "seconds to run the python code!"
running+=1
但由于某种原因,它没有创建一个说明程序运行的文件。有什么建议吗?
【问题讨论】:
-
您的意思是它没有在您的控制台中打印,还是您打算实际创建一个文件?另外,
mcell是不是这个:docs.bmc.com/docs/display/public/proactivenet96/mcell?