Example #1
0
def thread_scaling_test(target_dir,
                        exp_name,
                        group='',
                        params={},
                        dry_run=0,
                        is_tgs_only=0):
    from scripts.conf.conf import machine_conf, machine_info
    from scripts.utils import run_test
    import itertools

    is_dp = 1

    cs = 4096

    # Test using rasonable time
    # T = scale * size / perf
    # scale = T*perf/size
    desired_time = 20
    if (machine_info['hostname'] == 'Haswell_18core'):
        k_perf_order = {0: 1500, 1: 5000, 4: 400, 5: 2000, 6: 100}
    elif (machine_info['hostname'] == 'IVB_10core'):
        k_perf_order = {0: 1200, 1: 3000, 4: 350, 5: 1500, 6: 80}
    k_time_scale = {
        n: desired_time * k_perf_order[n]
        for n in k_perf_order.keys()
    }

    points = dict()
    points[0] = [896]
    points[1] = [896]
    points[4] = [768]
    points[5] = [768]
    points[6] = [384]

    count = 0
    th_l = [machine_info['n_cores']]
    th_max = machine_info['n_cores']

    for ts, tgs_r in [(0, 0), (2, 1), (2, -1)]:
        for kernel, mwdt in [(0, 1), (1, 2), (4, 1), (5, 2)]:  #, (6,1)]:
            for N in points[kernel]:
                tb, nwf, tgs, thx, thy, thz = (-1, -1, tgs_r, -1, -1, -1)
                #        key = (mwdt, kernel, N, tgs_r, group)
                #        if key in params.keys():
                #          continue #already computed
                if tgs == 1: mwdt = -1
                key = (mwdt, kernel, N, tgs_r, 'MEM')
                if key in params.keys():  #reuse the conf of existing test
                    tb, nwf, tgs, thx, thy, thz = params[key]
                elif ts == 0:
                    pass
                else:
                    print "full socket test required for ts:%d tgs:%d kernel:%d N:%d " % (
                        ts, tgs_r, kernel, N)
                    continue

                for th in list(range(1, 1 + th_max)):
                    if (tgs > 1 and th % tgs != 0):
                        continue
                    machine_conf[
                        'pinning_args'] = "-m -g %s -C S1:0-%d -s 0x03 --" % (
                            group, (th - 1))
                    outfile = (
                        'kernel%d_isdp%d_ts%d_mwdt%d_tgs%d_N%d_th%d_%s_%s.txt'
                        % (kernel, is_dp, ts, mwdt, tgs_r, N, th, group,
                           exp_name[-13:]))
                    nt = max(
                        int(
                            float(th) / float(th_max) * k_time_scale[kernel] /
                            (N**3 / 1e6)), 30)

                    c_mwdt = mwdt if mwdt != -1 else 1

                    print outfile, th, tb, nwf, tgs, thx, thy, thz
                    run_test(dry_run=dry_run,
                             is_dp=is_dp,
                             th=th,
                             tgs=tgs,
                             thx=thx,
                             thy=thy,
                             thz=thz,
                             kernel=kernel,
                             ts=ts,
                             nx=N,
                             ny=N,
                             nz=N,
                             nt=nt,
                             outfile=outfile,
                             target_dir=target_dir,
                             cs=cs,
                             mwdt=c_mwdt,
                             tb=tb,
                             nwf=nwf)
                    count = count + 1
    return count
