1

I use SPEC as a tool to measure java files running time. I'm using SPEC2008 which can be downloaded here.

I installed spec2008 (java -jar SPECjvm2008_1_01_setup.jar) and ran it (java -jar SPECjvm2008.jar as written in the README file). I got a results file and a report that everything completed successfully.

Now i need to examine how some changes affect SPEC's running time.

I made the changes in some of SPEC'S files (the java files inside the following folders: compiler,compress,crypto,derby).

Now i can't run it again using java -jar SPECjvm2008.jar because the changes i made include jomp commands (\\omp parallel for and such). [JOMP is OpenMP for JAVA]

To compile files with such commands i used to do the following:

First, download JOMP. Then:

  1. change .java extension to .jomp . Then type:

    java jomp.compiler.Jomp MyFile
    

(now i got a .java file)

  1. compile to .class:

    javac -classpath YourJompDownloadPath\jomp1.0b.jar; MyFile.java
    
  2. java -Djomp.threads=n MyPackage.MyFile

So i can't do this now because:

  1. There are too many files and it would take time changing all extensions to .jomp
  2. There are too many files and i need to run all of them as a whole (just as SPEC does), but in JOMP commands i only know how to run each file independently.

If there's a workaround for #2 then i'll do #1 manually. So i'm especially looking for a solution/workaround for #2.

edit:

OK so i made a .BAT file only for step 1 (see method here) because it seems that SPEC has only .java files so i'll provide it with .java files only. For the 2nd step i think i need to just run SPEC (java -jar SPECjvm2008.jar). For the 3rd step, i think instead of normally running SPEC, i need to run it with the parameters in step 3 (Djomp.threads). That is:

java -Djomp.threads=n -jar SPECjvm2008.jar

Now there's a new problem. I get the warning:

Recompile with -Xlint:unchecked for details

Which was addressed here. But in that link it's run with javac and not java. javac doesn't recognize the parameter Djomp.threads (and java doesn't recognize Xlint). So i think i'm looking for a way to run a .jar file while using Djomp.threads and Xlint.

Note: running the .jar file SPECjvm2008.jar eventually runs the java files i need. That's why i said "i'm looking for a way to run a .jar file..."

Community
  • 1
  • 1
Alaa M.
  • 4,961
  • 10
  • 54
  • 95
  • This sounds like you are just looking for some `.BAT` files that automate the 3 steps that you mentioned for a given list of `.java` files, is this correct? – Marco13 Sep 18 '14 at 14:11
  • 1
    The "edit" is a bit confusing: With `javac`, you *compile* the `.java` files (to create a `.class` file). With `java` you *run* a `.class` file. Only `javac` allows the `Xlint` parameter. But in doubt, you may ignore the warning, because you most likely will not change the `.java` files anyhow. – Marco13 Sep 18 '14 at 20:44
  • Yes you're right. I ignored it, it's nothing serious. It's explained here: http://stackoverflow.com/questions/197986/what-causes-javac-to-issue-the-uses-unchecked-or-unsafe-operations-warning – Alaa M. Sep 19 '14 at 20:51
  • It's not entirely clear whether the problem is solved now. (But I +1'ed the question, for the research and information that you provided in the question until now) – Marco13 Sep 20 '14 at 19:57
  • It's solved. Where i say "there's a new problem...", it actually isn't a real problem - the comments explain this. – Alaa M. Sep 20 '14 at 23:56

0 Answers0