No effect from setting "ITERATIONS"

291 views
Skip to first unread message

Jakob Engblom

unread,
Jun 4, 2009, 6:38:11 AM6/4/09
to CoreMark
According to the documentation for coremark, you should be able to set
the C define "ITERATIONS" to some number to control the number of
iterations to run, and the following command-line invocation of gcc is
given as an example:

gcc -O2 -o coremark.exe core_list_join.c core_main.c core_matrix.c
core_state.c core_util.c simple/core_portme.c -DPERFORMANCE_RUN=1 -
DITERATIONS=1000

However, as far as I can tell, doing this has no effect on the
resulting program. I built my own makefile for coremark in order to
fit it into an existing build structure for a cross-ppc target. And
used the above -DITERATIONS to see if it would affect the execution.

It did not, as can be seen from the below example run:

----
~ # ./
coremark.ppc.elf
2K performance run parameters for
coremark.
CoreMark Size :
666
Total ticks :
12818
Total time (secs):
12.818000
Iterations/Sec :
3120.611640
Iterations :
40000
Compiler version :
GCC4.1.2
Compiler flags : -
o2
Memory location : Run in
RAM
seedcrc :
0xe9f5
[0]crclist :
0xe714
[0]crcmatrix :
0x1fd7
[0]crcstate :
0x8e3a
[0]crcfinal :
0x25b5
Correct operation validated. See readme.txt for run and reporting
rules.
CoreMark 1.0 : 3120.611640 / GCC4.1.2 -o2 /
Heap
----

By testing various other speed settings for the target system CPU, it
was clear that the iteration count was being dynamically computed
(elegant, by the way, very elegant). However, if I want to run this
on a detailed CPU simulator, it would be nice to be able to clamp the
iteration count some...

Here is the compilation log, showing that -DITERATIONS is indeed given
to the target program compilation:

----
powerpc-linux-gnu-gcc -c core_matrix.c -o core_matrix.o -g -O2 -Wall -
Werror -DP
ERFORMANCE_RUN=1 -DITERATIONS=400 -DFLAGS_STR="-o2"
powerpc-linux-gnu-gcc -c core_main.c -o core_main.o -g -O2 -Wall -
Werror -DPERFO
RMANCE_RUN=1 -DITERATIONS=400 -DFLAGS_STR="-o2"
powerpc-linux-gnu-gcc -c core_list_join.c -o core_list_join.o -g -O2 -
Wall -Werr
or -DPERFORMANCE_RUN=1 -DITERATIONS=400 -DFLAGS_STR="-o2"
powerpc-linux-gnu-gcc -c core_state.c -o core_state.o -g -O2 -Wall -
Werror -DPER
FORMANCE_RUN=1 -DITERATIONS=400 -DFLAGS_STR="-o2"
powerpc-linux-gnu-gcc -c core_portme.c -o core_portme.o -g -O2 -Wall -
Werror -DP
ERFORMANCE_RUN=1 -DITERATIONS=400 -DFLAGS_STR="-o2"
powerpc-linux-gnu-gcc -o coremark.ppc.elf -lpthread -lrt -g -O2 -Wall -
Werror -D
PERFORMANCE_RUN=1 -DITERATIONS=400 -DFLAGS_STR="-o2" core_matrix.o
core_main.o
core_list_join.o core_state.o core_util.c core_portme.o
----

Thanks for an interesting program!

Jakob Engblom
Technical Marketing Manager
Virtutech, Sweden
Message has been deleted

Shay (Ella's Father)

unread,
Jun 4, 2009, 12:48:17 PM6/4/09
to CoreMark
If you do not want to supply arguments from the command line, you
might want to consider using -DSEED_METHOD=SEED_VOLATILE.

Does that help?
Check the documentation for more details on SEEDs.

Thanks,
- Shay


> Hello Jakob,
>
> How do you run?
> Since you are allowing command line parameters, those will affect your
> run. One of those parameters is in fact the number of iterations to
> run...
> Are you using your own makefiles instead of the default?
>
> Thanks,
> - Shay

Jakob Engblom

unread,
Jun 5, 2009, 10:12:19 AM6/5/09
to CoreMark
> > How do you run?
> > Since you are allowing command line parameters, those will affect your

I had no idea that I was doing that :)

> > run. One of those parameters is in fact the number of iterations to
> > run...
> > Are you using your own makefiles instead of the default?

Using my own makefile, since the default seemed hard to convince to
use a cross-compiler.

How do you allow/disallow command-line settings? I just tried to
follow your simple instructions step-by-step, maybe it is just a
matter of documenting how you allow/disallow command-line parameters.

I really did try to follow the documentation and the code, sorry for
asking stupid questions like this.

/jakob
Reply all
Reply to author
Forward
0 new messages