Beispiel #1
0
def main():

  from utils import create_project_tarball 

  import socket
  hostname = socket.gethostname()

  exp_name = "emmy_omp_barrier"
  exe_cmd = "export OMP_NUM_THREADS=10; likwid-perfctr -m -C S0:0-9 -s 0x03 -g L3 "
 
  tarball_dir='results/'+exp_name
  create_project_tarball(tarball_dir, "project_"+exp_name)

  target_dir='results/' + exp_name 

  cs = 4096 
  is_dp = 1
  ts = 2
  kernel = 1
  for tgs in [1, 2, 5, 10]:
    for N in [400, 608, 992]:
      outfile=(exp_name + '_isDP%d_ts%d_kernel%d_tgs%d_N%d_%s.txt' % (is_dp, ts, kernel,tgs,  N, hostname))
      nx = N
      ny = N
      nz = N
      nt = max(int(10 * 4e9/(nx*ny*nz*3)), 50)
      submit_experiment(kernel, ts=ts, nx=nx, ny=ny, nz=nz, nt=nt, is_dp=is_dp, 
		          outfile=outfile, target_dir=target_dir, tgs=tgs, cs=cs, exe_cmd=exe_cmd)
def main():

  from utils import create_project_tarball 

  import socket
#  hostname = socket.gethostname()
  exp_name = "hasep1_"
  exp_name = exp_name + "threadscaling"#_at_%s" % (hostname)  

  tarball_dir='results/'+exp_name
  create_project_tarball(tarball_dir, "project_"+exp_name)

  target_dir='results/' + exp_name 

  th_l = [1,2,3,4,5,6,7,8,9,10,11,12,13,14]
  cs = 4096
  for tgs in [1,2,7,14]:
#    ts_test(target_dir, exp_name, cs, ts=2, kernel=1, tgs=tgs, N=960, th_l=th_l) 
#    ts_test(target_dir, exp_name, cs, ts=2, kernel=4, tgs=tgs, N=480, th_l=th_l) 
    ts_test(target_dir, exp_name, cs, ts=2, kernel=5, tgs=tgs, N=680, th_l=th_l) 


  cs = 16384
#  ts_test(target_dir, exp_name[:-8], cs, ts=0, kernel=1, tgs=0, N=960, th_l=[8]) 
#  ts_test(target_dir, exp_name[:-8], cs, ts=0, kernel=4, tgs=0, N=480, th_l=[3, 7, 10]) 
  ts_test(target_dir, exp_name, cs, ts=0, kernel=5, tgs=1, N=680, th_l=th_l) 
def main():

  from utils import create_project_tarball 

  import socket
  hostname = socket.gethostname()
  exp_name = "hw14c_"
  exp_name = exp_name + "threadscaling_energy_at_%s" % (hostname)  

  tarball_dir='results/'+exp_name
  create_project_tarball(tarball_dir, "project_"+exp_name)

  target_dir='results/' + exp_name 

  th_l = [1, 2, 4, 6, 8, 10, 12, 14]
  cs = 4096
  #ts_test(target_dir, exp_name[:-9], cs, ts=2, kernel=1, tgs=1, N=960, th_l=th_l[1:]) 
  #ts_test(target_dir, exp_name[:-9], cs, ts=2, kernel=1, tgs=2, N=960, th_l=th_l[4:]) 
  #ts_test(target_dir, exp_name[:-9], cs, ts=2, kernel=1, tgs=7, N=960, th_l=[14]) 
  #for i in th_l:
  #  ts_test(target_dir, exp_name[:-9], cs, ts=2, kernel=1, tgs=i, N=960, th_l=[i]) 



  cs = 8192
  ts_test(target_dir, exp_name[:-9], cs, ts=0, kernel=1, tgs=1, N=960, th_l=th_l) 
def main():

    from utils import create_project_tarball 

    import socket
    hostname = socket.gethostname()

    exp_name = "emmy_energy_f2.2GHz_at_%s" % hostname  
    tarball_dir='results/'+exp_name
    create_project_tarball(tarball_dir, "project_"+exp_name)
 

    target_dir='results/' + exp_name 
    wf = 1
    is_dp = 1
    th = 10

    # (stencil, N, nt, experiments)
    exp = [(1, 960, 100, [(0,0,0,0)])];  th = 6 # special case for spatial blocking
    #exp = [(1, 960, 100, [(2, 2, 5, 12), (2, 5, 11, 20), (2, 10, 11, 50), (0,0,0,0), (2, 1, 5, 1)])]
    #exp = exp + [(5, 680, 50, [(2, 2, 3, 2), (2, 5, 3, 15), (2, 10, 9, 10), (0,0,0,0), (2, 1, 3, 1)])]
    #exp = exp + [(4, 480, 100, [(2, 2, 1, 2), (2, 5, 1, 5), (2, 10, 3, 10), (0,0,0,0), (2, 1, 1, 9)])]
    for kernel, N, nt, exp_l in exp:
        for ts, tgs, tb, nwf in exp_l:
	    outfile=(exp_name + '_ts%d_tgs%d_tb%d_nwf%d_kernel%d_isDP%d_threads%d.txt' % (ts, tgs, tb, nwf, kernel, is_dp, th))
	    submit_emmy_experiment(N=N, nt=nt, nwf=nwf, tgs=tgs, wf=wf, is_dp=is_dp, th=th, ts=ts, tb=tb, kernel=kernel, outfile=outfile, target_dir=target_dir)
def main():

    from utils import create_project_tarball

    import socket
    #  hostname = socket.gethostname()
    exp_name = "hasep1_"
    exp_name = exp_name + "threadscaling"  #_at_%s" % (hostname)

    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = 'results/' + exp_name

    th_l = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
    cs = 4096
    for tgs in [1, 2, 7, 14]:
        #    ts_test(target_dir, exp_name, cs, ts=2, kernel=1, tgs=tgs, N=960, th_l=th_l)
        #    ts_test(target_dir, exp_name, cs, ts=2, kernel=4, tgs=tgs, N=480, th_l=th_l)
        ts_test(target_dir,
                exp_name,
                cs,
                ts=2,
                kernel=5,
                tgs=tgs,
                N=680,
                th_l=th_l)

    cs = 16384
    #  ts_test(target_dir, exp_name[:-8], cs, ts=0, kernel=1, tgs=0, N=960, th_l=[8])
    #  ts_test(target_dir, exp_name[:-8], cs, ts=0, kernel=4, tgs=0, N=480, th_l=[3, 7, 10])
    ts_test(target_dir, exp_name, cs, ts=0, kernel=5, tgs=1, N=680, th_l=th_l)
def main():

    from utils import create_project_tarball

    import socket
    #  hostname = socket.gethostname()
    exp_name = "emmy_"
    exp_name = exp_name + "threadscaling_energy"  #_at_%s" % (hostname)

    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = 'results/' + exp_name

    th_l = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    cs = 4096
    for tgs in [1, 2, 5, 10]:
        #    ts_test(target_dir, exp_name, cs, ts=2, kernel=1, tgs=tgs, N=960, th_l=th_l)
        #    ts_test(target_dir, exp_name, cs, ts=2, kernel=4, tgs=tgs, N=480, th_l=th_l)
        ts_test(target_dir,
                exp_name,
                cs,
                ts=2,
                kernel=5,
                tgs=tgs,
                N=680,
                th_l=th_l)
