From fb24db111e9e2e1c4addf85370f47ebbc73e6e67 Mon Sep 17 00:00:00 2001 From: Liu Yiding Date: Wed, 17 Jul 2019 12:52:24 +0800 Subject: [PATCH] pack/unixbench.patch: fix Illegal instruction fix the following issue ------ Run: "Double-Precision Whetstone": Illegal instruction; aborting ------ the root cause is benchmark unixbench has updated, patch unixbench.patch doesn't work. ------ liuyd@inn:~/byte-unixbench$ patch -p1 < unixbench.patch patching file UnixBench/Makefile Hunk #1 FAILED at 86. 1 out of 1 hunk FAILED -- saving rejects to file UnixBench/Makefile.rej ------ adjust unixbench.pacth and repack, unixbench runs well. ------ liuyd@inn:/result/unixbench/performance-30%-300s-whetstone-double-ucode=0x7000017/lkp-bdw-de1/debian-x86_64-2019-05-14.cgz/x86_64-rhel-7.6/gcc-7/v5.2/22$ cat unixbench.json { "unixbench.score": [ 3310.6 ], "unixbench.workload": [ 8484974.6 ] } ------ Signed-off-by: Liu Yiding Signed-off-by: Philip Li --- pack/unixbench.patch | 50 ++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/pack/unixbench.patch b/pack/unixbench.patch index 258222f5c..501cbedb0 100644 --- a/pack/unixbench.patch +++ b/pack/unixbench.patch @@ -1,25 +1,39 @@ diff --git a/UnixBench/Makefile b/UnixBench/Makefile -index 880743a..e1243a4 100644 +index 4b1d5f8..5c4e36e 100644 --- a/UnixBench/Makefile +++ b/UnixBench/Makefile -@@ -86,9 +86,9 @@ OPTON = -O3 -ffast-math - ## OS detection. Comment out if gmake syntax not supported by other 'make'. - OSNAME:=$(shell uname -s) +@@ -90,16 +90,16 @@ else + ## OS detection. Comment out if gmake syntax not supported by other 'make'. + OSNAME:=$(shell uname -s) + ARCH := $(shell uname -p) +- ifeq ($(OSNAME),Linux) +- # Not all CPU architectures support "-march" or "-march=native". +- # - Supported : x86, x86_64, ARM, AARCH64, etc.. +- # - Not Supported: RISC-V, IBM Power, etc... +- ifneq ($(ARCH),$(filter $(ARCH),ppc64 ppc64le)) +- OPTON += -march=native -mtune=native +- else +- OPTON += -mcpu=native -mtune=native +- endif +- endif ++# ifeq ($(OSNAME),Linux) ++# # Not all CPU architectures support "-march" or "-march=native". ++# # - Supported : x86, x86_64, ARM, AARCH64, etc.. ++# # - Not Supported: RISC-V, IBM Power, etc... ++# ifneq ($(ARCH),$(filter $(ARCH),ppc64 ppc64le)) ++# OPTON += -march=native -mtune=native ++# else ++# OPTON += -mcpu=native -mtune=native ++# endif ++# endif --ifeq ($(OSNAME),Linux) --OPTON += -march=native -mtune=native --endif -+# ifeq ($(OSNAME),Linux) -+# OPTON += -march=native -mtune=native -+# endif - ifeq ($(OSNAME),Darwin) - # (adjust flags or comment out this section for older versions of XCode or OS X) - # (-mmacosx-versin-min= requires at least that version of SDK be installed) + ifeq ($(OSNAME),Darwin) + # (adjust flags or comment out this section for older versions of XCode or OS X) diff --git a/UnixBench/Run b/UnixBench/Run -index a16a5c9..4af969b 100755 +index b4abd26..1d32b94 100755 --- a/UnixBench/Run +++ b/UnixBench/Run -@@ -809,7 +809,7 @@ sub getSystemInfo { +@@ -839,7 +839,7 @@ sub getSystemInfo { } # Get graphics hardware info. @@ -28,9 +42,9 @@ index a16a5c9..4af969b 100755 # Get system run state, load and usage info. $info->{'runlevel'} = getCmdOutput("who -r | awk '{print \$3}'"); -@@ -1823,7 +1823,7 @@ sub main { - $tests = $index; - } +@@ -1900,7 +1900,7 @@ sub main { + my @creatingDirectories = ( ${TMPDIR}, ${RESULTDIR} ); + createDirrectoriesIfNotExists(@creatingDirectories); - preChecks(); + #preChecks();