2021-02-17 21:41:19 +05:00
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import multiprocessing
|
|
|
|
|
|
|
|
path = os.getcwd()
|
|
|
|
cube = os.path.join(path, "cube/main.py")
|
2021-02-18 15:28:14 +05:00
|
|
|
|
|
|
|
alpha = [0.1, 0.15, 0.2]
|
2021-02-17 21:41:19 +05:00
|
|
|
processes = []
|
|
|
|
|
2021-02-18 15:28:14 +05:00
|
|
|
def salome(exePath, arg):
|
|
|
|
subprocess.run(["salome", "start", "-t", exePath, "args:%s" % arg])
|
2021-02-17 21:41:19 +05:00
|
|
|
|
|
|
|
for c in alpha:
|
|
|
|
print("starting process")
|
2021-02-18 15:28:14 +05:00
|
|
|
p = multiprocessing.Process(target = salome, args = (cube, c))
|
2021-02-17 21:41:19 +05:00
|
|
|
processes.append(p)
|
|
|
|
p.start()
|
|
|
|
|
|
|
|
for process in processes:
|
|
|
|
process.join()
|