Skip to content
Snippets Groups Projects
Commit 10adae8e authored by Farid Mohammadi's avatar Farid Mohammadi
Browse files

[PyLink] minor changes.

parent 7daa1447
No related branches found
No related tags found
No related merge requests found
......@@ -31,8 +31,8 @@ np.set_printoptions(formatter={'float_kind':float_formatter})
class PyLinkForwardModel:
def __init__(self):
self.Type = 'PyLink'
self.nrCPUs = None
self.Name = None
self.nrCPUs = None
self.Name = None
self.InputFile = None
self.InputTemplate = None
self.AuxFile = None
......@@ -259,12 +259,12 @@ class PyLinkForwardModel:
start_time = time.time()
# Start a pool with the number of CPUs
if self.nrCPUs is None:
nrCPUs = multiprocessing.cpu_count()
else:
nrCPUs = self.nrCPUs
pool = multiprocessing.Pool(nrCPUs)
if self.nrCPUs is None:
nrCPUs = multiprocessing.cpu_count()
else:
nrCPUs = self.nrCPUs
pool = multiprocessing.Pool(nrCPUs)
# With Pool.starmap_async()
results = pool.starmap_async(self.Run_Model, [(CollocationPoint, prevRun_No+Run_No, keyString) for Run_No, CollocationPoint in enumerate(CollocationPoints)]).get()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment