Skip to content

Commit

Permalink
pack/unixbench.patch: fix Illegal instruction
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
Liu Yiding authored and rli9 committed Jul 17, 2019
1 parent fb40123 commit fb24db1
Showing 1 changed file with 32 additions and 18 deletions.
50 changes: 32 additions & 18 deletions pack/unixbench.patch
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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();
Expand Down

0 comments on commit fb24db1

Please sign in to comment.