def igs_test(target_dir, exp_name, th, group='', dry_run=0):
    from scripts.conf.conf import machine_conf, machine_info
    from scripts.utils import run_test
    import itertools

    cs = 8192

    th = th

    # Test using rasonable time
    # T = scale * size / perf
    # scale = T*perf/size
    desired_time = 20
    if (machine_info['hostname'] == 'Haswell_18core'):
        k_perf_order = {0: 150, 1: 500, 4: 40, 5: 200, 6: 20}
    elif (machine_info['hostname'] == 'IVB_10core'):
        k_perf_order = {0: 120, 1: 300, 4: 35, 5: 150, 6: 20}

    k_time_scale = {
        n: desired_time * k_perf_order[n]
        for n in k_perf_order.keys()
    }

    #exp = is_dp, ts, k, N, bs_z,  tb_l
    exp_l = []
    # spatial blocking
    exp_l = exp_l + \
            [(0, 0, 0, 960, 0, [-1])
            ,(1, 0, 0, 960, 0, [-1])
            ,(1, 0, 1, 960, 0, [-1])
            ,(1, 0, 4, 480, 0, [-1])
            ,(1, 0, 5, 680, 0, [-1])
            ]
    # 1WD
    exp_l = exp_l + \
            [(0, 2, 0, 960, 1, [1, 3, 5])
            ,(1, 2, 0, 960, 1, [1, 3, 5])
            ,(1, 2, 1, 960, 1, [1, 3, 5, 7, 9, 11, 15, 19, 23, 29])
            ,(1, 2, 4, 480, 1, [1, 3, 5])
            ,(1, 2, 5, 680, 1, [1, 3, 9, 19])
            ]

    # Solar kernel
    exp_l = exp_l + \
            [(1, 2, 6, 480, 1, [1, 3, 5, 7])
            ,(1, 2, 6, 480, 2, [1, 3, 5, 7])
            ,(1, 2, 6, 480, 3, [1, 3, 5, 7])
            ,(1, 2, 6, 480, 6, [1, 3, 5, 7])
            ,(1, 2, 6, 480, 9, [1, 3, 5, 7])]

    mwdt = 1
    tgs, thx, thy, thz = (1, 1, 1, 1)
    count = 0
    for is_dp, ts, kernel, N, bs_z, tb_l in exp_l:
        for tb in tb_l:
            outfile = ('kernel%d_isdp%d_ts%d_bsz$d_tb%d_N%d_%s_%s.txt' %
                       (kernel, is_dp, ts, bs_z, tb, N, group, exp_name[-13:]))
            nt = max(int(k_time_scale[kernel] / (N**3 / 1e6)), 30)
            #      print outfile, ts, kernel, tb, N
            run_test(ntests=1,
                     dry_run=dry_run,
                     is_dp=is_dp,
                     th=th,
                     tgs=tgs,
                     thx=thx,
                     thy=thy,
                     thz=thz,
                     kernel=kernel,
                     ts=ts,
                     nx=N,
                     ny=N,
                     nz=N,
                     nt=nt,
                     outfile=outfile,
                     target_dir=target_dir,
                     cs=cs,
                     mwdt=mwdt,
                     tb=tb,
                     nwf=bs_z)
            count = count + 1

    return count
Example #3
0
def thread_scaling_test(target_dir, exp_name, group='', params={}, dry_run=0, is_tgs_only=0): 
  from scripts.conf.conf import machine_conf, machine_info
  from scripts.utils import run_test
  import itertools

  is_dp=1

  cs = 4096


  # Test using rasonable time
  # T = scale * size / perf
  # scale = T*perf/size
  desired_time = 20
  if(machine_info['hostname']=='Haswell_18core'):
    k_perf_order = {0:1500, 1:5000, 4:400, 5:2000 ,6:100}
  elif(machine_info['hostname']=='IVB_10core'):
    k_perf_order = {0:1200, 1:3000, 4:350, 5:1500 ,6:80}
  k_time_scale = {n: desired_time*k_perf_order[n] for n in k_perf_order.keys()}


  points = dict()
  points[0] = [896]
  points[1] = [896]
  points[4] = [768]
  points[5] = [768]
  points[6] = [384]

  count=0
  th_l = [machine_info['n_cores']]
  th_max = machine_info['n_cores']

  for ts, tgs_r in [(0,0), (2,1), (2,-1)]:
    for kernel, mwdt in [(0,1), (1,2), (4,1), (5,2)]: #, (6,1)]:
      for N in points[kernel]:
        tb, nwf, tgs, thx, thy, thz = (-1,-1,tgs_r,-1,-1,-1)
