{"id":123,"date":"2025-03-25T08:47:27","date_gmt":"2025-03-25T08:47:27","guid":{"rendered":"https:\/\/haco.club\/?p=123"},"modified":"2025-03-25T08:47:27","modified_gmt":"2025-03-25T08:47:27","slug":"how-to-run-spec-cpu2017-and-disable-checksum","status":"publish","type":"post","link":"https:\/\/haco.club\/?p=123","title":{"rendered":"How  to run SPEC CPU2017 and disable  checksum"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\"><strong>1. Environment Preparation<\/strong><\/h3>\n\n\n\n<p>\u200b<strong>Install Dependencies<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>For Ubuntu\/Debian (ARM cross-compilation example):<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gfortran-aarch64-linux-gnu<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure\u00a0<code>ulimit<\/code>\u00a0is set to unlimited:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ulimit -s unlimited<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Install SPEC CPU2017<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u200b<strong>Mount the ISO File<\/strong>:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>mount -o loop cpu2017-1.1.5.iso \/mnt  # Mount ISO to \/mnt\nmkdir \/home\/speccpu\ncp \/mnt\/* -r \/home\/speccpu  # Copy files to installation directory\nchmod -R 755 \/home\/speccpu  # Set permissions<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Run Installation Script<\/strong>:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\/speccpu\n.\/install.sh  # Follow prompts and confirm with \"yes\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Configure the Test Environment<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u200b<strong>Modify the Configuration File<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Copy the default config (e.g.,\u00a0<code>Example-gcc-linux-aarch64.cfg<\/code>) and adjust:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/home\/speccpu\/config\/Example-gcc-linux-aarch64.cfg<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Key parameters to update:\n<ul class=\"wp-block-list\">\n<li><code>copies<\/code>&nbsp;and&nbsp;<code>threads<\/code>: Set to match your CPU core count (e.g., 48 cores \u2192 48 copies\/threads)&nbsp;<\/li>\n\n\n\n<li>Compiler paths: Ensure\u00a0<code>gcc_dir<\/code>\u00a0points to the correct GCC installation (e.g.,\u00a0<code>\/usr\/bin\/gcc<\/code>)\u00a0<\/li>\n\n\n\n<li>Optimization flags (e.g.,\u00a0<code>-Ofast -march=armv8-a<\/code>) for performance tuning<\/li>\n\n\n\n<li>Cross-compilation setup (for ARM):<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>SPECLANG = \/usr\/bin\/aarch64-linux-gnu-  # Cross-compiler prefix<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u200b<strong>Load Environment Variables<\/strong>:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>source \/home\/speccpu\/shrc  # Activate SPEC environment<\/code><\/pre>\n\n\n\n<p><strong>4. Run Benchmark Tests<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u200b<strong>Basic Commands<\/strong>:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\/speccpu\/bin\n# Run individual tests:\n.\/runcpu -c ..\/config\/Example-gcc-linux-aarch64.cfg intrate   # Integer rate\n.\/runcpu -c ..\/config\/Example-gcc-linux-aarch64.cfg fpspeed   # Floating-point speed<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u200b<strong>Run All Tests<\/strong>:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/runcpu -c ..\/config\/Example-gcc-linux-aarch64.cfg intrate intspeed fprate fpspeed<\/code><\/pre>\n\n\n\n<p>Expected runtime: ~25 hours for all tests on a 48-core system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Analyze Results<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u200b<strong>Output Location<\/strong>:<br>Results are stored in\u00a0<code>\/home\/speccpu\/result\/<\/code>\u00a0as\u00a0<code>.txt<\/code>\u00a0files (e.g.,\u00a0<code>CPU2017.003.intrate.refrate.txt<\/code>).<\/li>\n\n\n\n<li>\u200b<strong>Key Metrics<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\u200b<strong>Rate tests<\/strong>: Measure throughput (multiple copies). Higher values indicate better performance.<\/li>\n\n\n\n<li>\u200b<strong>Speed tests<\/strong>: Measure single-threaded performance.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Performance Tuning Tips<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u200b<strong>BIOS Settings<\/strong>: Enable\u00a0<code>NUMA<\/code>, set\u00a0<code>Power Policy<\/code>\u00a0to\u00a0<code>Performance<\/code>, and disable\u00a0<code>Transparent Huge Pages<\/code>.<\/li>\n\n\n\n<li>\u200b<strong>OS Configuration<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Use large pages for 4K page systems:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>echo 100000 > \/proc\/sys\/vm\/nr_hugepages\nexport HUGETLB_MORECORE=yes<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Troubleshooting<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u200b<strong>Permission Issues<\/strong>: Use\u00a0<code>sudo<\/code>\u00a0for restricted operations.<\/li>\n\n\n\n<li>\u200b<strong>Compilation Errors<\/strong>: Verify compiler paths in the config file.<\/li>\n<\/ul>\n\n\n\n<p>For detailed configuration examples or cross-compilation setups, refer to the official SPEC documentation or community guides.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<p><strong>Run specific benchmark of cpu2017<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\/speccpu\/bin\n\n# Run only 600.perlbench_s (intspeed suite):\n.\/runcpu --config=myconfig.cfg \\\n  --noreportable \\          # Skip reportable run requirements (faster)\n  --iterations=1            # Run once (default is 3 for reportable runs) \\\n  --action=run 600.perlbench_s<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/73677202\/how-do-i-disable-spec-cpu-checksum\">How do I disable SPEC CPU checksum?<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Explanation<\/h2>\n\n\n\n<p>For SPEC CPU 2017, check out the&nbsp;<a href=\"https:\/\/www.spec.org\/cpu2017\/Docs\/config.html\">config file options for&nbsp;<code>runcpu<\/code><\/a>. It lists two options that may be of interest that you can put in a&nbsp;<a href=\"https:\/\/www.spec.org\/cpu2017\/Docs\/config.html#headerSection\">header section<\/a>:&nbsp;<code>strict_rundir_verify<\/code>&nbsp;and&nbsp;<code>verify_binaries<\/code>. I pasted their descriptions below.<\/p>\n\n\n\n<p><code>strict_rundir_verify=[yes|no]:<\/code><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>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.<\/p>\n\n\n\n<p>Developer notes: setting&nbsp;<code>strict_rundir_verify=no<\/code>&nbsp;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&nbsp;<a href=\"https:\/\/www.spec.org\/cpu2017\/Docs\/utility.html#convert_to_development\">convert_to_development<\/a>.<\/p>\n<\/blockquote>\n\n\n\n<p><code>verify_binaries=[yes|no]:<\/code><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><code>runcpu<\/code>&nbsp;uses checksums to verify that executables match the config file that invokes them, and if they do not,&nbsp;<code>runcpu<\/code>&nbsp;forces a recompile. You can turn that feature off by setting&nbsp;<code>verify_binaries=no<\/code>.<\/p>\n\n\n\n<p>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&#8217;t know what you did or how you did it &#8212; that is, you lack information as to how it was built!<\/p>\n\n\n\n<p>The feature can be turned off because it may be useful to do so sometimes when debugging (for an example, see&nbsp;<a href=\"https:\/\/www.spec.org\/cpu2017\/Docs\/config.html#env_vars\">env_vars<\/a>), but it should not be routinely disabled.<\/p>\n\n\n\n<p>Since SPEC requires that you disclose how you build benchmarks, reportable runs (using the command-line switch&nbsp;<code>--reportable<\/code>&nbsp;or config file setting&nbsp;<code>reportable=yes<\/code>) will cause&nbsp;<code>verify_binaries<\/code>&nbsp;to be automatically enabled. For CPU 2017, this field replaces the field check_md5.<\/p>\n<\/blockquote>\n\n\n\n<p>For SPEC CPU 2006, these two options also exist, but note that\u00a0<code>verify_binaries<\/code>\u00a0used to be called\u00a0<code>check_md5<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example<\/h2>\n\n\n\n<p><strong>Example<\/strong>. I recently built the SPEC CPU 2017 binaries, patched them (in their respective&nbsp;<code>exe<\/code>&nbsp;directories), and then performed a (non-reportable) run. To do this, I put the following in the &#8220;global options&#8221; header section of my configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#--------- Global Settings ----------------------------------------------------\n...\nreportable           = 0\nverify_binaries      = 0\n...<\/code><\/pre>\n\n\n\n<p>before building, patching, and running (with the\u00a0<code>--nobuild<\/code>\u00a0flag) the suite.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Environment Preparation \u200bInstall Dependencies: 2. Install SPEC CPU2017 3. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[18],"class_list":["post-123","post","type-post","status-publish","format-standard","hentry","category-tutotial","tag-spec-cpu-2017"],"_links":{"self":[{"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/posts\/123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haco.club\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=123"}],"version-history":[{"count":1,"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/posts\/123\/revisions"}],"predecessor-version":[{"id":124,"href":"https:\/\/haco.club\/index.php?rest_route=\/wp\/v2\/posts\/123\/revisions\/124"}],"wp:attachment":[{"href":"https:\/\/haco.club\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haco.club\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haco.club\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}