Пример #1
0
def posthoc_analysis(sim_nprocs, analysis_nprocs):
    sweep_parameters = [
        p.ParamRunner('simulation', 'nprocs', [sim_nprocs]),
        p.ParamCmdLineOption('simulation', 'sim input', '-in',
                             ["in.lj.nordf"]),
        p.ParamADIOS2XML('simulation', 'sim output engine', 'custom', 'engine',
                         [{
                             'BP4': {}
                         }]),
        p.ParamRunner('rdf_calc', 'nprocs', [analysis_nprocs]),
        p.ParamCmdLineOption('rdf_calc', 'input', '-in', ["in.lj.rdf.rerun"]),
    ]

    sweep = p.Sweep(parameters=sweep_parameters,
                    rc_dependency={'rdf_calc': 'simulation'},
                    node_layout={'summit': node_layouts.separate_nodes()})

    return sweep
Пример #2
0
def inline_analysis(sim_nprocs):
    sweep_parameters = [
        p.ParamRunner('sim_inline_rdf_calc', 'nprocs', [sim_nprocs]),
        p.ParamCmdLineOption('sim_inline_rdf_calc', 'input', '-in',
                             ["in.lj.rdf.nodump"]),
    ]
    sweep = p.Sweep(parameters=sweep_parameters,
                    rc_dependency=None,
                    node_layout={'summit': node_layouts.all_sim_nodes()})
    return sweep
Пример #3
0
def create_experiment(writer_nprocs,
                      configFile,
                      scalingType,
                      adios_xml_file,
                      writer_decomposition,
                      machine_name,
                      node_layout,
                      post_hoc=False):
    """
    Creates a sweep object that tells Cheetah how to run the adios io test.
    Assumes 1D decomposition.
    """

    params = [
        p.ParamRunner('writer', 'nprocs', [writer_nprocs]),
        p.ParamCmdLineOption('writer', 'appid', '-a', [1]),
        p.ParamCmdLineOption('writer', 'configFile', '-c', [configFile]),
        p.ParamCmdLineOption('writer', 'scaling', scalingType, [None]),
        p.ParamCmdLineOption('writer', 'adios_xml_file', '-x',
                             [adios_xml_file]),
        p.ParamCmdLineOption('writer', 'decomposition', '-d',
                             [writer_decomposition]),
        p.ParamCmdLineOption('writer', 'timing_info', '-t', [None]),
    ]

    rc_dependency = None

    sweep = p.Sweep(parameters=params, rc_dependency=rc_dependency)
    if node_layout:
        sweep.node_layout = {machine_name: node_layout}

    return sweep
Пример #4
0
def insitu_analysis(sim_nprocs, analysis_nprocs, node_layout, adios_engine):
    sweep_parameters = [
        p.ParamRunner('simulation', 'nprocs', [sim_nprocs]),
        p.ParamCmdLineOption('simulation', 'sim input', '-in',
                             ["in.lj.nordf"]),
        p.ParamADIOS2XML('simulation', 'sim output engine', 'custom', 'engine',
                         [{
                             adios_engine: {}
                         }]),
        p.ParamRunner('rdf_calc', 'nprocs', [analysis_nprocs]),
        p.ParamCmdLineOption('rdf_calc', 'input', '-in', ["in.lj.rdf.rerun"]),
        p.ParamADIOS2XML('rdf_calc', 'analysis input engine', 'read_dump',
                         'engine', [{
                             adios_engine: {}
                         }]),
    ]

    sweep = p.Sweep(parameters=sweep_parameters,
                    rc_dependency=None,
                    node_layout={'summit': node_layout})

    return sweep
