Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HyTeG Project #841

Merged
merged 17 commits into from
Oct 23, 2023
Merged
89 changes: 89 additions & 0 deletions varats/varats/projects/cpp_projects/hyteg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import typing as tp

import benchbuild as bb
from benchbuild.command import WorkloadSet, Command, SourceRoot
vulder marked this conversation as resolved.
Show resolved Hide resolved
from benchbuild.utils.cmd import make, cmake, mkdir
from benchbuild.utils.revision_ranges import SingleRevision
from benchbuild.utils.settings import get_number_of_jobs
from experiment.workload_util import WorkloadCategory, RSBinary
from plumbum import local

from varats.paper.paper_config import PaperConfigSpecificGit
from varats.project.project_domain import ProjectDomains
from varats.project.project_util import get_local_project_git_path, BinaryType
from varats.project.sources import FeatureSource
from varats.project.varats_project import VProject
from varats.utils.git_util import ShortCommitHash, RevisionBinaryMap
from varats.utils.settings import bb_cfg


class HyTeg(VProject):
NAME = 'HyTeg'
GROUP = 'cpp_projects'
DOMAIN = ProjectDomains.TEST
LuAbelt marked this conversation as resolved.
Show resolved Hide resolved

SOURCE = [
PaperConfigSpecificGit(
project_name="HyTeg",
remote="[email protected]:se-sic/hyteg-VaRA.git",
vulder marked this conversation as resolved.
Show resolved Hide resolved
local="HyTeg",
refspec="origin/HEAD",
limit=None,
shallow=False
),
FeatureSource()
]

WORKLOADS = {
WorkloadSet(WorkloadCategory.EXAMPLE): [
Command(
SourceRoot("HyTeG/build/apps/profiling") /
LuAbelt marked this conversation as resolved.
Show resolved Hide resolved
RSBinary('ProfilingApp'),
label='ProfilingApp'
)
]
}

@staticmethod
def binaries_for_revision(
revision: ShortCommitHash
) -> tp.List['ProjectBinaryWrapper']:
binaries = RevisionBinaryMap(get_local_project_git_path(HyTeg.NAME))

binaries.specify_binary(
"build/apps/profiling/ProfilingApp",
BinaryType.EXECUTABLE,
only_valid_in=SingleRevision(
"f4711dadc3f61386e6ccdc704baa783253332db2"
)
)

return binaries[revision]

def compile(self) -> None:
hyteg_source = local.path(self.source_of(self.primary_source))

mkdir("-p", hyteg_source / "build")

# Currently Phasar passes crash the compiler
# This limits us to analysing compile time variability
self.cflags += ["-mllvm", "--vara-disable-phasar"]
LuAbelt marked this conversation as resolved.
Show resolved Hide resolved

cc_compiler = bb.compiler.cc(self)
cxx_compiler = bb.compiler.cxx(self)

with local.cwd(hyteg_source / "build"):
with local.env(CC=str(cc_compiler), CXX=str(cxx_compiler)):
bb.watch(cmake)(
"..", "-DWALBERLA_BUILD_WITH_MPI=OFF",
"-DHYTEG_BUILD_DOC=OFF"
)

with local.cwd(hyteg_source / "build" / "apps" / "profiling"):
bb.watch(make)("-j", get_number_of_jobs(bb_cfg()))

def recompile(self) -> None:
pass
LuAbelt marked this conversation as resolved.
Show resolved Hide resolved

def run_tests(self) -> None:
pass
1 change: 1 addition & 0 deletions varats/varats/tools/bb_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def update_projects(
'varats.projects.cpp_projects.z3',
'varats.projects.cpp_projects.ect',
'varats.projects.cpp_projects.lepton'
'varats.projects.cpp_projects.hyteg'
]
projects_conf.value[:] += [
'varats.projects.cpp_projects.doxygen', 'varats.projects.cpp_projects'
Expand Down