Error while compiling spec benchmark

Hello,

I have been trying to compile the SPEC benchmark but have failed even after several attempts.The first error I get while trying to run is :

Its a bit hard to say given the information you've provided, but I can
pass on what I know. The error you're getting is coming from the LLVM
system library when its trying to mmap the bytecode file to read it. The
file can't be read. Possible problems are: permissions, the file doesn't
exist (wasn't created), or a low level disk error.

Some of the SPEC benchmarks (INT2000,INT95, CFP95) have been compiled
with LLVM. The test results can be found here:
http://llvm.cs.uiuc.edu/testresults/X86/
about mid-way through the page under the "Programs/External" heading.

Some questions for you:

Are you using llvm-test to compile SPEC?
Did you read http://llvm.cs.uiuc.edu/docs/TestingGuide.html?
Which SPEC benchmark are you compiling?

Reid.

I have been trying to compile the SPEC benchmark but have failed even after several attempts.The first error I get while trying to run is :

There are two ways to do this:

1. Use the llvm-test harness
2. Use the official spec harness with -Wl,-native-cbe or -Wl,-native flags
    to llvm-gcc.

-Chris

--------------------------------------------------------------------

Error loading program '../00000002/gzip_base.x86_linux.bc': Can't open file: ../00000002/gzip_base.x86_linux.bc

-----------------------------------------------------------------------

Has anyone tried doing this ?Could you please tell me the changes required to compile it with llvm.

Thanks

TS

---------------------------------
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.

-Chris

I would try that …Thanks

Another thing that I want to do is to randomize functions within a program (or file ), whatever is easier to do in llvm .Also please tell me how can I randomize global variables ?

Thanks
TS

Can you explain a little bit more about what you mean by "randomize"
functions or global variables? What aspect of them do you want to
randomize? Their address? Their value? Something else?

Reid.

By randomization of functions I mean the manner in whch they are called , so that has to do with address.I wish to randomize the order of calls made to functions when a program is run.

How would you "randomize the order of calls made to functions when a
program is run" without changing the semantics of the program?

By randomization of functions I mean the manner in whch they are
called , so that has to do with address.I wish to randomize the order
of calls made to functions when a program is run.

How would you "randomize the order of calls made to functions when a
program is run" without changing the semantics of the program?

By using dummy functions ?

Aaron

Tanu,

You’ve seen ? :-

http://www.st.cs.uni-sb.de/~lindig/src/quest/

Don’t know whether it is applicable to what you are trying to achieve but I thought I should point it out in case it is useful to you and you have not seen it.

Aaron

Aaron,

http://www.st.cs.uni-sb.de/~lindig/src/quest/

I don't know about Tanu, but we can certainly use this in finding bugs
in LLVM! This has been listed as an "open project" for a long time [1],
but someone already implemented it, saving us the time and effort.
Thanks for the link!

[1] http://llvm.cs.uiuc.edu/OpenProjects.html#misc_new

* Random test vector generator: Use a C grammar to generate random C
  code; run it through llvm-gcc, then run a random set of passes on it
  using opt. Try to crash opt. When opt crashes, use bugpoint to reduce
  the test case and mail the result to yourself. Repeat ad infinitum.

http://www.st.cs.uni-sb.de/~lindig/src/quest/

I don't know about Tanu, but we can certainly use this in finding bugs
in LLVM! This has been listed as an "open project" for a long time [1],
but someone already implemented it, saving us the time and effort.
Thanks for the link!

[1] http://llvm.cs.uiuc.edu/OpenProjects.html#misc_new

* Random test vector generator: Use a C grammar to generate random C
code; run it through llvm-gcc, then run a random set of passes on it
using opt. Try to crash opt. When opt crashes, use bugpoint to reduce
the test case and mail the result to yourself. Repeat ad infinitum.

Sound like fun :slight_smile:

Don't thank me, John Regehr, regehr@cs.utah.edu, Assistant Professor, School of Computing, University of Utah, posted it to this maining list some time ago, subject: "random testing".

I just recyled it :slight_smile:

I was thinking of using Quest for getting the finer points of MS'es ABI tied down once the NASMW and MASM LLVM backends have been put together. It can compile dual test programs to check ABI and linking between two different compilers, real fun !:slight_smile:

6. Design a simple recognisable logo.

How about a "LLVM Inside" logo like the Intel one. Another project 'TAL' has used a smular looking logo :-

        http://www.cs.cornell.edu/talc/

Aaron

It's not original, and we don't want any logo/trademark lawsuits from
Intel.

6. Design a simple recognisable logo.

How about a "LLVM Inside" logo like the Intel one. Another project 'TAL'
has used a smular looking logo :-

       http://www.cs.cornell.edu/talc/

It's not original, and we don't want any logo/trademark lawsuits from
Intel.

No, I was not being totally serious, thought I would point out the idea.

Good logos are hard to design.

Aaron

Besides that, the little jingle that goes with "Intel Inside" just
doesn't work for LLVM .. 4 syllables instead of 2 :slight_smile:

Reid.

Hi all...

I understand that while LLVM provides no support for threading itself, it should be quite possible to run multiple JIT ExecutionEngines in separate OS threads.
My intention is to have several threads running in parallel, to utilise particular hardware effectively - so I wonder if it is possible to share memory directly between ExecutionEngines? Particularly I'm looking at doing signal processing that would pass large buffers on a regular basis, so copying isn't an option - anyone have any idea if this will work?

Thanks,
David Shipman

Ms Brukman,

Thanks for your reply.Just clarifying my question.I actually wanted to randomize the static layout of function code in the executable file.Sorry for writing in confusing manner.

T

Ms Brukman,

That's _Mr._ Brukman, but please skip the formality and call me Misha.
  

I actually wanted to randomize the static layout of function code in
the executable file.

Then what you want to do is to randomize the order of the Functions in
the Module's list of functions. The assembly writer will output
Functions in the order that it sees them to a .s file, which will appear
in the same order in the executable.

I suggest looking at include/llvm/Module.h which will help with
accessing the FunctionList.

Hello,

I have been trying to compile spec benchmark with llvm.I am trying the 2 methods suggested but have not succeeded yet .

  1. Setting the flags-Wl,-native-cbe or -Wl,-native flags to llvm-gcc.

This results in successful compilation with llvm BUT it doesn’t create .bc files (?)which I need for my experimentation.Any other significant modification/addition missing ??

2)Using llvm-test :

