Exemplo n.º 1
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'])])
        ])
    ]
Exemplo n.º 2
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'])
           ])
         ])
     ]
Exemplo n.º 3
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']),
           ])
         ])
     ]
Exemplo n.º 4
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']),
           ])
         ])
     ]
Exemplo n.º 5
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']),
           ])
         ])
     ]
def create_sweep_groups(machine_name, writer_np, reader_np, engines, node_layouts, adios_xml_file, config_file,
        run_repetitions, batch_job_timeout_secs, per_experiment_timeout):
    """
    Create sweep groups for the input set of parameters.
    For each combination of writer ranks and ADIOS engines, a separate sweep group is created.
    E.g., 128-processes-bp4

    Input args:
    machine_name:           Name of the target machine. local/summit/theta etc.
    writer_np:              List of values for the number of writer ranks
    reader_np:              List of values for the number of reader ranks
    engines:                A List of ADIOS engines
    node_layouts:           A list of node layouts (on machines that support node layouts, otherwise None)
    run_repetitions:        No. of times each experiment must be repeated
    batch_job_timeout_secs: The total runtime for each sweep group
    per_experiment_timeout: Timeout for each experiment

    Returns - List of sweep groups
    """

    sweep_groups = []
    # sweep over writer processes 
    for n in writer_np:
        for r in reader_np:
            engine_index = 0
            for e in engines:
                # Create a separate sweep group (batch job) for different values of writer nprocs
                sg = SweepGroup(
                        name                = "{}-writers-{}-readers-{}".format(n, r, engine_index),
                        walltime            = batch_job_timeout_secs,
                        per_run_timeout     = per_experiment_timeout,
                        component_inputs    = {'writer': config_file},
                        run_repetitions     = run_repetitions,
                        tau_profiling       = True,
                        parameter_groups    = None
                        )
                # Set launch mode to mpmd for insitumpi runs
                # if 'insitumpi' in e: sg.launch_mode = 'mpmd'
                # Now lets create and add a list of sweep objects to this sweep group
                sweep_objs = []
                # create a parameter sweep object for this parameter combination
                if node_layouts:
                    for nl in node_layouts:
                        # create a parameter sweep object for this parameter combination
                        sweep_obj = create_experiment (
                                        writer_nprocs           = n,
                                        reader_nprocs           = r,
                                        config_file             = config_file[0],
                                        adios_xml_file          = adios_xml_file, 
                                        engine                  = e,
                                        writer_decomposition    = n,
                                        reader_decomposition    = r,
                                        machine_name            = machine_name,
                                        node_layout             = nl,
                                        )
                        sweep_objs.append(sweep_obj)
                else:
                    sweep_obj = create_experiment (
                                    writer_nprocs           = n,
                                    reader_nprocs           = r,
                                    config_file             = config_file[0],
                                    adios_xml_file          = adios_xml_file, 
                                    engine                  = e,
                                    writer_decomposition    = n,
                                    reader_decomposition    = r,
                                    machine_name            = machine_name,
                                    node_layout             = None,
                                    )
                    sweep_objs.append(sweep_obj)

            
                # we have created our sweep objects. Add them to the sweep group
                sg.parameter_groups = sweep_objs

                # Add this sweep group to the list that this function will return
                sweep_groups.append(sg)
                engine_index = engine_index + 1

    return sweep_groups
