Changeset 37369 for trunk/tools
- Timestamp:
- Sep 4, 2014, 4:57:13 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/tools/stask_chip.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/stask_chip.py
r37368 r37369 46 46 task_file = sys.argv[1] 47 47 hosts_file = sys.argv[2] 48 nprocs = int(sys.argv[3]) 48 nprocs = int(sys.argv[3]) # Oversubscription parameter: number of processors to devote to a task 49 49 50 50 hosts = [] … … 57 57 busy = {} 58 58 timeout = 2*3600 59 n_active = 0 # number of active jobs we expect to have running should equal Nhosts * Ncore_per_host / nprocs 60 59 61 60 62 n_completed=0 … … 69 71 for host in f: 70 72 if host[:2] == 'mu': 71 cores = 1273 cores = int(12 / nprocs) # Use nprocs to reduce the core subscription 72 74 nname = 6 73 75 elif host[:2] == 'ml': … … 84 86 hosts.append(h) 85 87 busy[h] = 0 88 n_active = n_active + 1 86 89 87 90 print 'running %d commands at a time from %d tasks in %s' \ 88 % ( len(hosts)/nprocs, len(tasks), task_file)91 % (n_active, len(tasks), task_file) 89 92 90 93 for task in tasks: … … 102 105 cmds[p] = command 103 106 times[p] = time.time() 104 wait( len(hosts)/nprocs)107 wait(n_active) 105 108 106 109 wait(1)
Note:
See TracChangeset
for help on using the changeset viewer.
