Skip to content
Snippets Groups Projects
Commit 4375c312 authored by Andreas Westerwick's avatar Andreas Westerwick
Browse files

sensible job count

parent fb7ae263
No related branches found
No related tags found
No related merge requests found
......@@ -129,8 +129,8 @@ def generate_gds_file(layout_path,cellname):
cell=cell.add(gdspy.Rectangle(p11, p12, 1))
cell=cell.add(gdspy.Rectangle(p21, p22, 1))
cell=cell.flatten()
num_cores = multiprocessing.cpu_count() - 2
Parallel(n_jobs=num_cores, verbose=50)(delayed(split_task)(p11,p12,p21,p22,cell,layername)for layername in layer_mapping)
num_cores = multiprocessing.cpu_count()
Parallel(n_jobs=max(1,num_cores-2), verbose=50)(delayed(split_task)(p11,p12,p21,p22,cell,layername)for layername in layer_mapping)
except Exception as e:
print("Can't do this:"+e)
......
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