def create_sweep_groups(machine_name, writer_np, reader_np_ratio, size_per_pe,
                        engines, node_layouts, run_repetitions,
                        batch_job_timeout_secs, per_experiment_timeout):
    """
    Create sweep groups for the input set of parameters.
    For each combination of writer ranks and ADIOS engines, a separate sweep group is created.
    E.g., 128-processes-bp4

    Input args:
    machine_name:           Name of the target machine. local/summit/theta etc.
    writer_np:              List of values for the number of writer ranks
    reader_np_ratio:        Ratio of the number of reader ranks to writer ranks
    size_per_pe:            Data size per process
    engines:                A List of ADIOS engines
    node_layouts:           A list of node layouts (on machines that support node layouts, otherwise None)
    run_repetitions:        No. of times each experiment must be repeated
    batch_job_timeout_secs: The total runtime for each sweep group
    per_experiment_timeout: Timeout for each experiment

    Returns - List of sweep groups
    """

    sweep_groups = []

    # sweep over writer processes
    for n in writer_np:
        for e in engines:
            # Create a separate sweep group (batch job) for different values of writer nprocs
            sg = SweepGroup(name="{}-processes-{}".format(n, e),
                            walltime=batch_job_timeout_secs,
                            per_run_timeout=per_experiment_timeout,
                            component_inputs={'writer': input_files},
                            run_repetitions=run_repetitions,
                            tau_profiling=True,
                            parameter_groups=None)

            # Now lets create and add a list of sweep objects to this sweep group
            sweep_objs = list()
            scaling = '-w'
            if e == 'bp4':
                adios_xml = "xgc-restart-test-bp4.xml"
            elif e == 'hdf5':
                adios_xml = "xgc-restart-test-hdf5.xml"
            for config_fname in [[
                    'xgc-restart-test-write.txt', 'xgc-restart-test-read.txt'
            ]]:
                layouts = node_layouts or [None]
                for nl in layouts:
                    # create a parameter sweep object for this parameter combination
                    sweep_obj = create_experiment(writer_nprocs=n,
                                                  reader_nprocs=n,
                                                  configFile=config_fname,
                                                  scalingType=scaling,
                                                  adios_xml_file=adios_xml,
                                                  writer_decomposition=n,
                                                  reader_decomposition=n,
                                                  machine_name=machine_name,
                                                  node_layout=nl,
                                                  post_hoc=True)
                    sweep_objs.append(sweep_obj)

            # we have created our sweep objects. Add them to the sweep group
            sg.parameter_groups = sweep_objs

            # Add this sweep group to the list that this function will return
            sweep_groups.append(sg)

    return sweep_groups
def create_sweep_groups(machine_name, writer_np, reader_np_ratio, size_per_pe,
                        engines, node_layouts, run_repetitions,
                        batch_job_timeout_secs, per_experiment_timeout):
    """
    Create sweep groups for the input set of parameters.
    For each combination of writer ranks and ADIOS engines, a separate sweep group is created.
    E.g., 128-processes-bp4

    Input args:
    machine_name:           Name of the target machine. local/summit/theta etc.
    writer_np:              List of values for the number of writer ranks
    reader_np_ratio:        Ratio of the number of reader ranks to writer ranks
    size_per_pe:            Data size per process
    engines:                A List of ADIOS engines
    node_layouts:           A list of node layouts (on machines that support node layouts, otherwise None)
    run_repetitions:        No. of times each experiment must be repeated
    batch_job_timeout_secs: The total runtime for each sweep group
    per_experiment_timeout: Timeout for each experiment

    Returns - List of sweep groups
    """

    sweep_groups = []

    # sweep over writer processes
    for n in writer_np:
        for e in engines:
            # Create a separate sweep group (batch job) for different values of writer nprocs
            sg = SweepGroup(name="{}-processes-{}".format(n, e),
                            walltime=batch_job_timeout_secs,
                            per_run_timeout=per_experiment_timeout,
                            component_inputs={'writer': input_files},
                            run_repetitions=run_repetitions,
                            tau_profiling=False,
                            parameter_groups=None)

            # Set launch mode to mpmd for insitumpi and ssc runs
            if 'insitumpi' in e: sg.launch_mode = 'mpmd'
            if 'ssc' in e: sg.launch_mode = 'mpmd'

            # Now lets create and add a list of sweep objects to this sweep group
            sweep_objs = []

            # Sweep over data size per process, engines, and the readers_ratio
            for s in size_per_pe:
                for r_ratio in reader_np_ratio:

                    # no. of reader ranks == no. of writers / reader_ratio
                    r = n // r_ratio

                    config_fname = "staging-perf-test-{}-{}to1.txt".format(
                        s, r_ratio)
                    scaling = '-w'
                    adios_xml = 'staging-perf-test-{}.xml'.format(e)

                    # Ugh. Need a better way to iterate over node layouts if it is not None
                    layouts = node_layouts or [None]
                    for nl in layouts:

                        # create a parameter sweep object for this parameter combination
                        sweep_obj = create_experiment(
                            writer_nprocs=n,
                            reader_nprocs=r,
                            configFile=config_fname,
                            scalingType=scaling,
                            adios_xml_file=adios_xml,
                            writer_decomposition=n,
                            reader_decomposition=r,
                            machine_name=machine_name,
                            node_layout=nl,
                            post_hoc=False)
                        sweep_objs.append(sweep_obj)

            # we have created our sweep objects. Add them to the sweep group
            sg.parameter_groups = sweep_objs

            # Add this sweep group to the list that this function will return
            sweep_groups.append(sg)

    return sweep_groups