Пример #5
0
class Adios_iotest(Campaign):

    # A name for the campaign
    name = "ADIOS_IOTEST"

    # A list of the codes that will be part of the workflow
    # If there is an adios xml file associated with the codes, list it here
    codes = [("writer", dict(exe="adios_iotest")),
             ("reader", dict(exe="adios_iotest"))]

    # A list of machines that this campaign must be supported on
    supported_machines = ['local', 'theta', 'summit']

    # Option to kill an experiment (just one experiment, not the full sweep or campaign) if one of the codes fails
    kill_on_partial_failure = True

    # Some pre-processing in the experiment directory
    # This is performed when the campaign directory is created (before the campaign is launched)
    run_dir_setup_script = None

    # A post-processing script to be run in the experiment directory after the experiment completes
    # For example, removing some large files after the experiment is done
    run_post_process_script = 'cleanup.sh'

    # umask applied to your directory in the campaign so that colleagues can view files
    umask = '027'

    # Scheduler information: job queue, account-id etc. Leave it to None if running on a local machine
    scheduler_options = {
        'theta': {
            'project': 'CSC249ADCD01',
            'queue': 'batch'
        },
        'summit': {
            'project': 'csc303'
        }
    }

    # Setup your environment. Loading modules, setting the LD_LIBRARY_PATH etc.
    # Ensure this script is executable
    app_config_scripts = {
        'local': 'env_setup.sh',
        'theta': 'env_setup.sh',
        'summit': 'env_setup.sh'
    }

    input_files = [
        'staging-perf-test-16MB-2to1.txt', 'staging-perf-test-16MB-8to1.txt',
        'staging-perf-test-1MB-2to1.txt', 'staging-perf-test-1MB-8to1.txt',
        'staging-perf-test-512MB-2to1.txt', 'staging-perf-test-512MB-8to1.txt',
        'staging-perf-test-bp4.xml', 'staging-perf-test-insitumpi.xml',
        'staging-perf-test-ssc.xml', 'staging-perf-test-sst-rdma.xml',
        'staging-perf-test-sst-tcp.xml'
    ]

    # Create the sweep parameters for a sweep
    params = {}
    params['writer'] = {}
    params['reader'] = {}

    params['writer']['nprocs'] = p.ParamRunner('writer', 'nprocs', [])
    params['writer']['appid'] = p.ParamCmdLineOption('writer', 'appid', '-a',
                                                     [1])
    params['writer']['configfile'] = p.ParamCmdLineOption(
        'writer', 'configFile', '-c', [])
    params['writer']['scaling'] = p.ParamCmdLineOption('writer', 'scaling',
                                                       '-w', [None])
    params['writer']['xmlfile'] = p.ParamCmdLineOption('writer', 'xmlfile',
                                                       '-x', [])
    params['writer']['decomposition'] = p.ParamCmdLineOption(
        'writer', 'decomposition', '-d', [])

    params['reader']['nprocs'] = p.ParamRunner('reader', 'nprocs', [])
    params['reader']['appid'] = p.ParamCmdLineOption('reader', 'appid', '-a',
                                                     [2])
    params['reader']['configfile'] = p.ParamCmdLineOption(
        'reader', 'configFile', '-c', [])
    params['reader']['scaling'] = p.ParamCmdLineOption('reader', 'scaling',
                                                       '-w', [None])
    params['reader']['xmlfile'] = p.ParamCmdLineOption('reader', 'xmlfile',
                                                       '-x', [])
    params['reader']['decomposition'] = p.ParamCmdLineOption(
        'reader', 'decomposition', '-d', [])

    sweeps = []
    for n in [8]:
        group_sweeps = get_sweeps(params, n * 32)
        # pdb.set_trace()
        s_group = p.SweepGroup(
            "{}-nodes".format(n),
            walltime=7200,
            per_run_timeout=600,
            component_inputs={'writer': input_files},
            #nodes=128,
            parameter_groups=group_sweeps,
        )
        sweeps.append(s_group)
class NWChem(Campaign):
    # A name for the campaign
    name = "nwchem"

    # Define your workflow. Setup the applications that form the workflow.
    # exe may be an absolute path.
    # The adios xml file is automatically copied to the campaign directory.
    # 'runner_override' may be used to launch the code on a login/service node as a serial code
    #   without a runner such as aprun/srun/jsrun etc.
    codes = [
        ("nwchem_main",
         dict(
             exe=
             "/ccs/proj/e2e/pnorbert/ADIOS/ADIOS2/build.rhea.gcc/install/bin/adios2_iotest",
             adios_xml_file='copro.xml')),
        ("sorting",
         dict(
             exe=
             "/ccs/proj/e2e/pnorbert/ADIOS/ADIOS2/build.rhea.gcc/install/bin/adios2_iotest",
             adios_xml_file='copro.xml',
             runner_override=False)),
    ]

    # List of machines on which this code can be run
    supported_machines = ['local', 'titan', 'theta', 'rhea']

    # Kill an experiment right away if any workflow components fail (just the experiment, not the whole group)
    kill_on_partial_failure = True

    # Any setup that you may need to do in an experiment directory before the experiment is run
    run_dir_setup_script = None

    # A post-process script that is run for every experiment after the experiment completes
    run_post_process_script = None

    # Directory permissions for the campaign sub-directories
    umask = '027'

    # Options for the underlying scheduler on the target system. Specify the project ID and job queue here.
    # scheduler_options = {'theta': {'project':'CSC249ADCD01', 'queue': 'default'}}
    scheduler_options = {'rhea': {'project': 'csc143'}}

    # A way to setup your environment before the experiment runs. Export environment variables such as LD_LIBRARY_PATH here.
    app_config_scripts = {
        'local': 'setup.sh',
        'theta': 'env_setup.sh',
        'rhea': 'setup_nwchem_rhea.sh'
    }

    # Setup the sweep parameters for a Sweep
    sweep1_parameters = [
        # ParamRunner 'nprocs' specifies the no. of ranks to be spawned
        p.ParamRunner('nwchem_main', 'nprocs', [80]),

        # Create a ParamCmdLineArg parameter to specify a command line argument to run the application
        p.ParamCmdLineOption('nwchem_main', 'app', '-a', [1]),
        p.ParamCmdLineOption('nwchem_main', 'app-config', '-c',
                             ['copro-80.txt']),
        p.ParamCmdLineOption('nwchem_main', 'adios-config', '-x',
                             ['copro.xml']),
        p.ParamCmdLineOption('nwchem_main', 'strongscaling', '-w', [None]),
        p.ParamCmdLineOption('nwchem_main', 'timing', '-t', [None]),
        p.ParamCmdLineOption('nwchem_main', 'decomposition', '-d', [80]),
        # Change the engine for the 'SimulationOutput' IO object in the adios xml file to SST for coupling.
        p.ParamADIOS2XML('nwchem_main', 'dump_trajectory', 'trj_dump_out',
                         'engine', [{
                             'BP4': {
                                 'OpenTimeoutSecs': '30.0'
                             }
                         }]),
        # Now setup options for the pdf_calc application.
        # Sweep over four values for the nprocs
        p.ParamRunner('sorting', 'nprocs', [8]),
        p.ParamCmdLineOption('sorting', 'app', '-a', [1]),
        p.ParamCmdLineOption('sorting', 'app-config', '-c', ['copro-80.txt']),
        p.ParamCmdLineOption('sorting', 'adios-config', '-x', ['copro.xml']),
        p.ParamCmdLineOption('sorting', 'weakscaling', '-s', [None]),
        p.ParamCmdLineOption('sorting', 'timing', '-t', [None]),
        p.ParamCmdLineOption('sorting', 'decomposition', '-d', [8]),
        # Change the engine for the 'SimulationOutput' IO object in the adios xml file to SST for coupling.
        p.ParamADIOS2XML('sorting', 'load_trajectory', 'trj_dump_in', 'engine',
                         [{
                             'BP4': {
                                 'OpenTimeoutSecs': '30.0'
                             }
                         }]),
    ]
    #print(sweep1_parameters)
    sweep2_parameters = sweep1_parameters.copy()
    sweep2_parameters[7] = p.ParamADIOS2XML('nwchem_main', 'dump_trajectory',
                                            'trj_dump_out', 'engine', [{
                                                'SST': {}
                                            }])
    sweep2_parameters[15] = p.ParamADIOS2XML('sorting', 'load_trajectory',
                                             'trj_dump_in', 'engine', [{
                                                 'SST': {}
                                             }])
    sweep3_parameters = sweep1_parameters.copy()
    sweep3_parameters[7] = p.ParamADIOS2XML('nwchem_main', 'dump_trajectory',
                                            'trj_dump_out', 'engine', [{
                                                "Null": {}
                                            }])
    sweep3_parameters[15] = p.ParamADIOS2XML('sorting', 'load_trajectory',
                                             'trj_dump_in', 'engine', [{
                                                 "Null": {}
                                             }])
    sweep4_parameters = sweep1_parameters.copy()
    sweep4_parameters[7] = p.ParamADIOS2XML('nwchem_main', 'dump_trajectory',
                                            'trj_dump_out', 'engine', [{
                                                'BP4': {
                                                    'OpenTimeoutSecs': '30.0',
                                                    'BurstBufferPath': '/tmp'
                                                }
                                            }])
    sweep4_parameters[15] = p.ParamADIOS2XML('sorting', 'load_trajectory',
                                             'trj_dump_in', 'engine', [{
                                                 'BP4': {
                                                     'OpenTimeoutSecs': '30.0',
                                                     'BurstBufferPath': '/tmp'
                                                 }
                                             }])
    #sweep4_parameters = sweep1_parameters.copy()
    #sweep4_parameters[7] = p.ParamADIOS2XML('nwchem_main', 'dump_trajectory', 'trj_dump_out', 'engine', [ {'SSC':{'DataTransport':'WAN'}} ])
    #sweep4_parameters[15] = p.ParamADIOS2XML('sorting', 'load_trajectory', 'trj_dump_in', 'engine', [ {'SSC':{'DataTransport':'WAN'}} ])

    # Create Sweep objects. This one does not define a node-layout, and thus, all cores of a compute node will be
    #   utilized and mapped to application ranks.
    sweep1 = p.Sweep(parameters=sweep1_parameters)
    sweep2 = p.Sweep(parameters=sweep2_parameters)
    sweep3 = p.Sweep(parameters=sweep3_parameters)
    sweep4 = p.Sweep(parameters=sweep4_parameters)

    # Create a SweepGroup and add the above Sweeps. Set batch job properties such as the no. of nodes,
    sweepGroup1 = p.SweepGroup(
        "nwchem-adios",  # A unique name for the SweepGroup
        walltime=18060,  # Total runtime for the SweepGroup
        per_run_timeout=
        500,  # Timeout for each experiment                                
        parameter_groups=[sweep1, sweep2, sweep3,
                          sweep4],  # Sweeps to include in this group
        launch_mode='default',  # Launch mode: default, or MPMD if supported
        nodes=6,  # No. of nodes for the batch job.
        run_repetitions=
        2,  # No. of times each experiment in the group must be repeated (Total no. of runs here will be 3)
        component_inputs={'nwchem_main': ['copro-80.txt']},
    )

    # Activate the SweepGroup
    sweeps = [sweepGroup1]
