Commit b3f6802b authored by ulrich_y's avatar ulrich_y
Browse files

pymule create also prints number of runs

parent ba8d51a0
......@@ -86,7 +86,7 @@ def create_menu(
"R": (20000, 20, 500000, 100)
}, folder="", binary='mcmule'
):
totalstat = [0,0]
totalstat = [0,0,0]
if type(seeds) == int:
n = seeds # Get n random numbers
seeds = []
......@@ -156,6 +156,8 @@ def create_menu(
totalstat[0] += n*(stat[1] + stat[3]) # iterations
# iterations
totalstat[1] += 1000*n*(stat[0]*stat[1] + stat[2]*stat[3])
# runs
totalstat[2] += 1
menu += "\n\n"
menu += '\n'.join(
"run %d %f %s%s %s 0" % (seed, xi, genprocess, part, flavour)
......@@ -177,8 +179,8 @@ def create_menu(
elif totalstat[1] > 999:
c = 'k'
p = float(totalstat[1])/1.e3
print("Expect %d iterations, %f%s calls" % (
totalstat[0], p,c
print("Expect %d iterations, %f%s calls, and %d runs" % (
totalstat[0], p, c, totalstat[2]
))
return (
[os.path.join(folder, "menu-%s-%s.menu" % (genprocess, flavour)), header + menu],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment