Skip to content

Commit

Permalink
Fixes dune project setup and compile options
Browse files Browse the repository at this point in the history
  • Loading branch information
vulder committed Oct 20, 2023
1 parent d11b128 commit 6fbbd0e
Showing 1 changed file with 29 additions and 13 deletions.
42 changes: 29 additions & 13 deletions varats/varats/projects/cpp_projects/dune.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import typing as tp

import benchbuild as bb
from benchbuild.command import WorkloadSet, Command, SourceRoot
from benchbuild.command import WorkloadSet, SourceRoot
from benchbuild.utils import cmd
from benchbuild.utils.revision_ranges import RevisionRange
from plumbum import local
Expand All @@ -16,6 +16,8 @@
BinaryType,
ProjectBinaryWrapper,
)
from varats.project.sources import FeatureSource
from varats.project.varats_command import VCommand
from varats.project.varats_project import VProject
from varats.utils.git_util import ShortCommitHash, RevisionBinaryMap

Expand All @@ -32,7 +34,13 @@ class DunePerfRegression(VProject):
If you use Dune with an experiment that uses the vara compiler,
add `-mllvm --vara-disable-phasar` to the projects `cflags` to
disable phasar passes.
This will still allow to analyse compile-time variability.
This will still allow to analyse compile-time variability.
Might need deps:
* klu
* spqr
* umfpack
* eigen3
"""

NAME = 'DunePerfRegression'
Expand All @@ -42,25 +50,26 @@ class DunePerfRegression(VProject):
SOURCE = [
PaperConfigSpecificGit(
project_name='DunePerfRegression',
remote='git@github.com:se-sic/dune-VaRA.git',
remote='https://github.com/se-sic/dune-VaRA.git',
local='dune-VaRA',
refspec='origin/HEAD',
limit=None,
shallow=False
)
),
FeatureSource()
]

CONTAINER = get_base_image(ImageBase.DEBIAN_10)

WORKLOADS = {
WorkloadSet(WorkloadCategory.EXAMPLE): [
Command(
VCommand(
SourceRoot(
"dune-VaRA/dune-performance-regressions/build-cmake/src"
) / RSBinary('dune_performance_regressions'),
label='dune_helloworld'
),
Command(
VCommand(
SourceRoot(
"dune-VaRA/dune-performance-regressions/build-cmake/src"
) / RSBinary('poisson_test'),
Expand All @@ -71,42 +80,42 @@ class DunePerfRegression(VProject):
'poisson-yasp-Q2-3d.vtu'
]
),
Command(
VCommand(
SourceRoot(
"dune-VaRA/dune-performance-regressions/build-cmake/src"
) / RSBinary('poisson_ug_pk_2d'),
label='poisson_ug_pk_2d',
creates=['poisson-UG-Pk-2d.vtu']
),
Command(
VCommand(
SourceRoot(
"dune-VaRA/dune-performance-regressions/build-cmake/src"
) / RSBinary('poisson_yasp_q1_2d'),
label='poisson_yasp_q1_2d',
creates=['poisson-yasp-q1-2d.vtu']
),
Command(
VCommand(
SourceRoot(
"dune-VaRA/dune-performance-regressions/build-cmake/src"
) / RSBinary('poisson_yasp_q1_3d'),
label='poisson_yasp_q1_3d',
creates=['poisson-yasp-q1-3d.vtu']
),
Command(
VCommand(
SourceRoot(
"dune-VaRA/dune-performance-regressions/build-cmake/src"
) / RSBinary('poisson_yasp_q2_2d'),
label='poisson_yasp_q2_2d',
creates=['poisson-yasp-q2-2d.vtu']
),
Command(
VCommand(
SourceRoot(
"dune-VaRA/dune-performance-regressions/build-cmake/src"
) / RSBinary('poisson_yasp_q2_3d'),
label='poisson_yasp_q2_3d',
creates=['poisson-yasp-q2-3d.vtu']
),
Command(
VCommand(
SourceRoot(
"dune-VaRA/dune-performance-regressions/build-cmake/src"
) / RSBinary('poisson_alugrid'),
Expand Down Expand Up @@ -184,7 +193,14 @@ def compile(self) -> None:
cxx_compiler = bb.compiler.cxx(self)

with local.cwd(version_source):
with local.env(CC=c_compiler, CXX=cxx_compiler):
with local.env(
CC=c_compiler,
CXX=cxx_compiler,
CMAKE_FLAGS=" ".join([
"-DDUNE_ENABLE_PYTHONBINDINGS=OFF",
"-DCMAKE_DISABLE_FIND_PACKAGE_MPI=TRUE"
])
):
dunecontrol = cmd['./dune-common/bin/dunecontrol']

bb.watch(dunecontrol
Expand Down

0 comments on commit 6fbbd0e

Please sign in to comment.