Search code examples
linuxcompilationchecksum

How do I disable SPEC CPU checksum?


I am building on one machine and running it on the other.

Build:

runcpu --action build --config xxx

Run:

runcpu --action run --config xxx --nobuild

All cases reported checksum mismatched. How do I resolve this.


Solution

  • Explanation

    For SPEC CPU 2017, check out the config file options for runcpu. It lists two options that may be of interest that you can put in a header section: strict_rundir_verify and verify_binaries. I pasted their descriptions below.

    strict_rundir_verify=[yes|no]:

    When set, the tools will verify that the file contents in existing run directories match the expected checksums. Normally, this should always be on, and reportable runs will force it to be on. Turning it off might make the setup phase go a little faster while you are tuning the benchmarks.

    Developer notes: setting strict_rundir_verify=no might be useful when prototyping a change to a workload or testing the effect of differing workloads. Note, though, that once you start changing your installed tree for such purposes it is easy to get lost; you might as well keep a pristine tree without modifications, and use a second tree that you convert_to_development.

    verify_binaries=[yes|no]:

    runcpu uses checksums to verify that executables match the config file that invokes them, and if they do not, runcpu forces a recompile. You can turn that feature off by setting verify_binaries=no.

    Warning: It is strongly recommended that you keep this option at its default, yes (that is, enabled). If you disable this feature, you effectively say that you are willing to run a benchmark even if you don't know what you did or how you did it -- that is, you lack information as to how it was built!

    The feature can be turned off because it may be useful to do so sometimes when debugging (for an example, see env_vars), but it should not be routinely disabled.

    Since SPEC requires that you disclose how you build benchmarks, reportable runs (using the command-line switch --reportable or config file setting reportable=yes) will cause verify_binaries to be automatically enabled. For CPU 2017, this field replaces the field check_md5.

    For SPEC CPU 2006, these two options also exist, but note that verify_binaries used to be called check_md5.


    Example

    Example. I recently built the SPEC CPU 2017 binaries, patched them (in their respective exe directories), and then performed a (non-reportable) run. To do this, I put the following in the "global options" header section of my configuration file:

    #--------- Global Settings ----------------------------------------------------
    ...
    reportable           = 0
    verify_binaries      = 0
    ...
    

    before building, patching, and running (with the --nobuild flag) the suite.