#        key = (mwdt, kernel, N, tgs_r, group)
#        if key in params.keys():
#          continue #already computed
        if tgs==1: mwdt=-1
        key = (mwdt, kernel, N, tgs_r, 'MEM')
        if key in params.keys(): #reuse the conf of existing test
          tb, nwf, tgs, thx, thy, thz = params[key]
        elif ts==0:
          pass
        else:
          print "full socket test required for ts:%d tgs:%d kernel:%d N:%d "%(ts, tgs_r, kernel, N)
          continue

        for th in list(range(1, 1+th_max)):
          if (tgs>1  and th%tgs!=0):
            continue
          machine_conf['pinning_args'] = "-m -g %s -C S1:0-%d -s 0x03 --"%(group, (th-1))
          outfile=('kernel%d_isdp%d_ts%d_mwdt%d_tgs%d_N%d_th%d_%s_%s.txt' % (kernel, is_dp, ts, mwdt, tgs_r, N, th, group, exp_name[-13:]))
          nt = max(int( float(th)/float(th_max)* k_time_scale[kernel]/(N**3/1e6)), 30)

          c_mwdt = mwdt if mwdt!=-1 else 1

          print outfile, th, tb, nwf, tgs, thx, thy, thz
          run_test(dry_run=dry_run, is_dp=is_dp, th=th, tgs=tgs, thx=thx, thy=thy, thz=thz, kernel=kernel, ts=ts, nx=N, ny=N, nz=N, nt=nt, outfile=outfile, target_dir=target_dir, cs=cs, mwdt=c_mwdt, tb=tb, nwf=nwf)
          count = count+1
  return count
def igs_test(target_dir, exp_name, th, group="", dry_run=0):
    from scripts.conf.conf import machine_conf, machine_info
    from scripts.utils import run_test
    import itertools

    cs = 8192

    th = th

    # Test using rasonable time
    # T = scale * size / perf
    # scale = T*perf/size
    desired_time = 20
    if machine_info["hostname"] == "Haswell_18core":
        k_perf_order = {0: 150, 1: 500, 4: 40, 5: 200, 6: 20}
    elif machine_info["hostname"] == "IVB_10core":
        k_perf_order = {0: 120, 1: 300, 4: 35, 5: 150, 6: 20}

    k_time_scale = {n: desired_time * k_perf_order[n] for n in k_perf_order.keys()}

    # exp = is_dp, ts, k, N, bs_z,  tb_l
    exp_l = []
    # spatial blocking
    exp_l = exp_l + [
        (0, 0, 0, 960, 0, [-1]),
        (1, 0, 0, 960, 0, [-1]),
        (1, 0, 1, 960, 0, [-1]),
        (1, 0, 4, 480, 0, [-1]),
        (1, 0, 5, 680, 0, [-1]),
    ]
    # 1WD
    exp_l = exp_l + [
        (0, 2, 0, 960, 1, [1, 3, 5]),
        (1, 2, 0, 960, 1, [1, 3, 5]),
        (1, 2, 1, 960, 1, [1, 3, 5, 7, 9, 11, 15, 19, 23, 29]),
        (1, 2, 4, 480, 1, [1, 3, 5]),
        (1, 2, 5, 680, 1, [1, 3, 9, 19]),
    ]

    # Solar kernel
    exp_l = exp_l + [
        (1, 2, 6, 480, 1, [1, 3, 5, 7]),
        (1, 2, 6, 480, 2, [1, 3, 5, 7]),
        (1, 2, 6, 480, 3, [1, 3, 5, 7]),
        (1, 2, 6, 480, 6, [1, 3, 5, 7]),
        (1, 2, 6, 480, 9, [1, 3, 5, 7]),
    ]

    mwdt = 1
    tgs, thx, thy, thz = (1, 1, 1, 1)
    count = 0
    for is_dp, ts, kernel, N, bs_z, tb_l in exp_l:
        for tb in tb_l:
            outfile = "kernel%d_isdp%d_ts%d_bsz$d_tb%d_N%d_%s_%s.txt" % (
                kernel,
                is_dp,
                ts,
                bs_z,
                tb,
                N,
                group,
                exp_name[-13:],
            )
            nt = max(int(k_time_scale[kernel] / (N ** 3 / 1e6)), 30)
            #      print outfile, ts, kernel, tb, N
            run_test(
                ntests=1,
                dry_run=dry_run,
                is_dp=is_dp,
                th=th,
                tgs=tgs,
                thx=thx,
                thy=thy,
                thz=thz,
                kernel=kernel,
                ts=ts,
                nx=N,
                ny=N,
                nz=N,
                nt=nt,
                outfile=outfile,
                target_dir=target_dir,
                cs=cs,
                mwdt=mwdt,
                tb=tb,
                nwf=bs_z,
            )
            count = count + 1

    return count
def igs_test(target_dir, exp_name, th, group='', params={}, dry_run=0, is_tgs_only=0): 
  from scripts.conf.conf import machine_conf, machine_info
  from scripts.utils import run_test
  import itertools

  is_dp=1

  cs = 4096

  th = machine_info['n_cores']
  k_r = {0:4, 1:1, 4:4, 5:1, 6:1}
  kernels_min_limits = {n: k_r[n]*th*4 for n in k_r.keys()}

  # Test using rasonable time
  # T = scale * size / perf
  # scale = T*perf/size
  desired_time = 20
  if(machine_info['hostname']=='Haswell_18core'):
    tgs_l = [2,3,6,9,18]
    increment = 128
    k_perf_order = {0:1500, 1:5000, 4:400, 5:2000 ,6:100}
    if is_dp == 1:
      kernels_limits = {0:1281, 1:1409, 4:769, 5:897, 6:513}
    else:
      kernels_limits = {0:2100, 4:1200}

  elif(machine_info['hostname']=='IVB_10core'):
    tgs_l = [2,5,10]
    increment = 64
    k_perf_order = {0:1200, 1:3000, 4:350, 5:1500 ,6:80}
    if is_dp ==1:
      kernels_limits = {0:1089, 1:1217, 4:577, 5:705, 6:289}
    else:
      kernels_limits = {0:1350, 4:801}


  points = dict()
  points[0] = [64] + list(range(128, 5000, increment)) 
  points[1] = points[0]
  points[4] = points[0]
  points[5] = points[0]
  points[6] = points[0]


  k_time_scale = {n: desired_time*k_perf_order[n] for n in k_perf_order.keys()}

  if(is_tgs_only):
    exp_l = [(2,tgs_l)]
  else:
    exp_l = [(2,[-1, 1]), (0,[0])]

  count=0
  for ts, tgs_rl in exp_l:
    for tgs_r in tgs_rl:
      for kernel, mwdt_list in [(0,[1]), (1,[2]), (4,[1]), (5,[2])]:
#      for kernel, mwdt_list in [(6,[1])]:
        if ts==0 or tgs_r==1:
          mwdt_list=[-1]
        for mwdt in mwdt_list:
          for N in points[kernel]:
            if( ((tgs_r!=1) or  (N >= kernels_min_limits[kernel])) and (N < kernels_limits[kernel]) ):
              tb, nwf, tgs, thx, thy, thz = (-1,-1,tgs_r,-1,-1,-1)
              key = (mwdt, kernel, N, tgs_r, group)
              if key in params.keys():
                print "Already computed:", key
                continue #already computed

              key = (mwdt, kernel, N, tgs_r, 'MEM')
              if key in params.keys(): #reuse the conf of existing test
                tb, nwf, tgs, thx, thy, thz = params[key]
              outfile=('kernel%d_isdp%d_ts%d_mwdt%d_tgs%d_N%d_%s_%s.txt' % (kernel, is_dp, ts, mwdt, tgs_r, N, group, exp_name[-13:]))
              nt = max(int(k_time_scale[kernel]/(N**3/1e6)), 30)
              c_mwdt = mwdt # to avoid negative array access at the c code
              if mwdt==-1: c_mwdt=1
#              print outfile, tb, nwf, tgs, thx, thy, thz
              run_test(dry_run=dry_run, is_dp=is_dp, th=th, tgs=tgs, thx=thx, thy=thy, thz=thz, kernel=kernel, ts=ts, nx=N, ny=N, nz=N, nt=nt, outfile=outfile, target_dir=target_dir, cs=cs, mwdt=c_mwdt, tb=tb, nwf=nwf)
              count = count+1
  return count
Example #6
0
def igs_test(target_dir,
             exp_name,
             th,
             group='',
             params={},
             dry_run=0,
             is_tgs_only=0):
    from scripts.conf.conf import machine_conf, machine_info
    from scripts.utils import run_test
    import itertools

    is_dp = 1

    cs = 4096

    th = machine_info['n_cores']
    k_r = {0: 4, 1: 1, 4: 4, 5: 1, 6: 1}
    kernels_min_limits = {n: k_r[n] * th * 4 for n in k_r.keys()}

    # Test using rasonable time
    # T = scale * size / perf
    # scale = T*perf/size
    desired_time = 20
    if (machine_info['hostname'] == 'Haswell_18core'):
        tgs_l = [2, 3, 6, 9, 18]
        increment = 128
        k_perf_order = {0: 1500, 1: 5000, 4: 400, 5: 2000, 6: 100}
        if is_dp == 1:
            kernels_limits = {0: 1281, 1: 1409, 4: 769, 5: 897, 6: 513}
        else:
            kernels_limits = {0: 2100, 4: 1200}

    elif (machine_info['hostname'] == 'IVB_10core'):
        tgs_l = [2, 5, 10]
        increment = 64
        k_perf_order = {0: 1200, 1: 3000, 4: 350, 5: 1500, 6: 80}
        if is_dp == 1:
            kernels_limits = {0: 1089, 1: 1217, 4: 577, 5: 705, 6: 289}
        else:
            kernels_limits = {0: 1350, 4: 801}

    points = dict()
    points[0] = [64] + list(range(128, 5000, increment))
    points[1] = points[0]
    points[4] = points[0]
    points[5] = points[0]
    points[6] = points[0]

    k_time_scale = {
        n: desired_time * k_perf_order[n]
        for n in k_perf_order.keys()
    }

    if (is_tgs_only):
        exp_l = [(2, tgs_l)]
    else:
        exp_l = [(2, [-1, 1]), (0, [0])]

    count = 0
    for ts, tgs_rl in exp_l:
        for tgs_r in tgs_rl:
            for kernel, mwdt_list in [(0, [1]), (1, [2]), (4, [1]), (5, [2])]:
                #      for kernel, mwdt_list in [(6,[1])]:
                if ts == 0 or tgs_r == 1:
                    mwdt_list = [-1]
                for mwdt in mwdt_list:
                    for N in points[kernel]:
                        if (((tgs_r != 1) or (N >= kernels_min_limits[kernel]))
                                and (N < kernels_limits[kernel])):
                            tb, nwf, tgs, thx, thy, thz = (-1, -1, tgs_r, -1,
                                                           -1, -1)
                            key = (mwdt, kernel, N, tgs_r, group)
                            if key in params.keys():
                                print "Already computed:", key
                                continue  #already computed

                            key = (mwdt, kernel, N, tgs_r, 'MEM')
                            if key in params.keys(
                            ):  #reuse the conf of existing test
                                tb, nwf, tgs, thx, thy, thz = params[key]
                            outfile = (
                                'kernel%d_isdp%d_ts%d_mwdt%d_tgs%d_N%d_%s_%s.txt'
                                % (kernel, is_dp, ts, mwdt, tgs_r, N, group,
                                   exp_name[-13:]))
                            nt = max(int(k_time_scale[kernel] / (N**3 / 1e6)),
                                     30)
                            c_mwdt = mwdt  # to avoid negative array access at the c code
                            if mwdt == -1: c_mwdt = 1
                            #              print outfile, tb, nwf, tgs, thx, thy, thz
                            run_test(dry_run=dry_run,
                                     is_dp=is_dp,
                                     th=th,
                                     tgs=tgs,
                                     thx=thx,
                                     thy=thy,
                                     thz=thz,
                                     kernel=kernel,
                                     ts=ts,
                                     nx=N,
                                     ny=N,
                                     nz=N,
                                     nt=nt,
                                     outfile=outfile,
                                     target_dir=target_dir,
                                     cs=cs,
                                     mwdt=c_mwdt,
                                     tb=tb,
                                     nwf=nwf)
                            count = count + 1
    return count