Пример #7
0
class param_test(Campaign):
    """
    Fake campaign designed to exercise all param types. Instead of real codes,
    bash scripts that echo args and cat files are used.

    NOTE: ParamAdiosXML is exercised by heat_transfer_*.py, not used here,
    all other types should be included.
    """
    # Used in job names submitted to scheduler.
    name = "param_test"

    # Scripts that just print args and exit. print1.sh also cats it's
    # config file.
    codes = [("print1", dict(exe="print1.sh")),
             ("print2", dict(exe="print2.sh")),
             ("print3", dict(exe="print3.sh"))]

    # Files to be copied from app dir to all run component directories,
    # e.g. for use with ParamConfig and ParamAdiosXML.
    inputs = ["all.conf"]

    # Document which machines the campaign is designed to run on. An
    # error will be raised if a different machine is specified on the
    # cheetah command line.
    supported_machines = ['local', 'cori', 'titan', 'theta']

    # Per machine scheduler options. Keys are the machine name, values
    # are dicts of name value pairs for the options for that machine.
    # Options must be explicitly supported by Cheetah, this is not
    # currently a generic mechanism.
    scheduler_options = {
        "cori": {
            "queue": "debug",
            "constraint": "haswell",
            "license": "SCRATCH,project",
        },
        "titan": {
            "queue": "debug",
            "project": "csc242",
        },
        "theta": {
            "queue": "debug-flat-quad",
            "project": "CSC249ADCD01",
        }
    }

    sweeps = [
        p.SweepGroup(
            name="test",
            nodes=4,
            walltime=timedelta(minutes=5),
            component_subdirs=True,
            component_inputs={
                'print1': ['print1.conf'],
                'print2': ['print2.ini'],
                'print3': ['print3.xml'],
            },
            parameter_groups=[
                p.Sweep([
                    p.ParamCmdLineArg("print1", "arg1", 1, ["val1", "val2"]),
                    p.ParamCmdLineArg("print1", "arg2", 2, [64, 128]),
                    p.ParamCmdLineOption("print1", "opt1", "--opt1",
                                         [0.2, 0.3]),
                    p.ParamCmdLineOption(
                        "print1", "derived", "--derived",
                        lambda d: d["print1"]["arg2"] * d["print2"]["opt1"]),
                    p.ParamKeyValue("print1", "config1", "print1.conf",
                                    "config1", ["c1", "c2"]),
                    p.ParamCmdLineArg("print2", "arg1", 1, ["1lav"]),
                    p.ParamCmdLineArg("print2", "arg2", 2, [2]),
                    p.ParamCmdLineOption("print2", "opt1", "--opt1", [-100]),
                    p.ParamKeyValue("print2", "kvconfig", "print2.ini",
                                    "mykey", ["cv1", "cv2"]),
                    p.ParamCmdLineArg("print3", "arg1", 1, ["val3.1"]),
                    p.ParamConfig("print3", "xmlconfig", "print3.xml",
                                  "WIDGET_VALUE", ["somevalue"]),
                ]),
            ]),
    ]