Beispiel #7
0
def main():

    from utils import create_project_tarball

    import socket
    hostname = socket.gethostname()

    exp_name = "emmy_socket_thread_scaling_7pt_const_960cube_f2.2GHz_naive_no_spt_blk_at_%s" % hostname
    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = 'results/' + exp_name

    kl = [1]

    wf = 1
    for th in list(range(10, 0, -1)):
        for is_dp in [1]:
            for ts, tgs, tb, nwf in [(0, 0, 0, 0)]:
                for kernel in kl:
                    outfile = (
                        exp_name +
                        '_ts%d_tb%d_tgs%d_nwf%d_kernel%d_isDP%d_threads%d.txt'
                        % (ts, tb, tgs, nwf, kernel, is_dp, th))
                    submit_emmy_experiment(nwf=nwf,
                                           tgs=tgs,
                                           wf=wf,
                                           is_dp=is_dp,
                                           th=th,
                                           ts=ts,
                                           tb=tb,
                                           kernel=kernel,
                                           outfile=outfile,
                                           target_dir=target_dir)
def main():

    from utils import create_project_tarball

    import socket
    hostname = socket.gethostname()
    exp_name = "hw14c_"
    exp_name = exp_name + "threadscaling_energy_at_%s" % (hostname)

    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = 'results/' + exp_name

    th_l = [1, 2, 4, 6, 8, 10, 12, 14]
    cs = 4096
    #ts_test(target_dir, exp_name[:-9], cs, ts=2, kernel=1, tgs=1, N=960, th_l=th_l[1:])
    #ts_test(target_dir, exp_name[:-9], cs, ts=2, kernel=1, tgs=2, N=960, th_l=th_l[4:])
    #ts_test(target_dir, exp_name[:-9], cs, ts=2, kernel=1, tgs=7, N=960, th_l=[14])
    #for i in th_l:
    #  ts_test(target_dir, exp_name[:-9], cs, ts=2, kernel=1, tgs=i, N=960, th_l=[i])

    cs = 8192
    ts_test(target_dir,
            exp_name[:-9],
            cs,
            ts=0,
            kernel=1,
            tgs=1,
            N=960,
            th_l=th_l)
Beispiel #9
0
def main():
    from utils import create_project_tarball

    import socket
    hostname = socket.gethostname()

    exp_name = "emmy_socket_thread_scaling_naive_inL3_1to10_threads_f2p2GHz_at_%s" % hostname
    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = 'results/' + exp_name

    size_l = {
        0: (128, 64, 64, 1e4),
        1: (96, 96, 96, 4e4),
        4: (64, 32, 32, 5e4),
        5: (64, 48, 48, 1e5)
    }

    for th in list(range(10, 0, -1)):
        for is_dp in [1]:
            for kernel in [0, 1, 4, 5]:
                nx, ny, nz, nt = size_l[kernel]
                outfile = (exp_name + 'naive_kernel%d_isDP%d_threads%d' %
                           (kernel, is_dp, th))
                submit_emmy_experiment(nt=nt,
                                       nx=nx,
                                       ny=ny,
                                       nz=nz,
                                       is_dp=is_dp,
                                       th=th,
                                       kernel=kernel,
                                       outfile=outfile,
                                       target_dir=target_dir)
def main():
    from utils import create_project_tarball

    import socket

    #    hostname = socket.gethostname()

    exp_name = "emmy_cache_size_vs_code_balace_2p2GHz"  # _at_%s" % hostname
    tarball_dir = "results/" + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = "results/" + exp_name

    kernel = 1
    exp = []
    exp = exp + [[0, 0, 960, 30, 0]]
    #    exp = exp + [[0, 0, 480, 400, 0]]
    #    exp = exp + [[2, i, 480, 400, 10] for i in range(1, 30, 2)]
    exp = exp + [[2, i, 960, 50, 10] for i in range(1, 30, 2)]
    for ts, tb, N, nt, tgs in exp:
        outfile = "ts%d_kernel%d_tb%d_tgs%d_N%d.txt" % (ts, kernel, tb, tgs, N)
        submit_emmy_experiment(
            N, N, N, nt, is_dp=1, ts=ts, tb=tb, kernel=kernel, outfile=outfile, target_dir=target_dir, tgs=tgs, nwf=tgs
        )

    kernel = 5
    exp = []
    #    exp = exp + [[0, 0, 384, 1000, 0]]
    exp = exp + [[0, 0, 680, 30, 0]]
    #    exp = exp + [[2, i, 384, 1000, 10] for i in range(1, 20, 2)]
    exp = exp + [[2, i, 680, 50, 10] for i in range(1, 20, 2)]
    for ts, tb, N, nt, tgs in exp:
        outfile = "ts%d_kernel%d_tb%d_tgs%d_N%d.txt" % (ts, kernel, tb, tgs, N)
        submit_emmy_experiment(
            N, N, N, nt, is_dp=1, ts=ts, tb=tb, kernel=kernel, outfile=outfile, target_dir=target_dir, tgs=tgs, nwf=tgs
        )

    kernel = 4
    exp = []
    #    exp = exp + [[0, 0, 240, 500,  0]]
    exp = exp + [[0, 0, 480, 30, 0]]
    #    exp = exp + [[2, i, 240, 500, 10] for i in range(1, 8, 2)]
    exp = exp + [[2, i, 480, 50, 10] for i in range(1, 6, 2)]
    for ts, tb, N, nt, tgs in exp:
        outfile = "ts%d_kernel%d_tb%d_tgs%d_N%d.txt" % (ts, kernel, tb, tgs, N)
        submit_emmy_experiment(
            N,
            N,
            N,
            nt,
            is_dp=1,
            ts=ts,
            tb=tb,
            kernel=kernel,
            outfile=outfile,
            target_dir=target_dir,
            tgs=tgs,
            nwf=4 * tgs,
            mwdt=0,
        )
def main():

    from utils import create_project_tarball

    import socket
    #hostname = socket.gethostname()
    exp_name = "emmy_"
    exp_name = exp_name + "energy_vs_code_balance"  #_at_%s" % (hostname)

    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = 'results/' + exp_name

    cs = 4096
    dw_l = [1, 3, 5, 7]
    ts_test(target_dir,
            exp_name,
            cs,
            ts=2,
            kernel=1,
            tgs=5,
            N=960,
            group='ENERGY',
            dw_l=dw_l)
    ts_test(target_dir,
            exp_name,
            cs,
            ts=2,
            kernel=1,
            tgs=5,
            N=960,
            group='MEM',
            dw_l=dw_l)

    ts_test(target_dir,
            exp_name,
            cs,
            ts=2,
            kernel=5,
            tgs=5,
            N=480,
            group='ENERGY',
            dw_l=dw_l)
    ts_test(target_dir,
            exp_name,
            cs,
            ts=2,
            kernel=5,
            tgs=5,
            N=480,
            group='MEM',
            dw_l=dw_l)
