Commit 40525c88 authored by Misbah Mubarak's avatar Misbah Mubarak

Merging Xu's multi-application workload with MPI Sim layer, enabling...

Merging Xu's multi-application workload with MPI Sim layer, enabling time-stepped series data output for the MPI traces (single and multiple applications), updating documentation
parent 987e299d
......@@ -22,7 +22,7 @@
http://portal.nersc.gov/project/CAL/designforward.htm
----------------- RUNNING CODES MPI SIMULATION LAYER -----------------------
--- RUNNING CODES MPI SIMULATION LAYER (DEFAULT JOB ALLOCATION, SINGLE WORKLOAD)-------------
6- Download and untar the DUMPI AMG application trace for 216 MPI ranks using the following download link:
wget
......@@ -42,7 +42,12 @@ src/network-workloads/conf/modelnet-mpi-test-dfly-amg-216.conf)
The simulation runs in ROSS serial, conservative and optimistic modes.
Note: Dragonfly and torus networks may have more number of nodes in the network than the number network traces (Some network nodes will only pass messages and they will not end up loading the traces). Thats why --num_net_traces argument is used to specify exact number of traces available in the DUMPI directory if there is a mis-match between number of network nodes and traces.
Note: Dragonfly and torus networks may have more number of nodes in the
network than the number network traces (Some network nodes will only pass
messages and they will not end up loading the traces). Thats why
--num_net_traces argument is used to specify exact number of traces
available in the DUMPI directory if there is a mis-match between number of
network nodes and traces.
10- Running the simulation in optimistic mode
......@@ -52,3 +57,48 @@ src/network-workloads/conf/modelnet-mpi-test-dfly-amg-216.conf)
--workload_file=/projects/radix-io/mubarak/df_traces/directory/dumpi-2014.03.03.15.09.03-
-- src/network-workloads//conf/modelnet-mpi-test-dfly-amg-216.conf
--- RUNNING MPI SIMULATION LAYER WITH MULTIPLE WORKLOADS --------
11- Generate job allocation file (random or contiguous) using python scripts.
Allocation options
- Random allocation assigns a set of randomly selected network nodes to each
job.
- Contiguous allocation assigns a set of contiguous network nodes to the
jobs.
See codes/allocation_gen/README for instructions on how to generate job
allocation file using python. Example allocation files are in
src/network-workloads/conf/allocation-rand.conf, allocation-cont.conf.
12- Run the simulation with multiple job allocations
./src/network-workloads//model-net-mpi-replay --sync=1
--workload_conf_file=workloads.conf
--alloc_file=../src/network-workloads/conf/allocation-rand.conf
--workload_type="dumpi" --
../src/network-workloads/conf/modelnet-mpi-test-dfly-amg-216.conf
To run in optimistic mode:
mpirun -np 4 ./src/network-workloads//model-net-mpi-replay --sync=3
--workload_conf_file=workloads.conf --alloc_file=allocation.conf
--workload_type="dumpi" --
../src/network-workloads/conf/modelnet-mpi-test-dfly-amg-216.conf
----- sampling and debugging options for MPI Simulation Layer ----
Runtime options can be used to enable time-stepped series data of simulation
with multiple workloads:
--enable_sampling = 1 [Turns on sampling after a specific simulated interval.
Default sampling interval is 5 millisec and default sampling end time is 3
secs.]
--lp-io-dir-dir-name [Turns on end of simulation statistics for dragonfly network model]
--lp-io-use-suffix [Output to a unique directory ]
--enable_mpi_debug=1 prints the details of the MPI operations being simulated. Enabling
debug mode can display a lot of print statements!.
[Notes from Xu Yang]
To generate the allocation file:
python listgen.py config_alloc.conf
There are three lines in the config_alloc.conf file.
1st line: allocation policy, you can use CONT, rand, stripe etc.
2nd line: the total terminal number of nodes in the system, if you use 8-router
dragonfly, this number would be 1056
3rd line: the number of ranks of each application.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440
import sys
import random
alloc_file = 'allocation.conf'
def contiguous_alloc(job_ranks, total_nodes):
f = open(alloc_file,'w')
start=0
for num_rank in range(len(job_ranks)):
for rankid in range(start, start+job_ranks[num_rank]):
f.write("%s " % rankid)
f.write("\n")
start += job_ranks[num_rank]
f.closed
def cube_alloc(job_ranks, total_nodes):
job_dim = [6,6,6]
sys_dim_x = 16
sys_dim_y =16
sys_dim_z = 8
cube = []
start = 0
for k in range(job_dim[2]):
layer = []
layer_offset = k*sys_dim_x*sys_dim_y
for j in range(job_dim[1]):
row_offset = j*sys_dim_z
row = []
for i in range(job_dim[0]):
offset = row_offset+layer_offset
row.append(i+offset)
layer += row
cube += layer
print "list length is", len(cube), cube
f = open('cube_allc_linear.conf','w')
for rankid in range(len(cube)):
f.write("%s " % cube[rankid])
f.write("\n")
f.closed
f = open('cube_allc_random.conf','w')
random.shuffle(cube)
for rankid in range(len(cube)):
f.write("%s " % cube[rankid])
f.write("\n")
f.closed
def permeate_alloc(job_ranks, total_nodes):
f = open(alloc_file,'w')
start=0
node_list = range(0, int(total_nodes))
random.seed(0)
for num_rank in range(len(job_ranks)):
permeate_area = job_ranks[num_rank]*4
permeate_list = node_list[num_rank*permeate_area: (num_rank+1)*permeate_area]
alloc_list = random.sample(permeate_list, job_ranks[num_rank])
alloc_list.sort()
print "length of alloc list", len(alloc_list), "\n", alloc_list,"\n"
for idx in range(len(alloc_list)):
f.write("%s " % alloc_list[idx])
f.write("\n")
f.closed
def random_alloc(job_rank, total_nodes):
f = open(alloc_file, 'w')
node_list = range(0, int(total_nodes))
random.seed(0)
for rankid in range(len(job_rank)):
alloc_list = random.sample(node_list, job_rank[rankid])
node_list = [i for i in node_list if (i not in alloc_list)]
print "length of alloc list", len(alloc_list), "\n", alloc_list,"\n"
for idx in range(len(alloc_list)):
f.write("%s " % alloc_list[idx])
f.write("\n")
f.closed
def stripe_alloc(job_ranks, total_nodes):
#print "the num of nodes of each Job", job_ranks
f = open(alloc_file,'w')
node_list = range(0, int(total_nodes))
stripe_size = 2
alloc_list = []
for num_rank in range(len(job_ranks)):
# print "job id", num_rank
num_stripe = 1
start = num_rank*stripe_size
if(job_ranks[num_rank] % stripe_size != 0):
num_stripe = job_ranks[num_rank]/stripe_size+1
else:
num_stripe = job_ranks[num_rank]/stripe_size
tmp_list = []
while(num_stripe>0):
tmp_list += node_list[start:start+stripe_size]
start += len(job_ranks)*stripe_size
num_stripe -= 1
alloc_list.append(tmp_list)
for job_id in range (len(alloc_list)):
tmp = alloc_list[job_id]
#print "alloc list for JOB", job_id
for rankid in range (job_ranks[job_id]):
# print tmp[rankid]
f.write("%s " % tmp[rankid])
f.write("\n")
f.closed
def policy_select(plcy, job_ranks, total_nodes):
if plcy == "CONT":
print "contiguous alloction!"
contiguous_alloc(job_ranks, total_nodes)
elif plcy == "rand":
print "random allocation!"
random_alloc(job_ranks, total_nodes)
elif plcy == "STRIPE":
print "stripe allcation!"
stripe_alloc(job_ranks, total_nodes)
elif plcy == "PERMEATE":
print "permeate allocation!"
permeate_alloc(job_ranks, total_nodes)
elif plcy == "CUBE":
print "cube allocation!"
cube_alloc(job_ranks, total_nodes)
else:
print "NOT Supported yet!"
if __name__ == "__main__":
f = open(sys.argv[1], "r")
array = []
for line in f:
for number in line.split():
array.append(number);
f.close()
alloc_plcy = array.pop(0)
total_nodes = array.pop(0)
print alloc_plcy
array = map(int, array)
print array
policy_select(alloc_plcy, array, total_nodes)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440
891 800 444 273 539 427 827 320 503 616 958 532 297 798 652 264 960 1037 855 952 327 770 949 722 498 106 458 645 964 1020 913 275 850 579 14 760 421 871 705 1 521 916 257 343 919 201 599 251 1021 848 473 84 337 536 985 115 582 746 578 860 570 1017 636 620 469 629 406 607 306 199 197 647 693 94 925 975 889 948 974 413 744 291 857 897 945 622 1002 612 475 697 1052 968 837 86 513 665 892 256 772 123 232 839 351 861 154 736 47 606 564 718 28 670 640 608 390 1035 38 22 1014 195 130 222 845 989 24 449 107 274 233 683 369 190 531 41 1043 210 378 885 969 178 710 61 714 361 630 467 184 432 600 537 328 377 884 591 13 783 354 48 296 253 1006 371 303 379 999 669 655 755 409 437 687 203 353 252 673 399 924 424 741 441 699 49 470 166 557 514 592 797 933 522 329 493 854 198 1055 668 88 766 1042 716 333 225 757 2 868 103 125 685 922 295 1033 105 901 418 85 290
472 826 903 137 541 679 357 908 282 19 42 707 571 982 973 939 43 774 724 674 732 927 653 375 544 206 589 9 148 332 801 729 336 623 1041 158 991 283 391 545 285 474 231 50 170 512 69 394 318 404 96 896 462 823 962 331 464 684 411 286 720 870 895 602 359 944 614 63 78 726 59 8 373 492 425 988 552 646 397 345 940 240 738 402 334 60 813 659 844 419 632 111 366 183 39 881 191 134 174 953 500 1050 911 906 135 367 621 805 450 833 980 451 910 603 929 548 188 301 867 810 947 32 132 223 703
879 605 756 836 72 90 904 40 227 44 16 869 330 160 150 676 1004 515 926 509 577 692 815 773 1012 761 918 204 534 595 824 484 791 386 580 842 792 654 0 173 501 243 68 841 932 287 398 1005 65 625 122 268 806 56 34 401 479 829 694 648 144 955 389 1026 363 46 447 143 31 965 588 99 516 315 352 734 459 820 565 436 583 307 116 633 569 942 117 834 742 835 796 619 747 477 719 165 713 400 688 410
......@@ -23,6 +23,6 @@ PARAMS
local_bandwidth="5.25";
global_bandwidth="4.7";
cn_bandwidth="5.25";
message_size="560";
message_size="576";
routing="adaptive";
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment