예제 #1
0
 class TestUndefinedCodeCampaign(TestCampaign):
     codes = [('test', dict(exe='test'))]
     sweeps = [
         SweepGroup(name='test_group', nodes=1, parameter_groups=[
           Sweep([
             ParamCmdLineArg('test', 'arg', 1, ['a', 'b']),
             ParamCmdLineArg('code_dne', 'arg', 1, ['11', 'arg2'])
           ])
         ])
     ]
예제 #2
0
 class TestNotEnoughNodesCampaign(TestCampaign):
     codes = [('test1', dict(exe='test1')),
              ('test2', dict(exe='test2'))]
     sweeps = [
         SweepGroup(name='test_group', nodes=1, parameter_groups=[
           Sweep([
             ParamCmdLineArg('test1', 'arg1', 1, ['a', 'b']),
             ParamCmdLineArg('test1', 'arg2', 2, ['1', '2']),
             ParamCmdLineArg('test2', 'arg1', 1, ['y', 'z']),
             ParamCmdLineArg('test2', 'arg2', 2, ['-1', '-2']),
           ])
         ])
     ]
예제 #3
0
def test_derived_params():
    code1_arg1 = ParamCmdLineArg('code1', 'arg1', 1, [7])
    code1_arg2 = ParamCmdLineArg('code1', 'arg2', 2,
                                 lambda d: d['code1']['arg1'] * 10)
    inst = Instance()

    inst.add_parameter(code1_arg1, 0)
    inst.add_parameter(code1_arg2, 0)

    codes_argv = inst.get_codes_argv()

    assert_equal(len(codes_argv), 1)
    assert_equal(len(codes_argv['code1']), 2)
    argv_map = dict(codes_argv)

    assert_equal(argv_map['code1'], ['7', '70'])
예제 #4
0
def test_derived_params_cross_code():
    code1_arg1 = ParamCmdLineArg('code1', 'c1arg1', 1, ['val1'])
    code1_nprocs = ParamRunner('code1', 'nprocs', [7])
    code2_arg1 = ParamCmdLineArg('code2', 'c2arg1', 1,
                                 lambda d: d['code1']['nprocs'] + 3)
    inst = Instance()
    inst.add_parameter(code1_arg1, 0)
    inst.add_parameter(code1_nprocs, 0)
    inst.add_parameter(code2_arg1, 0)

    codes_argv = inst.get_codes_argv()

    assert_equal(len(codes_argv), 2)
    argv_map = dict(codes_argv)

    assert_equal(argv_map['code1'], ['val1'])
    assert_equal(argv_map['code2'], ['10'])
예제 #5
0
class TestCampaign(Campaign):
    name = 'test_campaign'
    supported_machines = ['local', 'titan', 'cori']
    codes = [('test', dict(exe='test'))]
    sweeps = [
        SweepGroup(name='test_group', nodes=1, parameter_groups=[
          Sweep([ParamCmdLineArg('test', 'arg', 1, ['a', 'b'])])
        ])
    ]
예제 #6
0
 class TestMissingAdiosXMLCampaign(TestCampaign):
     codes = [('test', dict(exe='test'))]
     sweeps = [
         SweepGroup(name='test_group', nodes=1, parameter_groups=[
           Sweep([
             ParamCmdLineArg('test', 'arg', 1, ['a', 'b']),
             ParamAdiosXML('test', 'transport', 'adios_transport:test',
                     ['MPI_AGGREGATE:num_aggregators=4;num_osts=44',
                      'POSIX',
                      'FLEXPATH']),
           ])
         ])
     ]
예제 #7
0
def test_instance_nprocs_only():
    ds_nprocs = ParamRunner('dataspaces', 'nprocs', [1])
    ds_arg1 = ParamCmdLineArg('dataspaces', 'arg1', 1, ['val1'])

    core_nprocs = ParamRunner('core', 'nprocs', [96])

    inst = Instance()
    inst.add_parameter(ds_nprocs, 0)
    inst.add_parameter(ds_arg1, 0)
    inst.add_parameter(core_nprocs, 0)

    codes_argv = inst.get_codes_argv()

    assert_equal(len(codes_argv), 2)
    argv_map = dict(codes_argv)

    assert_equal(argv_map['dataspaces'], ['val1'])
    assert_equal(argv_map['core'], [])
예제 #8
0
 class TestMultiExeCampaign(TestCampaign):
     codes = [('first', dict(exe='testa')),
              ('second', dict(exe='testb')),
              ('third', dict(exe='testc')),
              ('fourth', dict(exe='testd')),
              ('fifth', dict(exe='teste')),
              ('sixth', dict(exe='testf')),
              ('seventh', dict(exe='testg'))]
     sweeps = [
         SweepGroup(name='test_group', parameter_groups=[
           Sweep([
             ParamCmdLineArg('first', 'arg', 1, ['a', 'b']),
             ParamCmdLineArg('second', 'arg', 1, ['2']),
             ParamCmdLineArg('third', 'arg', 1, ['3']),
             ParamCmdLineArg('fourth', 'arg', 1, ['4']),
             ParamCmdLineArg('fifth', 'arg', 1, ['5', 'five']),
             ParamCmdLineArg('sixth', 'arg', 1, ['6']),
             ParamCmdLineArg('seventh', 'arg', 1, ['7']),
           ])
         ])
     ]