Beispiel #12
0
def main():
    from utils import create_project_tarball
    import socket
    import time, datetime

    time_stamp = datetime.datetime.fromtimestamp(
        time.time()).strftime('%Y%m%d_%H_%M')

    exp_name = "distributed_strongscaling_at_IVB10_%s" % (time_stamp)
    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)
    target_dir = 'results/' + exp_name

    exp = [[0, 5, 768, 0, 8192, proc] for proc in [1, 2, 4, 8, 12, 16, 24, 32]]
    exp = exp + [[2, 5, 768, 1, 2048, proc] for proc in [1, 2, 4, 8, 12, 16]]
    exp = exp + [[2, 5, 768, -1, 2048, proc]
                 for proc in [1, 2, 4, 8, 12, 16, 24, 32]]

    #    exp = exp + [[2, 5, 768, 2, 2048, proc] for proc in [1,2,4,8,12,16,24,32]]
    #    exp = exp + [[2, 5, 768, 5, 2048, proc] for proc in [1,2,4,8,12,16,24,32]]
    #    exp = exp + [[2, 5, 768, 10,2048, proc] for proc in [1,2,4,8,12,16,24,32]]

    exp = exp + [[0, 4, 512, 0, 8192, proc] for proc in [1, 2, 4, 8, 16]]
    exp = exp + [[2, 4, 512, 1, 0, proc] for proc in [1, 2]]
    exp = exp + [[2, 4, 512, -1, 0, proc] for proc in [1, 2, 4, 8, 16]]

    #    exp = exp + [[2, 4, 512, 2, 0, proc] for proc in [1,2,4]]
    #    exp = exp + [[2, 4, 512, 5, 0, proc] for proc in [1,2,4,8,16]]
    #    exp = exp + [[2, 4, 512, 10, 0, proc] for proc in [1,2,4,8,16,32]]

    exp_f = ['ts', 'kernel', 'N', 'tgs', 'cs', 'procs']
    exp = [dict(zip(exp_f, e)) for e in exp]

    #    nodes_range = [0, 2]
    #    nodes_range = [2, 8]
    nodes_range = [8, 16]

    nt = 50

    for e in exp:
        if (e['procs'] > nodes_range[0] * 2) and (e['procs'] <=
                                                  nodes_range[1] * 2):
            experiment(target_dir,
                       exp_name,
                       ts=e['ts'],
                       tgs=e['tgs'],
                       kernel=e['kernel'],
                       nt=nt,
                       N=e['N'],
                       proc_l=[e['procs']],
                       cs=e['cs'])
def main():
    from utils import create_project_tarball
    import socket

    hostname = socket.gethostname()
    exp_name = "emmy_distributed_strongscaling_f2.2GHz_mwd_swd_at_%s" % hostname
    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)
    target_dir = 'results/' + exp_name

    exp = [[0, 5, 768, 0, 8192, proc] for proc in [1, 2, 4, 8, 12, 16, 24, 32]]
    exp = exp + [[2, 5, 768, 1, 2048, proc] for proc in [1, 2, 4, 8, 12, 16]]
    exp = exp + [[2, 5, 768, 2, 2048, proc]
                 for proc in [1, 2, 4, 8, 12, 16, 24, 32]]
    exp = exp + [[2, 5, 768, 5, 2048, proc]
                 for proc in [1, 2, 4, 8, 12, 16, 24, 32]]
    exp = exp + [[2, 5, 768, 10, 2048, proc]
                 for proc in [1, 2, 4, 8, 12, 16, 24, 32]]

    #    exp = exp + [[0, 4, 512, 0, 8192, proc] for proc in [1,2,4,8,16,32]]
    #    exp = exp + [[2, 4, 512, 1, 0, proc] for proc in [1,2]]
    #    exp = exp + [[2, 4, 512, 2, 0, proc] for proc in [1,2,4]]
    #    exp = exp + [[2, 4, 512, 5, 0, proc] for proc in [1,2,4,8,16]]
    #    exp = exp + [[2, 4, 512, 10, 0, proc] for proc in [1,2,4,8,16,32]]

    exp_f = ['ts', 'kernel', 'N', 'tgs', 'cs', 'procs']
    exp = [dict(zip(exp_f, e)) for e in exp]

    #    nodes_range = [0, 2]
    #    nodes_range = [2, 8]
    nodes_range = [8, 16]
    #    nodes_range = [0, 8]

    nt = 50

    for e in exp:
        if (e['procs'] > nodes_range[0] * 2) and (e['procs'] <=
                                                  nodes_range[1] * 2):
            experiment(target_dir,
                       exp_name,
                       ts=e['ts'],
                       tgs=e['tgs'],
                       kernel=e['kernel'],
                       nt=nt,
                       N=e['N'],
                       proc_l=[e['procs']],
                       cs=e['cs'])
def main():
    from utils import create_project_tarball
    import socket

    hostname = socket.gethostname()
    exp_name = "emmy_distributed_strongscaling_f2.2GHz_mwd_swd_at_%s" % hostname
    tarball_dir = "results/" + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)
    target_dir = "results/" + exp_name

    exp = [[0, 5, 768, 0, 8192, proc] for proc in [1, 2, 4, 8, 12, 16, 24, 32]]
    exp = exp + [[2, 5, 768, 1, 2048, proc] for proc in [1, 2, 4, 8, 12, 16]]
    exp = exp + [[2, 5, 768, 2, 2048, proc] for proc in [1, 2, 4, 8, 12, 16, 24, 32]]
    exp = exp + [[2, 5, 768, 5, 2048, proc] for proc in [1, 2, 4, 8, 12, 16, 24, 32]]
    exp = exp + [[2, 5, 768, 10, 2048, proc] for proc in [1, 2, 4, 8, 12, 16, 24, 32]]

    #    exp = exp + [[0, 4, 512, 0, 8192, proc] for proc in [1,2,4,8,16,32]]
    #    exp = exp + [[2, 4, 512, 1, 0, proc] for proc in [1,2]]
    #    exp = exp + [[2, 4, 512, 2, 0, proc] for proc in [1,2,4]]
    #    exp = exp + [[2, 4, 512, 5, 0, proc] for proc in [1,2,4,8,16]]
    #    exp = exp + [[2, 4, 512, 10, 0, proc] for proc in [1,2,4,8,16,32]]

    exp_f = ["ts", "kernel", "N", "tgs", "cs", "procs"]
    exp = [dict(zip(exp_f, e)) for e in exp]

    #    nodes_range = [0, 2]
    #    nodes_range = [2, 8]
    nodes_range = [8, 16]
    #    nodes_range = [0, 8]

    nt = 50

    for e in exp:
        if (e["procs"] > nodes_range[0] * 2) and (e["procs"] <= nodes_range[1] * 2):
            experiment(
                target_dir,
                exp_name,
                ts=e["ts"],
                tgs=e["tgs"],
                kernel=e["kernel"],
                nt=nt,
                N=e["N"],
                proc_l=[e["procs"]],
                cs=e["cs"],
            )
def main():

    from utils import create_project_tarball 

    import socket
    hostname = socket.gethostname()

    exp_name = "emmy_socket_thread_scaling_7pt_var_nosym_680cube_f2.2GHz_mwd_swd_at_%s" % hostname  
    tarball_dir='results/'+exp_name
    create_project_tarball(tarball_dir, "project_"+exp_name)
 

    target_dir='results/' + exp_name 

    kl = [5]

    wf = 1
    for th in list(range(10, 0, -2)):
        for is_dp in [1]:
            for ts, tgs, tb, nwf  in [(2, 2, 3, 2)]:  # DP
                for kernel in kl:
                    outfile=(exp_name + '_ts%d_tb%d_tgs%d_nwf%d_kernel%d_isDP%d_threads%d.txt' % (ts, tb, tgs, nwf, kernel, is_dp, th))
                    submit_emmy_experiment(nwf=nwf, tgs=tgs, wf=wf, is_dp=is_dp, th=th, ts=ts, tb=tb, kernel=kernel, outfile=outfile, target_dir=target_dir)

    for th in[5, 10]:
        for is_dp in [1]:
            for ts, tgs, tb, nwf  in [(2, 5, 3, 15)]:  #DP
                for kernel in kl:
                    outfile=(exp_name + '_ts%d_tb%d_tgs%d_nwf%d_kernel%d_isDP%d_threads%d.txt' % (ts, tb, tgs, nwf, kernel, is_dp, th))
                    submit_emmy_experiment(nwf=nwf, tgs=tgs, wf=wf, is_dp=is_dp, th=th, ts=ts, tb=tb, kernel=kernel, outfile=outfile, target_dir=target_dir)

    for th in[10]:
        for is_dp in [1]:
            for ts, tgs, tb, nwf  in [(2, 10, 9, 10)]:  #DP
                for kernel in kl:
                    outfile=(exp_name + '_ts%d_tb%d_tgs%d_nwf%d_kernel%d_isDP%d_threads%d.txt' % (ts, tb, tgs, nwf, kernel, is_dp, th))
                    submit_emmy_experiment(nwf=nwf, tgs=tgs, wf=wf, is_dp=is_dp, th=th, ts=ts, tb=tb, kernel=kernel, outfile=outfile, target_dir=target_dir)

    for th in list(range(10, 0, -1)):
        for is_dp in [1]:
            for ts, tgs, tb, nwf  in [(0,0,0,0), (2, 1, 3, 1)]:
                for kernel in kl:
                    outfile=(exp_name + '_ts%d_tb%d_tgs%d_nwf%d_kernel%d_isDP%d_threads%d.txt' % (ts, tb, tgs, nwf, kernel, is_dp, th))
                    submit_emmy_experiment(nwf=nwf, tgs=tgs, wf=wf, is_dp=is_dp, th=th, ts=ts, tb=tb, kernel=kernel, outfile=outfile, target_dir=target_dir)
