Beispiel #1
0
 def loadFromDict(cls, d: Dict[str, Union[str, UUID]]) -> 'gem5Run':
     """Returns new gem5Run instance from the dictionary of values in d"""
     run = cls()
     run.artifacts = []
     for k, v in d.items():
         if isinstance(v, UUID) and k != '_id':
             a = Artifact(v)
             setattr(run, k, a)
             run.artifacts.append(a)
         else:
             setattr(run, k, v)
     return run
Beispiel #2
0
    def setUp(self):
        _db = getDBConnection('file://test.json')

        with open("test-file.txt", "w") as f:
            f.write("This is a test file.")

        self.artifact = Artifact.registerArtifact(
            name=f'test-artifact',
            typ='text',
            path=f'test-file.txt',
            cwd='./',
            command='echo "This is a test file" > test-file.txt',
            inputs=[],
            documentation=f"This artifact is made for testing.")
Beispiel #3
0
    def saveResults(self) -> None:
        """Zip up the output directory and store the results in the database.
        """

        with zipfile.ZipFile(self.outdir / 'results.zip', 'w',
                             zipfile.ZIP_DEFLATED) as zipf:
            for path in self.outdir.glob("**/*"):
                if path.name == 'results.zip': continue
                zipf.write(path, path.relative_to(self.outdir.parent))

        self.results = Artifact.registerArtifact(
            command=f'zip results.zip -r {self.outdir}',
            name=self.name,
            typ='directory',
            path=self.outdir / 'results.zip',
            cwd='./',
            documentation='Compressed version of the results directory')
Beispiel #4
0
    def saveResults(self) -> None:
        """Zip up the output directory and store the results in the
        database."""

        with zipfile.ZipFile(self.outdir / "results.zip", "w",
                             zipfile.ZIP_DEFLATED) as zipf:
            for path in self.outdir.glob("**/*"):
                if path.name == "results.zip":
                    continue
                zipf.write(path, path.relative_to(self.outdir.parent))

        self.results = Artifact.registerArtifact(
            command=f"zip results.zip -r {self.outdir}",
            name=self.name,
            typ="directory",
            path=self.outdir / "results.zip",
            cwd="./",
            documentation="Compressed version of the results directory",
        )
Beispiel #5
0
import os
import sys
from uuid import UUID

from gem5art.artifact import Artifact
from gem5art.run import gem5Run
from gem5art.tasks.tasks import run_gem5_instance

packer = Artifact.registerArtifact(
    command=
    '''wget https://releases.hashicorp.com/packer/1.4.3/packer_1.4.3_linux_amd64.zip;
    unzip packer_1.4.3_linux_amd64.zip;
    ''',
    typ='binary',
    name='packer',
    path='disk-image/packer',
    cwd='disk-image',
    documentation=
    'Program to build disk images. Downloaded sometime in August from hashicorp.'
)

experiments_repo = Artifact.registerArtifact(
    command='git clone https://your-remote-add/npb-tests.git',
    typ='git repo',
    name='npb-tests',
    path='./',
    cwd='../',
    documentation='main repo to run npb with gem5')