Пример #8
0
def create_experiment(writer_nprocs, reader_nprocs, config_file, adios_xml_file, engine, writer_decomposition, reader_decomposition, machine_name, node_layout):
    """
    Creates a sweep object that tells Cheetah how to run the adios io test.
    Assumes 1D decomposition.
    """
    # print(adios_xml_file)
    # print(engine)
    params = [
            # ParamRunner 'nprocs' specifies the no. of ranks to be spawned 
            p.ParamRunner       ('writer', 'nprocs', [writer_nprocs]),
            # Create a ParamCmdLineArg parameter to specify a command line argument to run the application
            p.ParamCmdLineOption   ('writer', 'app', '-a', [1]),
            p.ParamCmdLineOption   ('writer', 'app-config', '-c', [config_file]),
            p.ParamCmdLineOption   ('writer', 'adios-config', '-x', [adios_xml_file]),
            p.ParamCmdLineOption   ('writer', 'strongscaling', '-w', [None]),
            p.ParamCmdLineOption   ('writer', 'timing', '-t', [None]),
            p.ParamCmdLineOption   ('writer', 'decomposition', '-d', [writer_decomposition]),
            # Change the engine for the 'SimulationOutput' IO object in the adios xml file
            p.ParamADIOS2XML    ('writer', 'dump_trajectory', 'trj_dump_out', 'engine', [engine]),
            # Sweep over four values for the nprocs 
            p.ParamRunner       ('reader', 'nprocs', [reader_nprocs]),
            p.ParamCmdLineOption   ('reader', 'app', '-a', [2]),
            p.ParamCmdLineOption   ('reader', 'app-config', '-c', [config_file]),
            p.ParamCmdLineOption   ('reader', 'adios-config', '-x', [adios_xml_file]),
            p.ParamCmdLineOption   ('reader', 'weakscaling', '-s', [None]),
            p.ParamCmdLineOption   ('reader', 'timing', '-t', [None]),
            p.ParamCmdLineOption   ('reader', 'decomposition', '-d', [reader_decomposition]),
            # Change the engine for the 'SimulationOutput' IO object in the adios xml file
            p.ParamADIOS2XML    ('reader', 'load_trajectory', 'trj_dump_in', 'engine', [engine]),
    ]

    sweep = p.Sweep(parameters=params)
    if node_layout:
        sweep.node_layout = {machine_name: node_layout}

    return sweep