def main():
    from utils import create_project_tarball 
    import socket
    import time,datetime

    time_stamp = datetime.datetime.fromtimestamp(time.time()).strftime('%Y%m%d_%H_%M')

    exp_name = "distributed_strongscaling_at_IVB10_%s" % (time_stamp)  
    tarball_dir='results/'+exp_name
    create_project_tarball(tarball_dir, "project_"+exp_name)
    target_dir='results/' + exp_name 


    exp =       [[0, 5, 768, 0, 8192, proc] for proc in [1,2,4,8,12,16,24,32]]
    exp = exp + [[2, 5, 768, 1, 2048, proc] for proc in [1,2,4,8,12,16]]
    exp = exp + [[2, 5, 768,-1, 2048, proc] for proc in [1,2,4,8,12,16,24,32]]

#    exp = exp + [[2, 5, 768, 2, 2048, proc] for proc in [1,2,4,8,12,16,24,32]]
#    exp = exp + [[2, 5, 768, 5, 2048, proc] for proc in [1,2,4,8,12,16,24,32]]
#    exp = exp + [[2, 5, 768, 10,2048, proc] for proc in [1,2,4,8,12,16,24,32]]

    exp = exp + [[0, 4, 512, 0, 8192, proc] for proc in [1,2,4,8,16]]
    exp = exp + [[2, 4, 512, 1, 0, proc] for proc in [1,2]]
    exp = exp + [[2, 4, 512,-1, 0, proc] for proc in [1,2,4,8,16]]

#    exp = exp + [[2, 4, 512, 2, 0, proc] for proc in [1,2,4]]
#    exp = exp + [[2, 4, 512, 5, 0, proc] for proc in [1,2,4,8,16]]
#    exp = exp + [[2, 4, 512, 10, 0, proc] for proc in [1,2,4,8,16,32]]

    exp_f = ['ts', 'kernel', 'N', 'tgs', 'cs', 'procs']
    exp = [dict(zip(exp_f,e)) for e in exp]
  

#    nodes_range = [0, 2]
#    nodes_range = [2, 8]
    nodes_range = [8, 16]

    nt = 50

    for e in exp:
        if (e['procs'] > nodes_range[0]*2) and (e['procs'] <= nodes_range[1]*2):
            experiment(target_dir, exp_name, ts=e['ts'], tgs=e['tgs'], kernel=e['kernel'], nt=nt, N=e['N'], proc_l=[e['procs']], cs=e['cs'])
Beispiel #17
0
def main():

    from utils import create_project_tarball

    import socket
    hostname = socket.gethostname()

    exp_name = "emmy_"
    run_cmd = "export OMP_NUM_THREADS=10; likwid-perfctr -m -C S0:0-9 -s 0x03 -g MEM "
    cs = 8192

    exp_name = exp_name + "test_swd_at_mwd_code_at_%s" % (hostname)

    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = 'results/' + exp_name

    mwd_cs = 4096
    mwd(target_dir, exp_name[:-9], mwd_cs, run_cmd, 1)
def main():

  from utils import create_project_tarball 

  import socket
#  hostname = socket.gethostname()
  exp_name = "emmy_"
  exp_name = exp_name + "threadscaling_energy"#_at_%s" % (hostname)  

  tarball_dir='results/'+exp_name
  create_project_tarball(tarball_dir, "project_"+exp_name)

  target_dir='results/' + exp_name 

  th_l = [1,2,3,4,5,6,7,8,9,10]
  cs = 4096
  for tgs in [1,2,5,10]:
#    ts_test(target_dir, exp_name, cs, ts=2, kernel=1, tgs=tgs, N=960, th_l=th_l) 
#    ts_test(target_dir, exp_name, cs, ts=2, kernel=4, tgs=tgs, N=480, th_l=th_l) 
    ts_test(target_dir, exp_name, cs, ts=2, kernel=5, tgs=tgs, N=680, th_l=th_l) 
def main():

  from utils import create_project_tarball 

  import socket
  hostname = socket.gethostname()

  exp_name = "emmy_"
  run_cmd = "export OMP_NUM_THREADS=10; likwid-perfctr -m -C S0:0-9 -s 0x03 -g MEM "
  cs = 8192
 
 
  exp_name = exp_name + "test_swd_at_mwd_code_at_%s" % (hostname)  

  tarball_dir='results/'+exp_name
  create_project_tarball(tarball_dir, "project_"+exp_name)

  target_dir='results/' + exp_name 

  mwd_cs = 4096
  mwd(target_dir, exp_name[:-9], mwd_cs, run_cmd, 1) 
def main():
    from utils import create_project_tarball 

    import socket
    hostname = socket.gethostname()

    exp_name = "emmy_socket_thread_scaling_naive_inL3_1to10_threads_f2p2GHz_at_%s" % hostname  
    tarball_dir='results/'+exp_name
    create_project_tarball(tarball_dir, "project_"+exp_name)
 

    target_dir='results/' + exp_name 

    size_l = {0:(128, 64, 64, 1e4), 1:(96, 96, 96, 4e4), 4:(64, 32, 32, 5e4), 5:(64, 48,48, 1e5)}

    for th in list(range(10, 0, -1)):
        for is_dp in [1]:
            for kernel in [0, 1, 4, 5]:
                nx, ny, nz, nt = size_l[kernel]
                outfile=(exp_name + 'naive_kernel%d_isDP%d_threads%d' % (kernel, is_dp, th))
                submit_emmy_experiment(nt=nt, nx=nx, ny=ny, nz=nz, is_dp=is_dp, th=th, kernel=kernel, outfile=outfile, target_dir=target_dir)
def main():

    from utils import create_project_tarball

    import socket
    hostname = socket.gethostname()

    exp_name = "emmy_energy_f2.2GHz_at_%s" % hostname
    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = 'results/' + exp_name
    wf = 1
    is_dp = 1
    th = 10

    # (stencil, N, nt, experiments)
    exp = [(1, 960, 100, [(0, 0, 0, 0)])]
    th = 6  # special case for spatial blocking
    #exp = [(1, 960, 100, [(2, 2, 5, 12), (2, 5, 11, 20), (2, 10, 11, 50), (0,0,0,0), (2, 1, 5, 1)])]
    #exp = exp + [(5, 680, 50, [(2, 2, 3, 2), (2, 5, 3, 15), (2, 10, 9, 10), (0,0,0,0), (2, 1, 3, 1)])]
    #exp = exp + [(4, 480, 100, [(2, 2, 1, 2), (2, 5, 1, 5), (2, 10, 3, 10), (0,0,0,0), (2, 1, 1, 9)])]
    for kernel, N, nt, exp_l in exp:
        for ts, tgs, tb, nwf in exp_l:
            outfile = (exp_name +
                       '_ts%d_tgs%d_tb%d_nwf%d_kernel%d_isDP%d_threads%d.txt' %
                       (ts, tgs, tb, nwf, kernel, is_dp, th))
            submit_emmy_experiment(N=N,
                                   nt=nt,
                                   nwf=nwf,
                                   tgs=tgs,
                                   wf=wf,
                                   is_dp=is_dp,
                                   th=th,
                                   ts=ts,
                                   tb=tb,
                                   kernel=kernel,
                                   outfile=outfile,
                                   target_dir=target_dir)
