()
| 65 | |
| 66 | |
| 67 | def _get_cpu_socket_count(): |
| 68 | import shlex |
| 69 | p1 = subprocess.Popen(shlex.split("cat /proc/cpuinfo"), stdout=subprocess.PIPE) |
| 70 | p2 = subprocess.Popen(["grep", "physical id"], stdin=p1.stdout, stdout=subprocess.PIPE) |
| 71 | p1.stdout.close() |
| 72 | p3 = subprocess.Popen(shlex.split("sort -u"), stdin=p2.stdout, stdout=subprocess.PIPE) |
| 73 | p2.stdout.close() |
| 74 | p4 = subprocess.Popen(shlex.split("wc -l"), stdin=p3.stdout, stdout=subprocess.PIPE) |
| 75 | p3.stdout.close() |
| 76 | r = int(p4.communicate()[0]) |
| 77 | p4.stdout.close() |
| 78 | return r |
| 79 | |
| 80 | |
| 81 | def set_accelerator_visible(): |
no test coverage detected
searching dependent graphs…