How can I run unixbenchmark on board?

I want to test my kernel performance on Hifive Unleashed U540. Some errors occurred during compilation.

root@freedom-u540:~/byte-unixbench-master/UnixBench# ./Run
gcc -o pgms/arithoh -Wall -pedantic -O3 -ffast-math -march=native -mtune=native -I ./src -DTIME -Darithoh src/arith.c
gcc: error: ‘-march=native’: ISA string must begin with rv32 or rv64
make: *** [Makefile:233: pgms/arithoh] Error 1

I think I should modify some parameters like -march -mtune .
I found a post about there arguments RISC-V Options (Using the GNU Compiler Collection (GCC))

But how can I determine which values I should use for -march and -mtune ?

We haven’t implemented “-mcpu=native” yet. For the unleashed board, you can use “-mcpu=sifive-u54”, and the -mcpu option will set arch and tune. However, since the fu540 is a rocket chip based core, and rocket chip is the default cpu, that won’t actually change anything.

Thank you for your response

hi, I set -mcpu=sifive-u54 on my board, then I run unixbench, but I found the overhead of 4 parallel copies of tests is bigger than 1 parallel test.

For Execl Throughput test: 1 parallel test’s overhead is about 70% but 4 parallels tests’s overhead is about 90%. (normally the 4 parallel tests’s overhead should be smaller than 1 parallel test)

I don’t konw why ? Could this be caused by hardware?

I don’t know anything about the execl throughput test, and don’t know what you mean by overhead, and don’t know why you expect the 4 parallel test overhead to be less than the 1 parallel test overhead.

i follow this site .

the result is

Version 5.1.3 Based on the Byte Magazine Unix Benchmark

Multi-CPU version Version 5 revisions by Ian Smith,
Sunnyvale, CA, USA
January 13, 2011 johantheghost at yahoo period com

Wide character in print at ./Run line 1511.
Wide character in printf at ./Run line 1542.

1 x Dhrystone 2 using register variables 1

1 x Double-Precision Whetstone 1

1 x Execl Throughput 1

1 x File Copy 1024 bufsize 2000 maxblocks 1

1 x File Copy 256 bufsize 500 maxblocks 1

1 x File Copy 4096 bufsize 8000 maxblocks 1

1 x Pipe Throughput 1

1 x Pipe-based Context Switching 1

1 x Process Creation 1

1 x System Call Overhead 1

1 x Shell Scripts (1 concurrent) 1

1 x Shell Scripts (8 concurrent) 1
Wide character in printf at ./Run line 1484.

========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)

System: ubuntu: GNU/Linux
OS: GNU/Linux – 5.11.0-1012-generic – #12-Ubuntu SMP Thu Jun 17 01:52:26 UTC 2021
Machine: riscv64 (riscv64)
Language: en_US.utf8 (charmap=“UTF-8”, collate=“UTF-8”)
04:51:01 up 14 min, 2 users, load average: 0.32, 0.43, 0.52; runlevel 5


Benchmark Run: 木 7月 01 2021 04:51:01 - 04:57:44
0 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables 4241304.7 lps (10.0 s, 1 samples)
Double-Precision Whetstone 883.2 MWIPS (10.0 s, 1 samples)
Execl Throughput 745.0 lps (29.0 s, 1 samples)
File Copy 1024 bufsize 2000 maxblocks 61028.0 KBps (30.0 s, 1 samples)
File Copy 256 bufsize 500 maxblocks 24196.0 KBps (30.0 s, 1 samples)
File Copy 4096 bufsize 8000 maxblocks 97334.0 KBps (30.0 s, 1 samples)
Pipe Throughput 176297.2 lps (10.0 s, 1 samples)
Pipe-based Context Switching 16369.1 lps (10.0 s, 1 samples)
Process Creation 1373.7 lps (30.0 s, 1 samples)
Shell Scripts (1 concurrent) 1723.7 lpm (60.0 s, 1 samples)
Shell Scripts (8 concurrent) 507.3 lpm (60.1 s, 1 samples)
System Call Overhead 437087.9 lps (10.0 s, 1 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 4241304.7 363.4
Double-Precision Whetstone 55.0 883.2 160.6
Execl Throughput 43.0 745.0 173.3
File Copy 1024 bufsize 2000 maxblocks 3960.0 61028.0 154.1
File Copy 256 bufsize 500 maxblocks 1655.0 24196.0 146.2
File Copy 4096 bufsize 8000 maxblocks 5800.0 97334.0 167.8
Pipe Throughput 12440.0 176297.2 141.7
Pipe-based Context Switching 4000.0 16369.1 40.9
Process Creation 126.0 1373.7 109.0
Shell Scripts (1 concurrent) 42.4 1723.7 406.5
Shell Scripts (8 concurrent) 6.0 507.3 845.4
System Call Overhead 15000.0 437087.9 291.4
========
System Benchmarks Index Score 191.4

thank you for your reply.