def main():

  from utils import create_project_tarball 

  import socket
  hostname = socket.gethostname()

  exp_name = "emmy_"
  run_cmd = "export OMP_NUM_THREADS=10; likwid-perfctr -m -C S0:0-9 -s 0x03 -g MEM "
  cs = 8192
 
 
  exp_name = exp_name + "strongscaling_mwd_naive_at_%s" % (hostname)  

  tarball_dir='results/'+exp_name
  create_project_tarball(tarball_dir, "project_"+exp_name)

  target_dir='results/' + exp_name 

  #mwd(target_dir, exp_name, 0, run_cmd, 1) 
  #mwd(target_dir, exp_name, 0, run_cmd, 2) 
  mwd(target_dir, exp_name, 0, run_cmd, 5) 
Beispiel #23
0
def main():

    from utils import create_project_tarball

    import socket
    hostname = socket.gethostname()

    exp_name = "emmy_"
    run_cmd = "export OMP_NUM_THREADS=10; likwid-perfctr -m -C S0:0-9 -s 0x03 -g MEM "
    cs = 8192

    exp_name = exp_name + "test_no_separate_clu_at_%s" % (hostname)

    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = 'results/' + exp_name

    mwd(target_dir, exp_name[:-9], 2048, run_cmd, 1, [1, 4, 5])
    mwd(target_dir, exp_name[:-9], 2048, run_cmd, 2, [1, 5])
    mwd(target_dir, exp_name[:-9], 2048, run_cmd, 5, [4])
    naive(target_dir, exp_name[:-9], cs, run_cmd)
def main():

    from utils import create_project_tarball 

    import socket
    hostname = socket.gethostname()

    exp_name = "emmy_socket_thread_scaling_25pt_const_960cube_f2.2GHz_naive_at_%s" % hostname  
    tarball_dir='results/'+exp_name
    create_project_tarball(tarball_dir, "project_"+exp_name)
 

    target_dir='results/' + exp_name 

    kl = [0]
    wf = 1
   
    for th in list(range(10, 0, -1)):
        for is_dp in [0, 1]:
            for ts, tgs, tb, nwf  in [(0,0,0,0)]:
                for kernel in kl:
                    outfile=(exp_name + '_ts%d_kernel%d_isDP%d_threads%d.txt' % (ts, kernel, is_dp, th))
                    submit_emmy_experiment(nwf=nwf, tgs=tgs, wf=wf, is_dp=is_dp, th=th, ts=ts, tb=tb, kernel=kernel, outfile=outfile, target_dir=target_dir)
Beispiel #25
0
def main():

  from utils import create_project_tarball 

  import socket
  hostname = socket.gethostname()

  exp_name = "emmy_"
  run_cmd = "export OMP_NUM_THREADS=10; likwid-perfctr -m -C S0:0-9 -s 0x03 -g MEM "
  cs = 8192
 
 
  exp_name = exp_name + "test_no_separate_clu_at_%s" % (hostname)  

  tarball_dir='results/'+exp_name
  create_project_tarball(tarball_dir, "project_"+exp_name)

  target_dir='results/' + exp_name 

  mwd(target_dir, exp_name[:-9], 2048, run_cmd, 1, [1, 4, 5]) 
  mwd(target_dir, exp_name[:-9], 2048, run_cmd, 2, [1, 5]) 
  mwd(target_dir, exp_name[:-9], 2048, run_cmd, 5, [4]) 
  naive(target_dir, exp_name[:-9], cs, run_cmd)
def main():
  from utils import create_project_tarball 
  from csv import DictReader
  from utils import ensure_dir    
  import os
   

  exp_name = "mic_mwd_thread_scaling"
  tarball_dir='results/'+exp_name
  create_project_tarball(tarball_dir, "project_"+exp_name)
  target_dir='results/' + exp_name 
  target_dir = os.path.join(os.path.abspath("."),target_dir)
  ensure_dir(target_dir)


  # use auto tuning to find the best params at one group
  cs = 64
  ts = 2
  kernel=1; N=768

#  # cache blocks within L2 caches
#  cmds = []
#  mwdt=2
#  for tgs in [1,2,4]:
#    for tpc in [1,2,4]:
#      if tgs <= tpc:
#        th_l = [tpc*t  for t in range(6,61,6)]
#        for th in th_l:
#          aff="E:N:%d:%d:%d" % (th, tpc, 4)
#          cmds = cmds + mwd(target_dir, exp_name, cs, N=N, ts=ts, kernel=kernel, tgs=tgs, th=th, mwd_type=mwdt, groups=['CPI'], aff=aff, tpc=tpc)
#
#  cmds = [c for sublist in cmds for c in sublist]
#  fname = target_dir + "/ts%d_kernel%d_mwdt%d_CPI_autotune.sh"%(ts, kernel,mwdt)
#  with open(fname, 'w') as fn:
#    fn.write("#!/bin/sh\n\n")
#    for c in cmds:
#      cp = 'echo ' + str.replace(c,';',"';'")
#      cp = str.replace(cp, '|', '#|')
#      fn.write('echo "'+c+'"\n')
#      fn.write(c+'\n\n')


  # parse the results to obtain the selected parameters by the auto tuner
  data = []
  data_file = os.path.join(target_dir, 'summary.csv')
  with open(data_file, 'rb') as output_file:
    raw_data = DictReader(output_file)
    for k in raw_data:
      k['stencil'] = get_knum(k)
      k['method'] = 2 if 'Diamond' in k['Time stepper orig name'] else 0
      if k['method'] == 2:
        if k['Wavefront parallel strategy'] == 'Relaxed synchronization wavefront with fixed execution':
          k['mwdt'] = 3
        elif k['Wavefront parallel strategy'] == 'Relaxed synchronization wavefront':
          k['mwdt'] = 2
        if int(k['Thread group size']) == 1:
          k['mwdt'] = 0

      data.append(k)

  params = dict()
  for k in data:
    try:
      if k['method']!=0:
        params[(k['mwdt'], k['method'], k['stencil'], int(k['Thread group size']), int(k['Global NX']), int(k['Threads per core']), int(k['OpenMP Threads']) )]= (int(k['Time unroll']), int(k['Multi-wavefront updates']), int(k['Block size in X']))
    except:
      print k
      raise

#  for k in params.keys(): print k

  # cache blocks within L2 caches
  cmds = []
  mwdt_r=2
  for tgs in [1,2,4]:
    for tpc in [1,2,4]:
      if tgs <= tpc:
        th_l = [tpc*t  for t in range(6,61,6)]
        for th in th_l:
   
          if ((th/tgs)<=(N/4)):
  
            mwdt=mwdt_r if tgs!=1 else 0
            tb, nwf, bsx = params[(mwdt, ts, kernel, tgs, N, tpc, th)]

            aff="E:N:%d:%d:%d" % (th, tpc, 4)
            cmds = cmds + mwd(target_dir, exp_name, cs, N=N, ts=ts, kernel=kernel, tgs=tgs, th=th, mwd_type=mwdt, groups=['MEM1', 'MEM2', 'MEM3', 'MEM4', 'MEM5'], aff=aff, tpc=tpc, tb=tb, nwf=nwf, bsx=bsx)

  cmds = [c for sublist in cmds for c in sublist]
  fname = target_dir + "/ts%d_kernel%d_mwdt%d_other_groups.sh"%(ts, kernel,mwdt)
  with open(fname, 'w') as fn:
    fn.write("#!/bin/sh\n\n")
    for c in cmds:
      cp = 'echo ' + str.replace(c,';',"';'")
      cp = str.replace(cp, '|', '#|')
      fn.write('echo "'+c+'"\n')
      fn.write(c+'\n\n')
Beispiel #27
0
def main():
    from utils import create_project_tarball
    import socket
    from csv import DictReader
    import os

    hostname = socket.gethostname()
    exp_name = "hasep1_"
    exp_name = exp_name + "prof_mwd_cache_"
    tarball_dir = "results/" + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)
    target_dir = "results/" + exp_name

    grid_set = {1: [480, 960], 5: [256, 640]}

    # # use auto tuning to find the best params
    #  th=14
    #  cs = 6000
    #  ts = 2
    #  for kernel in [1, 5]:
    #    for N in grid_set[kernel]:
    #      for tgs, mwt_l in [(1,[2]), (2, [2,3]), (7, [2,3]), (14, [2,3])]:
    #        for mwdt in [2,3]:
    #          mwd(target_dir, exp_name, cs, N=N, ts=ts, kernel=kernel, tgs=tgs, th=th, mwd_type=mwdt, groups=['DATA'])
    #

    # parse the results to obtain the selected parameters by the auto tuner
    data = []
    data_file = os.path.join(target_dir, "summary.csv")
    with open(data_file, "rb") as output_file:
        raw_data = DictReader(output_file)
        for k in raw_data:
            k["stencil"] = get_knum(k)
            k["method"] = 2 if "Diamond" in k["Time stepper orig name"] else 0
            if k["method"] == 2:
                if k["Wavefront parallel strategy"] == "Relaxed synchronization wavefront with fixed execution":
                    k["mwdt"] = 3
                elif k["Wavefront parallel strategy"] == "Relaxed synchronization wavefront":
                    k["mwdt"] = 2
                if int(k["Thread group size"]) == 1:
                    k["mwdt"] = 0

            data.append(k)

    params = dict()
    for k in data:
        try:
            if k["method"] != 0:
                params[(k["mwdt"], k["method"], k["stencil"], int(k["Thread group size"]), int(k["Global NX"]))] = (
                    int(k["Time unroll"]),
                    int(k["Multi-wavefront updates"]),
                    int(k["Block size in X"]),
                )
        except:
            print k
            raise

    cs = 16000
    th_l = [1, 2, 4, 6, 8, 10, 12, 14]
    for kernel in [1, 5]:
        for N in grid_set[kernel]:
            for tgs, ths, mwdt_l in [
                (0, th_l, [0]),
                (1, th_l, [0]),
                (2, th_l[1:], [2, 3]),
                (7, [7, 14], [2, 3]),
                (14, [14], [2, 3]),
            ]:
                for mwdt in mwdt_l:
                    for th in ths:

                        if tgs == 0:  # spatial blocking
                            ts = 0
                            tb, nwf, bsx = (-1, -1, 100000)
                        else:
                            ts = 2
                            tb, nwf, bsx = params[(mwdt, ts, kernel, tgs, N)]

                        #            mwd(target_dir, exp_name, cs, N=N, ts=ts, kernel=kernel, tgs=tgs, th=th, mwd_type=mwdt, groups=['DATA', 'L2', 'L3', 'MEM'], tb=tb, nwf=nwf, bsx=bsx)
                        mwd(
                            target_dir,
                            exp_name,
                            cs,
                            N=N,
                            ts=ts,
                            kernel=kernel,
                            tgs=tgs,
                            th=th,
                            mwd_type=mwdt,
                            groups=["DATA", "L2", "L3"],
                            tb=tb,
                            nwf=nwf,
                            bsx=bsx,
                        )
Beispiel #28
0
def main():
    from utils import create_project_tarball
    from csv import DictReader
    from utils import ensure_dir
    import os

    exp_name = "mic_mwd_thread_scaling"
    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)
    target_dir = 'results/' + exp_name
    target_dir = os.path.join(os.path.abspath("."), target_dir)
    ensure_dir(target_dir)

    # use auto tuning to find the best params at one group
    cs = 64
    ts = 2
    kernel = 1
    N = 768

    #  # cache blocks within L2 caches
    #  cmds = []
    #  mwdt=2
    #  for tgs in [1,2,4]:
    #    for tpc in [1,2,4]:
    #      if tgs <= tpc:
    #        th_l = [tpc*t  for t in range(6,61,6)]
    #        for th in th_l:
    #          aff="E:N:%d:%d:%d" % (th, tpc, 4)
    #          cmds = cmds + mwd(target_dir, exp_name, cs, N=N, ts=ts, kernel=kernel, tgs=tgs, th=th, mwd_type=mwdt, groups=['CPI'], aff=aff, tpc=tpc)
    #
    #  cmds = [c for sublist in cmds for c in sublist]
    #  fname = target_dir + "/ts%d_kernel%d_mwdt%d_CPI_autotune.sh"%(ts, kernel,mwdt)
    #  with open(fname, 'w') as fn:
    #    fn.write("#!/bin/sh\n\n")
    #    for c in cmds:
    #      cp = 'echo ' + str.replace(c,';',"';'")
    #      cp = str.replace(cp, '|', '#|')
    #      fn.write('echo "'+c+'"\n')
    #      fn.write(c+'\n\n')

    # parse the results to obtain the selected parameters by the auto tuner
    data = []
    data_file = os.path.join(target_dir, 'summary.csv')
    with open(data_file, 'rb') as output_file:
        raw_data = DictReader(output_file)
        for k in raw_data:
            k['stencil'] = get_knum(k)
            k['method'] = 2 if 'Diamond' in k['Time stepper orig name'] else 0
            if k['method'] == 2:
                if k['Wavefront parallel strategy'] == 'Relaxed synchronization wavefront with fixed execution':
                    k['mwdt'] = 3
                elif k['Wavefront parallel strategy'] == 'Relaxed synchronization wavefront':
                    k['mwdt'] = 2
                if int(k['Thread group size']) == 1:
                    k['mwdt'] = 0

            data.append(k)

    params = dict()
    for k in data:
        try:
            if k['method'] != 0:
                params[(k['mwdt'], k['method'], k['stencil'],
                        int(k['Thread group size']), int(k['Global NX']),
                        int(k['Threads per core']),
                        int(k['OpenMP Threads']))] = (
                            int(k['Time unroll']),
                            int(k['Multi-wavefront updates']),
                            int(k['Block size in X']))
        except:
            print k
            raise

#  for k in params.keys(): print k

# cache blocks within L2 caches
    cmds = []
    mwdt_r = 2
    for tgs in [1, 2, 4]:
        for tpc in [1, 2, 4]:
            if tgs <= tpc:
                th_l = [tpc * t for t in range(6, 61, 6)]
                for th in th_l:

                    if ((th / tgs) <= (N / 4)):

                        mwdt = mwdt_r if tgs != 1 else 0
                        tb, nwf, bsx = params[(mwdt, ts, kernel, tgs, N, tpc,
                                               th)]

                        aff = "E:N:%d:%d:%d" % (th, tpc, 4)
                        cmds = cmds + mwd(
                            target_dir,
                            exp_name,
                            cs,
                            N=N,
                            ts=ts,
                            kernel=kernel,
                            tgs=tgs,
                            th=th,
                            mwd_type=mwdt,
                            groups=['MEM1', 'MEM2', 'MEM3', 'MEM4', 'MEM5'],
                            aff=aff,
                            tpc=tpc,
                            tb=tb,
                            nwf=nwf,
                            bsx=bsx)

    cmds = [c for sublist in cmds for c in sublist]
    fname = target_dir + "/ts%d_kernel%d_mwdt%d_other_groups.sh" % (ts, kernel,
                                                                    mwdt)
    with open(fname, 'w') as fn:
        fn.write("#!/bin/sh\n\n")
        for c in cmds:
            cp = 'echo ' + str.replace(c, ';', "';'")
            cp = str.replace(cp, '|', '#|')
            fn.write('echo "' + c + '"\n')
            fn.write(c + '\n\n')
def main():
  from utils import create_project_tarball 
  import socket
  from csv import DictReader
  import os
   

  hostname = socket.gethostname()
  exp_name = "emmy_"
  exp_name = exp_name + "threadscaling_mem"
  tarball_dir='results/'+exp_name
  create_project_tarball(tarball_dir, "project_"+exp_name)
  target_dir='results/' + exp_name 


  # parse the results to obtain the selected parameters by the auto tuner
  data = []
  data_file = os.path.join(target_dir, 'summary.csv')
  with open(data_file, 'rb') as output_file:
    raw_data = DictReader(output_file)
    for k in raw_data:
      k['stencil'] = get_knum(k)
      k['method'] = 2 if 'Diamond' in k['Time stepper orig name'] else 0
      if k['method'] == 2:
        if k['Wavefront parallel strategy'] == 'Relaxed synchronization wavefront with fixed execution':
          k['mwdt'] = 3
        elif k['Wavefront parallel strategy'] == 'Relaxed synchronization wavefront':
          k['mwdt'] = 2
        elif k['Wavefront parallel strategy'] == 'multi-wavefronts':
          k['mwdt'] = 0
        if int(k['Thread group size']) == 1:
          k['mwdt'] = 0

      data.append(k)

  params = dict()
  for k in data:
    try:
      if k['method']!=0:
        params[(k['mwdt'], k['method'], k['stencil'], int(k['Thread group size']), int(k['Global NX']))]= (int(k['Time unroll']), int(k['Multi-wavefront updates']), int(k['Block size in X']))
    except:
      print k
      raise


  cs = 8192
  th_l = [1,2,3,4,5,6,7,8,9,10]

  exp = [ # ts kernel N mwdt tgs th 
#         (0, 1, 960, 2, 0, 6 ),
#         (2, 1, 960, 0, 1, 10),
#         (2, 1, 960, 2, 2, 10),
#         (2, 1, 960, 2, 5, 10),
#         (2, 1, 960, 2, 10,10),
#
#         (0, 5, 680, 2, 0, 6 ),
#         (2, 5, 680, 0, 1, 8 ),
#         (2, 5, 680, 2, 2, 10),
#         (2, 5, 680, 2, 5, 10),
#         (2, 5, 680, 2, 10,10),
#
#         (0, 4, 480, 0, 0, 8 ),
         (2, 4, 480, 0, 1,  7)
#         (2, 4, 480, 0, 2, 8 ),
#         (2, 4, 480, 0, 5, 10),
#         (2, 4, 480, 0, 10,10)
        ]


  for ts, kernel, N, mwdt, tgs, th in exp:

    if tgs==0: # spatial blocking
      tb, nwf, bsx = (-1,-1,100000)
    else:
      tb, nwf, bsx = params[(mwdt, ts, kernel, tgs, N)]

    mwd(target_dir, exp_name, cs, N=N, ts=ts, kernel=kernel, tgs=tgs, th=th, mwd_type=mwdt, tb=tb, nwf=nwf, bsx=bsx) 
def main():
    from utils import create_project_tarball
    import socket
    from csv import DictReader
    import os

    hostname = socket.gethostname()
    exp_name = "emmy_"
    exp_name = exp_name + "threadscaling_mem"
    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)
    target_dir = 'results/' + exp_name

    # parse the results to obtain the selected parameters by the auto tuner
    data = []
    data_file = os.path.join(target_dir, 'summary.csv')
    with open(data_file, 'rb') as output_file:
        raw_data = DictReader(output_file)
        for k in raw_data:
            k['stencil'] = get_knum(k)
            k['method'] = 2 if 'Diamond' in k['Time stepper orig name'] else 0
            if k['method'] == 2:
                if k['Wavefront parallel strategy'] == 'Relaxed synchronization wavefront with fixed execution':
                    k['mwdt'] = 3
                elif k['Wavefront parallel strategy'] == 'Relaxed synchronization wavefront':
                    k['mwdt'] = 2
                elif k['Wavefront parallel strategy'] == 'multi-wavefronts':
                    k['mwdt'] = 0
                if int(k['Thread group size']) == 1:
                    k['mwdt'] = 0

            data.append(k)

    params = dict()
    for k in data:
        try:
            if k['method'] != 0:
                params[(k['mwdt'], k['method'], k['stencil'],
                        int(k['Thread group size']),
                        int(k['Global NX']))] = (int(
                            k['Time unroll']), int(
                                k['Multi-wavefront updates']),
                                                 int(k['Block size in X']))
        except:
            print k
            raise

    cs = 8192
    th_l = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

    exp = [  # ts kernel N mwdt tgs th 
        #         (0, 1, 960, 2, 0, 6 ),
        #         (2, 1, 960, 0, 1, 10),
        #         (2, 1, 960, 2, 2, 10),
        #         (2, 1, 960, 2, 5, 10),
        #         (2, 1, 960, 2, 10,10),
        #
        #         (0, 5, 680, 2, 0, 6 ),
        #         (2, 5, 680, 0, 1, 8 ),
        #         (2, 5, 680, 2, 2, 10),
        #         (2, 5, 680, 2, 5, 10),
        #         (2, 5, 680, 2, 10,10),
        #
        #         (0, 4, 480, 0, 0, 8 ),
        (2, 4, 480, 0, 1, 7)
        #         (2, 4, 480, 0, 2, 8 ),
        #         (2, 4, 480, 0, 5, 10),
        #         (2, 4, 480, 0, 10,10)
    ]

    for ts, kernel, N, mwdt, tgs, th in exp:

        if tgs == 0:  # spatial blocking
            tb, nwf, bsx = (-1, -1, 100000)
        else:
            tb, nwf, bsx = params[(mwdt, ts, kernel, tgs, N)]

        mwd(target_dir,
            exp_name,
            cs,
            N=N,
            ts=ts,
            kernel=kernel,
            tgs=tgs,
            th=th,
            mwd_type=mwdt,
            tb=tb,
            nwf=nwf,
            bsx=bsx)
Beispiel #31
0
def main():
  from utils import create_project_tarball 
  import socket
  from csv import DictReader
  import os
   

  hostname = socket.gethostname()
  exp_name = "emmy_"
  exp_name = exp_name + "prof_mwd_cache_"
  tarball_dir='results/'+exp_name
  create_project_tarball(tarball_dir, "project_"+exp_name)
  target_dir='results/' + exp_name 

  grid_set = {1:[480, 960], 5:[256, 640]}


 # use auto tuning to find the best params
  th=10
  cs = 4096
  ts = 2
  for kernel in [1, 5]:
    for N in grid_set[kernel]:
      for tgs, mwt_l in [(1,[2]), (2, [2,3]), (5, [2,3]), (10, [2,3])]:
        for mwdt in mwt_l:
          mwd(target_dir, exp_name, cs, N=N, ts=ts, kernel=kernel, tgs=tgs, th=th, mwd_type=mwdt, groups=['DATA']) 


 
  # parse the results to obtain the selected parameters by the auto tuner
  data = []
  data_file = os.path.join(target_dir, 'summary.csv')
  with open(data_file, 'rb') as output_file:
    raw_data = DictReader(output_file)
    for k in raw_data:
      k['stencil'] = get_knum(k)
      k['method'] = 2 if 'Diamond' in k['Time stepper orig name'] else 0
      if k['method'] == 2:
        if k['Wavefront parallel strategy'] == 'Relaxed synchronization wavefront with fixed execution':
          k['mwdt'] = 3
        elif k['Wavefront parallel strategy'] == 'Relaxed synchronization wavefront':
          k['mwdt'] = 2
        if int(k['Thread group size']) == 1:
          k['mwdt'] = 0

      data.append(k)

  params = dict()
  for k in data:
    try:
      if k['method']!=0:
        params[(k['mwdt'], k['method'], k['stencil'], int(k['Thread group size']), int(k['Global NX']))]= (int(k['Time unroll']), int(k['Multi-wavefront updates']), int(k['Block size in X']))
    except:
      print k
      raise


  cs = 16000
  th_l = [1,2,3,4,5,6,7,8,9,10]
    for tgs, ths, mwdt_l in [(0,th_l, [0]), (1, th_l, [0]), (2,[2,4,6,8,10], [2,3]), (5, [5,10], [2,3]), (10, [10], [2,3])]:
      for mwdt in mwdt_l:
        for th in ths:

          if tgs==0: # spatial blocking
            ts = 0
            tb, nwf, bsx = (-1,-1,100000)
          else:
            ts = 2
            tb, nwf, bsx = params[(mwdt, ts, kernel, tgs, N)]

          mwd(target_dir, exp_name, cs, N=N, ts=ts, kernel=kernel, tgs=tgs, th=th, mwd_type=mwdt, groups=['DATA', 'L2', 'L3', 'MEM'], tb=tb, nwf=nwf, bsx=bsx) 
Beispiel #32
0
def main():

    from utils import create_project_tarball

    import socket
    hostname = socket.gethostname()

    exp_name = "emmy_socket_thread_scaling_25pt_var_axsym_480cube_f2.2GHz_mwd_swd_at_%s" % hostname
    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = 'results/' + exp_name

    kl = [4]

    wf = 1
    for th in list(range(10, 0, -2)):
        for is_dp in [1]:
            for ts, tgs, tb, nwf in [(2, 2, 1, 2)]:  # DP
                for kernel in kl:
                    outfile = (
                        exp_name +
                        '_ts%d_tb%d_tgs%d_nwf%d_kernel%d_isDP%d_threads%d.txt'
                        % (ts, tb, tgs, nwf, kernel, is_dp, th))
                    submit_emmy_experiment(nwf=nwf,
                                           tgs=tgs,
                                           wf=wf,
                                           is_dp=is_dp,
                                           th=th,
                                           ts=ts,
                                           tb=tb,
                                           kernel=kernel,
                                           outfile=outfile,
                                           target_dir=target_dir)

    for th in [5, 10]:
        for is_dp in [1]:
            for ts, tgs, tb, nwf in [(2, 5, 1, 5)]:  #DP
                for kernel in kl:
                    outfile = (
                        exp_name +
                        '_ts%d_tb%d_tgs%d_nwf%d_kernel%d_isDP%d_threads%d.txt'
                        % (ts, tb, tgs, nwf, kernel, is_dp, th))
                    submit_emmy_experiment(nwf=nwf,
                                           tgs=tgs,
                                           wf=wf,
                                           is_dp=is_dp,
                                           th=th,
                                           ts=ts,
                                           tb=tb,
                                           kernel=kernel,
                                           outfile=outfile,
                                           target_dir=target_dir)

    for th in [10]:
        for is_dp in [1]:
            for ts, tgs, tb, nwf in [(2, 10, 3, 10)]:  #DP
                for kernel in kl:
                    outfile = (
                        exp_name +
                        '_ts%d_tb%d_tgs%d_nwf%d_kernel%d_isDP%d_threads%d.txt'
                        % (ts, tb, tgs, nwf, kernel, is_dp, th))
                    submit_emmy_experiment(nwf=nwf,
                                           tgs=tgs,
                                           wf=wf,
                                           is_dp=is_dp,
                                           th=th,
                                           ts=ts,
                                           tb=tb,
                                           kernel=kernel,
                                           outfile=outfile,
                                           target_dir=target_dir)

    for th in list(range(10, 0, -1)):
        for is_dp in [1]:
            for ts, tgs, tb, nwf in [(0, 0, 0, 0), (2, 1, 1, 9)]:
                for kernel in kl:
                    outfile = (
                        exp_name +
                        '_ts%d_tb%d_tgs%d_nwf%d_kernel%d_isDP%d_threads%d.txt'
                        % (ts, tb, tgs, nwf, kernel, is_dp, th))
                    submit_emmy_experiment(nwf=nwf,
                                           tgs=tgs,
                                           wf=wf,
                                           is_dp=is_dp,
                                           th=th,
                                           ts=ts,
                                           tb=tb,
                                           kernel=kernel,
                                           outfile=outfile,
                                           target_dir=target_dir)
Beispiel #33
0
def main():
    from utils import create_project_tarball

    import socket
    #    hostname = socket.gethostname()

    exp_name = "emmy_cache_size_vs_code_balace_2p2GHz"  #_at_%s" % hostname
    tarball_dir = 'results/' + exp_name
    create_project_tarball(tarball_dir, "project_" + exp_name)

    target_dir = 'results/' + exp_name

    kernel = 1
    exp = []
    exp = exp + [[0, 0, 960, 30, 0]]
    #    exp = exp + [[0, 0, 480, 400, 0]]
    #    exp = exp + [[2, i, 480, 400, 10] for i in range(1, 30, 2)]
    exp = exp + [[2, i, 960, 50, 10] for i in range(1, 30, 2)]
    for ts, tb, N, nt, tgs in exp:
        outfile = ('ts%d_kernel%d_tb%d_tgs%d_N%d.txt' %
                   (ts, kernel, tb, tgs, N))
        submit_emmy_experiment(N,
                               N,
                               N,
                               nt,
                               is_dp=1,
                               ts=ts,
                               tb=tb,
                               kernel=kernel,
                               outfile=outfile,
                               target_dir=target_dir,
                               tgs=tgs,
                               nwf=tgs)

    kernel = 5
    exp = []
    #    exp = exp + [[0, 0, 384, 1000, 0]]
    exp = exp + [[0, 0, 680, 30, 0]]
    #    exp = exp + [[2, i, 384, 1000, 10] for i in range(1, 20, 2)]
    exp = exp + [[2, i, 680, 50, 10] for i in range(1, 20, 2)]
    for ts, tb, N, nt, tgs in exp:
        outfile = ('ts%d_kernel%d_tb%d_tgs%d_N%d.txt' %
                   (ts, kernel, tb, tgs, N))
        submit_emmy_experiment(N,
                               N,
                               N,
                               nt,
                               is_dp=1,
                               ts=ts,
                               tb=tb,
                               kernel=kernel,
                               outfile=outfile,
                               target_dir=target_dir,
                               tgs=tgs,
                               nwf=tgs)

    kernel = 4
    exp = []
    #    exp = exp + [[0, 0, 240, 500,  0]]
    exp = exp + [[0, 0, 480, 30, 0]]
    #    exp = exp + [[2, i, 240, 500, 10] for i in range(1, 8, 2)]
    exp = exp + [[2, i, 480, 50, 10] for i in range(1, 6, 2)]
    for ts, tb, N, nt, tgs in exp:
        outfile = ('ts%d_kernel%d_tb%d_tgs%d_N%d.txt' %
                   (ts, kernel, tb, tgs, N))
        submit_emmy_experiment(N,
                               N,
                               N,
                               nt,
                               is_dp=1,
                               ts=ts,
                               tb=tb,
                               kernel=kernel,
                               outfile=outfile,
                               target_dir=target_dir,
                               tgs=tgs,
                               nwf=4 * tgs,
                               mwdt=0)