gem5_repo = Artifact.registerArtifact(
    command='''
Beispiel #6
0
import sys
from uuid import UUID
from itertools import starmap
from itertools import product

from gem5art.artifact import Artifact
from gem5art.run import gem5Run
from gem5art.tasks.tasks import run_gem5_instance
import multiprocessing as mp

packer = Artifact.registerArtifact(
    command=
    '''wget https://releases.hashicorp.com/packer/1.4.3/packer_1.4.3_linux_amd64.zip;
    unzip packer_1.4.3_linux_amd64.zip;
    ''',
    typ='binary',
    name='packer',
    path='disk-image/packer',
    cwd='disk-image',
    documentation=
    'Program to build disk images. Downloaded sometime in August/19 from hashicorp.'
)

experiments_repo = Artifact.registerArtifact(
    command='git clone https://your-remote-add/boot_tests.git',
    typ='git repo',
    name='boot_tests',
    path='./',
    cwd='../',
    documentation=
    'main experiments repo to run full system boot tests with gem5 20.1')
gem5_repo = Artifact.registerArtifact(
Beispiel #7
0
#!/usr/bin/env python3

#This is a job launch script for boot tests

import os
import sys
from uuid import UUID

from gem5art.artifact import Artifact
from gem5art.run import gem5Run
from gem5art.tasks.tasks import run_gem5_instance

experiments_repo = Artifact.registerArtifact(
    command='git clone https://your-remote-add/micro-tests.git',
    typ='git repo',
    name='micro-tests',
    path='./',
    cwd='../',
    documentation='main experiments repo to run microbenchmarks with gem5')

gem5_repo = Artifact.registerArtifact(
    command='''git clone https://gem5.googlesource.com/public/gem5;
    cd gem5;
    wget https://github.com/darchr/gem5/commit/38d07ab0251ea8f5181abc97a534bb60157b2b5d.patch;
    git am 38d07ab0251ea8f5181abc97a534bb60157b2b5d.patch --reject;
    ''',
    typ='git repo',
    name='gem5',
    path='gem5/',
    cwd='./',
    documentation=
import os
import sys
from uuid import UUID

from gem5art.artifact import Artifact
from gem5art.run import gem5Run
from gem5art.tasks.tasks import run_gem5_instance

experiments_repo = Artifact.registerArtifact(
    command='',
    typ='git repo',
    name='experiment',
    path='./',
    cwd='./',
    documentation='local repo to run spec 2006 experiments with gem5')

gem5_repo = Artifact.registerArtifact(
    command='''
        git clone https://gem5.googlesource.com/public/gem5;
        cd gem5;
        git remote add darchr https://github.com/darchr/gem5;
        git fetch darchr;
        git cherry-pick 6450aaa7ca9e3040fb9eecf69c51a01884ac370c;
        git cherry-pick 3403665994b55f664f4edfc9074650aaa7ddcd2c;
    ''',
    typ='git repo',
    name='gem5',
    path='gem5/',
    cwd='./',
    documentation=
    'cloned gem5 master branch from googlesource and cherry-picked 2 commits on Nov 20th'
Beispiel #9
0
import os
import sys
from uuid import UUID

from gem5art.artifact import Artifact
from gem5art.run import gem5Run
from gem5art.tasks.tasks import run_gem5_instance

experiments_repo = Artifact.registerArtifact(
    command = '',
    typ = 'git repo',
    name = 'experiment',
    path =  './',
    cwd = './',
    documentation = 'local repo to run spec 2006 experiments with gem5'
)

gem5_repo = Artifact.registerArtifact(
    command = '''
        git clone -b v19.0.0.0 https://gem5.googlesource.com/public/gem5
        cd gem5
        scons build/X86/gem5.opt -j8
    ''',
    typ = 'git repo',
    name = 'gem5',
    path =  'gem5/',
    cwd = './',
    documentation = 'cloned gem5 v19'
)

gem5_binary = Artifact.registerArtifact(
import os
import sys
from uuid import UUID
from itertools import starmap
from itertools import product

from gem5art.artifact import Artifact
from gem5art.run import gem5Run
from gem5art.tasks.tasks import run_gem5_instance

packer = Artifact.registerArtifact(
    command = '''wget https://releases.hashicorp.com/packer/1.4.3/packer_1.4.3_linux_amd64.zip;
    unzip packer_1.4.3_linux_amd64.zip;
    ''',
    typ = 'binary',
    name = 'packer',
    path =  'disk-image/packer',
    cwd = 'disk-image',
    documentation = 'Program to build disk images. Downloaded sometime in August 2019 from hashicorp.'
)

experiments_repo = Artifact.registerArtifact(
    command = 'git clone https://github.com/darchr/gem5art-experiments.git',
    typ = 'git repo',
    name = 'parsec_tests',
    path =  './',
    cwd = '../',
    documentation = 'main repo to run parsec tests with gem5'
)

parsec_repo = Artifact.registerArtifact(