def run(local, targets_and_opts): from pyutils import buildinfo binary_dir = buildinfo.binary_dir command = [] if targets_and_opts: run_command = os.path.join(binary_dir, targets_and_opts) command += run_command.split() if local: output = runtools.run(command) else: output = runtools.srun(command) data = json.loads(output) data[var._project_name] = {'commit': _git_commit(), 'datetime': _git_datetime()} data['environment'] = { 'hostname': env.hostname(), 'clustername': env.clustername(local), 'compiler': buildinfo.compiler, 'datetime': _now(), 'envfile': buildinfo.envfile } log.debug('Perftests data', pprint.pformat(data)) return data
def run(domain, runs): from pyutils import buildinfo stencils = stencil_loader.load(buildinfo.grid) results = dict() for backend in buildinfo.backends: if backend == 'naive': continue commands = [_stencil_command(backend, s, domain) for s in stencils] allcommands = [c for c in commands for _ in range(runs)] log.info('Running stencils') alloutputs = runtools.sbatch_retry(allcommands, 5) log.info('Running stencils finished') alltimes = [_parse_time(o) for _, o, _ in alloutputs] times = [alltimes[i:i + runs] for i in range(0, len(alltimes), runs)] info = result.RunInfo(name='gridtools', version=_git_commit(), datetime=_git_datetime(), precision=buildinfo.precision, backend=backend, grid=buildinfo.grid, compiler=buildinfo.compiler, hostname=env.hostname(), clustername=env.clustername()) results[backend] = result.from_data(info, domain, stencils, times) return results
def run(local, scheduling_policy, threads, extra_opts): from pyutils import buildinfo binary = os.path.join(buildinfo.binary_dir, 'bin', 'future_overhead_report_test') command = [binary] + [str(scheduling_policy)] + [str(threads)] if extra_opts: command += extra_opts.split() if local: output = runtools.run(command) else: output = runtools.srun(command) data = json.loads(output) data[var._project_name] = { 'commit': _git_commit(), 'datetime': _git_datetime() } data['environment'] = { 'hostname': env.hostname(), 'clustername': env.clustername(local), 'compiler': buildinfo.compiler, 'datetime': _now(), 'envfile': buildinfo.envfile } log.debug('Perftests data', pprint.pformat(data)) return data
def run(domain, runs): from pyutils import buildinfo binary = os.path.join(buildinfo.binary_dir, 'tests', 'regression', 'perftests') output = runtools.srun([binary] + [str(d) for d in domain] + [str(runs), '-d']) data = json.loads(output) data['gridtools'] = {'commit': _git_commit(), 'datetime': _git_datetime()} data['environment'] = { 'hostname': env.hostname(), 'clustername': env.clustername(), 'compiler': buildinfo.compiler, 'datetime': _now(), 'envfile': buildinfo.envfile } data['domain'] = list(domain) log.debug('Perftests data', pprint.pformat(data)) return data