class PlanarReadqCampaign(Campaign):

    name = "planar"

    codes = [("app1",
              dict(exe="adios_iotest",
                   adios_xml_file='adios2.xml',
                   sleep_after=5)),
             ("app2",
              dict(exe="adios_iotest",
                   adios_xml_file='adios2.xml',
                   runner_override=False))]

    run_dir_setup_script = "planar_reads.sh"

    supported_machines = ['local', 'cori', 'titan', 'theta']

    scheduler_options = {
        "cori": {
            "queue": "debug",
            "constraint": "haswell",
            "license": "SCRATCH,project",
        },
        "titan": {
            "queue": "debug",
            "project": "csc242",
        },
        "theta": {
            "queue": "debug-flat-quad",
            "project": "CSC249ADCD01",
        }
    }

    umask = '027'

    sweeps = [
        p.SweepGroup(
            name="all-methods",
            nodes=2,
            walltime=timedelta(minutes=30),
            parameter_groups=[
                p.Sweep([
                    p.ParamRunner("app1", "nprocs", [8]),
                    p.ParamRunner("app2", "nprocs", [8]),
                    p.ParamCmdLineOption("app1", "app ID", "-a", [1]),
                    p.ParamCmdLineOption("app1", "config file", "-c",
                                         ["planar_reads.txt"]),
                    p.ParamCmdLineOption("app1", "adios xml", "-x",
                                         ["adios2.xml"]),
                    p.ParamCmdLineArg("app1", "weak scaling", 1, ["-w"]),
                    # Fix this somehow
                    p.ParamCmdLineArg("app1", "rank decomp", 2, ["-d"]),
                    p.ParamCmdLineArg("app1", "decomp x", 3, [2]),
                    p.ParamCmdLineArg("app1", "decomp y", 4, [2]),
                    p.ParamCmdLineArg("app1", "decomp z", 5, [2]),
                    p.ParamCmdLineOption("app2", "app ID", "-a", [2]),
                    p.ParamCmdLineOption("app2", "config file", "-c",
                                         ["planar_reads.txt"]),
                    p.ParamCmdLineOption("app2", "adios xml", "-x",
                                         ["adios2.xml"]),
                    p.ParamCmdLineArg("app2", "weak scaling", 1, ["-w"]),
                    p.ParamCmdLineArg("app2", "rank decomp", 2, ["-d"]),
                    p.ParamCmdLineArg("app2", "decomp x", 3, [2]),
                    p.ParamCmdLineArg("app2", "decomp y", 4, [2]),
                    p.ParamCmdLineArg("app2", "decomp z", 5, [2]),
                    p.ParamEnvVar("app1", "cube length", "CUBE_LEN", [40]),
                    p.ParamEnvVar("app1", "read pattern", "READ_PATTERN",
                                  ["ij", "ik", "jk", "chunk"])
                ]),
            ]),
    ]