|
139 | 139 | exp_srun.append(srun_p1 + str(nodename) + srun_p2 + str(ntasks) + srun_p3 + str(ntasks) + srun_p4) |
140 | 140 |
|
141 | 141 | test_list = test_list_base |
142 | | - exp_list = exp_srun |
| 142 | + exp_list_dynamic = exp_srun.copy() |
| 143 | + if nworkers == 5: |
| 144 | + # Iteration 0 (Dynamic): Workers 1, 2 -> node-2; 3, 4, 5 -> node-1 |
| 145 | + n1 = srun_p1 + "node-1" + srun_p2 + "5" + srun_p3 + "5" + srun_p4 |
| 146 | + n2 = srun_p1 + "node-2" + srun_p2 + "8" + srun_p3 + "8" + srun_p4 |
| 147 | + exp_list_dynamic = [n2, n2, n1, n1, n1] |
| 148 | + # Iteration 1 (Static): Worker 1 is gen. Workers 2, 3 -> node-1; 4, 5 -> node-2 |
| 149 | + exp_list_static = [n1, n1, n2, n2] |
| 150 | + |
143 | 151 | sim_specs["user"] = { |
144 | 152 | "tests": test_list, |
145 | | - "expect": exp_list, |
146 | 153 | "persis_gens": n_gens, |
147 | 154 | } |
148 | 155 |
|
149 | 156 | iterations = 2 |
150 | 157 | for prob_id in range(iterations): |
151 | 158 | if prob_id == 0: |
152 | 159 | # Uses dynamic scheduler - will find node 2 slots first (as fewer) |
153 | | - libE_specs["num_resource_sets"] = nworkers - 1 # Any worker can be the gen |
154 | | - sim_specs["user"]["offset_for_scheduler"] = True # Changes expected values |
| 160 | + libE_specs["gen_on_worker"] = False |
| 161 | + libE_specs["num_resource_sets"] = nworkers |
| 162 | + sim_specs["user"]["expect"] = exp_list_dynamic |
| 163 | + sim_specs["user"]["offset_for_scheduler"] = False |
| 164 | + sim_specs["user"]["persis_gens"] = 0 |
155 | 165 | persis_info = add_unique_random_streams({}, nworkers + 1) |
156 | 166 |
|
157 | 167 | else: |
158 | 168 | # Uses static scheduler - will find node 1 slots first |
| 169 | + libE_specs["gen_on_worker"] = True |
| 170 | + sim_specs["user"]["expect"] = exp_list_static |
159 | 171 | del libE_specs["num_resource_sets"] |
160 | 172 | libE_specs["zero_resource_workers"] = [1] # Gen must be worker 1 |
161 | 173 | sim_specs["user"]["offset_for_scheduler"] = False |
| 174 | + sim_specs["user"]["persis_gens"] = 1 |
162 | 175 | persis_info = add_unique_random_streams({}, nworkers + 1) |
163 | 176 |
|
164 | 177 | # Perform the run |
|
0 commit comments