oracle/graal · error · RuntimeError
Suite runs only a single benchmark.
Error message
Suite runs only a single benchmark.
What it means
The DaCapo suite's createCommandLineArgs() builds a single 'java -jar dacapo.jar <bench> <args>' command, so it must receive exactly one benchmark name. benchmarks == None means the caller invoked the suite without naming a benchmark, which this suite cannot expand automatically.
Source
Thrown at sdk/mx.sdk/mx_sdk_benchmark.py:2637
return self.daCapoPath()
# The directory that contains `stats`, `launchers`, `dat` and `jar`
def dataLocation(self):
if self.version() == "23.11-MR2-chopin":
basePath = self.daCapoPath()
subdir = "dacapo-23.11-MR2-chopin"
if self.minimalArchive():
subdir += "-minimal"
return os.path.join(basePath, subdir)
else:
raise RuntimeError(f"data location is not supported for suite version '{self.version()}'")
def minimalArchive(self):
return False
def createCommandLineArgs(self, benchmarks, bmSuiteArgs):
if benchmarks is None:
raise RuntimeError(
"Suite runs only a single benchmark.")
if len(benchmarks) != 1:
raise RuntimeError(
f"Suite runs only a single benchmark, got: {benchmarks}")
benchmark = benchmarks[0]
runArgs = self.postprocessRunArgs(benchmark, self.runArgs(bmSuiteArgs))
if runArgs is None:
return None
jarPath = self.jarPath(benchmark)
return self.vmArgs(bmSuiteArgs) + ["-jar"] + [jarPath, benchmark] + runArgs
def benchmarkList(self, bmSuiteArgs):
missing_sizes = set(self.daCapoIterations().keys()).difference(set(self.daCapoSizes().keys()))
if len(missing_sizes) > 0:
mx.abort(f"Missing size definitions for benchmark(s): {missing_sizes}")
return [b for b, it in self.daCapoIterations().items()View on GitHub (pinned to a66e9ccd1d)
Solutions
- Name the benchmark explicitly: mx benchmark dacapo-chopin:fop (or lusearch, h2, etc.).
- If you want the list of valid names, run the suite's benchmark listing (mx benchmark ... with the suite's list mode) and pick one.
- Script authors: make the benchmark a required parameter instead of optional.
Example fix
# before mx benchmark dacapo-chopin # after mx benchmark dacapo-chopin:fop
Defensive patterns
Strategy: validation
Validate before calling
benchmarks = benchmarks if benchmarks is not None else [] assert benchmarks, "DaCapo suite requires exactly one benchmark name, e.g. dacapo-chopin:fop"
Prevention
- Treat the benchmark name as a required argument in scripts around mx benchmark.
- Validate the selector is non-empty before delegating to createCommandLineArgs.
When it happens
Trigger: Running mx benchmark with the DaCapo suite but no benchmark selector, e.g. 'mx benchmark dacapo-chopin' with no ':benchmark' suffix and no benchmark in the args.
Common situations: Copy-pasting a generic benchmark command that works for suites running all benchmarks by default (like SPECjvm2008) but not for DaCapo here; scripts that omit the benchmark argument.
Related errors
- Suite runs only a single benchmark, got: {benchmarks}
- Neither {daCapoClasspathEnvVarName} variable nor {daCapoLibr
- data location is not supported for suite version '{self.vers
- Expected staged GraalHost run config at '{run_config_path}'
- The SPECJVM2008 environment variable was not specified.
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/5756d0fb4dd955dc.
Report an issue: GitHub.