I get this error after a long time when it enters into Spec directory.

Tanu Sharma wrote:

Hello,

I have been trying to compile spec benchmark with llvm.I am trying the 2 methods suggested but have not succeeded yet .

1) Setting the flags -Wl,-native-cbe or -Wl,-native flags to llvm-gcc.

This results in successful compilation with llvm BUT it doesn't create *.bc* files (?)which I need for my experimentation.Any other significant modification/addition missing ??

2) Using llvm-test :

I get this error after a long time when it enters into Spec directory.

-----------------------------------------------------------------------------------------------

`/home/tsharma/llvm-cvs/llvm/projects/llvm-test/External/SPEC/CFP2000' > gmake[4]: Entering directory >

`/home/tsharma/llvm-cvs/llvm/projects/llvm-test/External/SPEC/CFP2000/177.mesa' > gmake[4]: *** No rule to make target `Output/accum.rbc', needed by > `Output/177.mesa.linked.rbc'. Stop. > gmake[4]: Leaving directory >

----------------------------------------------------------------------------------------------

I'm not sure why you got this error with SPEC. I'd suggest that you make sure that:

1. You configured the LLVM source and LLVM object tree directories correctly (i.e. the --with-llvmsrc and --with-llvmobj options to the llvm-test configure script).

2. You correctly configured the location of SPEC with the --enable-spec2000 option to the llvm-test configure script.

3. That you are running the tests in your object tree, not your source tree (if your source tree and object trees are different).

All of these directories are recorded in various Makefiles in llvm-test, so they should be pretty easily to find. I think all of them are in llvm-test/Makefile.config.

Also please tell me how to test only SPEC benchmark with llvm-test , else it takes a long time to enter SPEC.

Simply cd into External/SPEC inside your object tree and type make.

Am I missing something somewhere?I tried a lot but still failure !! Please help me find my way out.

Personally, I would use the llvm-test harness as it's the easiest to use to use if all you want is timing information and LLVM statistics. However, you have to make sure everything is configured correctly; otherwise, it just won't work.

I would check the three things I listed above (as it looks like a configuration error). If that doesn't work, please email the list again and we'll take a closer look.

-- John T.