Skip to content

Commit

Permalink
tidy up launch scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
vygr committed Mar 28, 2016
1 parent 0b1b649 commit 97be18d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 32 deletions.
6 changes: 2 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ do
links=""
for ((lcpu=0; lcpu<$num_cpu; lcpu++))
do
c1=$cpu
c2=$lcpu
zero_pad $c1
zero_pad $cpu
c1=$zp
zero_pad $c2
zero_pad $lcpu
c2=$zp
add_link $c1 $c2
done
Expand Down
18 changes: 6 additions & 12 deletions run_cube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,27 @@ do
for ((lcpu_z=$cpu_z-1; lcpu_z<=$cpu_z+1; lcpu_z++))
do
wrap $lcpu_z
c1=$cpu
c2=$(($wp*$num_cpu*$num_cpu + $cpu_y*$num_cpu + $cpu_x))
zero_pad $c1
zero_pad $cpu
c1=$zp
zero_pad $c2
zero_pad $(($wp*$num_cpu*$num_cpu + $cpu_y*$num_cpu + $cpu_x))
c2=$zp
add_link $c1 $c2
done
for ((lcpu_y=$cpu_y-1; lcpu_y<=$cpu_y+1; lcpu_y++))
do
wrap $lcpu_y
c1=$cpu
c2=$(($cpu_z*$num_cpu*$num_cpu + $wp*$num_cpu + $cpu_x))
zero_pad $c1
zero_pad $cpu
c1=$zp
zero_pad $c2
zero_pad $(($cpu_z*$num_cpu*$num_cpu + $wp*$num_cpu + $cpu_x))
c2=$zp
add_link $c1 $c2
done
for ((lcpu_x=$cpu_x-1; lcpu_x<=$cpu_x+1; lcpu_x++))
do
wrap $lcpu_x
c1=$cpu
c2=$(($cpu_z*$num_cpu*$num_cpu + $cpu_y*$num_cpu + $wp))
zero_pad $c1
zero_pad $cpu
c1=$zp
zero_pad $c2
zero_pad $(($cpu_z*$num_cpu*$num_cpu + $cpu_y*$num_cpu + $wp))
c2=$zp
add_link $c1 $c2
done
Expand Down
12 changes: 4 additions & 8 deletions run_mesh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,18 @@ do
for ((lcpu_y=$cpu_y-1; lcpu_y<=$cpu_y+1; lcpu_y++))
do
wrap $lcpu_y
c1=$cpu
c2=$(($wp*$num_cpu + $cpu_x))
zero_pad $c1
zero_pad $cpu
c1=$zp
zero_pad $c2
zero_pad $(($wp*$num_cpu + $cpu_x))
c2=$zp
add_link $c1 $c2
done
for ((lcpu_x=$cpu_x-1; lcpu_x<=$cpu_x+1; lcpu_x++))
do
wrap $lcpu_x
c1=$cpu
c2=$(($cpu_y*$num_cpu + $wp))
zero_pad $c1
zero_pad $cpu
c1=$zp
zero_pad $c2
zero_pad $(($cpu_y*$num_cpu + $wp))
c2=$zp
add_link $c1 $c2
done
Expand Down
6 changes: 2 additions & 4 deletions run_ring.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ do
links=""
for ((lcpu=$cpu-1; lcpu<=$cpu+1; lcpu++))
do
c1=$cpu
wrap $lcpu
c2=$wp
zero_pad $c1
zero_pad $cpu
c1=$zp
zero_pad $c2
zero_pad $wp
c2=$zp
add_link $c1 $c2
done
Expand Down
6 changes: 2 additions & 4 deletions run_star.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ links_to_0=""
for ((cpu=$num_cpu-1; cpu>0; cpu--))
do
links=""
c1=$cpu
c2=0
zero_pad $c1
zero_pad $cpu
c1=$zp
zero_pad $c2
zero_pad 0
c2=$zp
add_link $c1 $c2
links_to_0+="$links"
Expand Down

0 comments on commit 97be18d

Please sign in to comment.