oracle/graal · error · RuntimeError

Neither {daCapoClasspathEnvVarName} variable nor {daCapoLibr

Error message

Neither {daCapoClasspathEnvVarName} variable nor {daCapoLibraryName} library specified.

What it means

DaCapo benchmark suite environment validation failure. validateEnvironment() checks daCapoPath(); when neither the suite's DaCapo classpath environment variable (e.g. DACAPO_23_11_MR2_CHOPIN) nor the DaCapo mx library is available, the suite cannot locate the benchmark JARs and aborts.

Source

Thrown at sdk/mx.sdk/mx_sdk_benchmark.py:2574

    def daCapoIterations(self):
        raise NotImplementedError()

    def daCapoSizes(self):
        raise NotImplementedError()

    def completeBenchmarkList(self, bmSuiteArgs):
        return sorted([bench for bench in self.daCapoIterations().keys() if self.workloadSize() in self.daCapoSizes().get(bench, [])])

    def existingSizes(self):
        return list(dict.fromkeys([s for bench, sizes in self.daCapoSizes().items() for s in sizes]))

    def workloadSize(self):
        raise NotImplementedError()

    def validateEnvironment(self):
        if not self.daCapoPath():
            raise RuntimeError(
                "Neither " + self.daCapoClasspathEnvVarName() + " variable nor " +
                self.daCapoLibraryName() + " library specified.")

    def validateReturnCode(self, retcode):
        return retcode == 0

    def postprocessRunArgs(self, benchname, runArgs):
        parser = argparse.ArgumentParser(add_help=False)
        parser.add_argument("-n", "--iterations", default=None)
        parser.add_argument("-sf", default=1, type=float, help="The total number of iterations is equivalent to the value selected by the '-n' flag scaled by this factor.")
        parser.add_argument("-s", "--size", default=None)
        args, remaining = parser.parse_known_args(runArgs)

        if args.size:
            if args.size not in self.existingSizes():
                mx.abort(f"Unknown workload size '{args.size}'. Existing benchmark sizes are: {','.join(self.existingSizes())}")

            if args.size != self.workloadSize():

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Set the DaCapo classpath environment variable for your suite version, e.g. export DACAPO_23_11_MR2_CHOPIN=/path/to/dacapo-23.11-MR2-chopin
  2. Alternatively ensure the DaCapo library is declared and downloadable in the mx suite (mx benchmark resolves it via daCapoLibraryName()) so daCapoPath() returns the library location.
  3. Verify with a quick check that the path/JAR actually exists before re-running the benchmark.

Example fix

# before
mx benchmark dacapo-chopin:fop   # env var unset, library absent

# after
export DACAPO_23_11_MR2_CHOPIN=/opt/benchmarks/dacapo-23.11-MR2-chopin
mx benchmark dacapo-chopin:fop
Defensive patterns

Strategy: validation

Validate before calling

import os
name = suite.daCapoClasspathEnvVarName()
if not os.environ.get(name) and suite.daCapoLibraryName() is None:
    raise SystemExit(f"Set {name} or provide the {suite.daCapoLibraryName()} library before running DaCapo.")

Prevention

When it happens

Trigger: Running a DaCapo benchmark (mx benchmark dacapo-chopin:...) without the DaCapo classpath env var set and without the DaCapo library present/resolved in the mx suite's library dependencies.

Common situations: Fresh machine without the DaCapo archive downloaded; CI jobs that do not export the env var; suite.py library entry for DaCapo not loaded because the wrong suite is on the classpath.

Related errors


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/df00dc140bdcc9e9. Report an issue: GitHub.