set label "Worker Count" 0.0,0.0

set label "Worker Count" 0.0,0.0

imagem de newport_j

I am trying to learn how to use the option cilkview from the Cilks Arts implementation of Cilk++.
I compiled qsort in the examples directory using the included Makefile. No problems.

WhenI ran using:

cilkview -trials all 2 -verbose ./qsort

The system ran also the way and gave an output very similar to that on page 11 of the Cilk Arts manual.

It showed everything except the plot!

It stopped rightbefore the plot. It stopped after

32 processors: 2.09 - 3.09

The output said:

set xlablel "Worker Count" 0.0,0.0
^

"qsort-results.plt", line 6';' expected.

I did not create the qsort-results.plt file myself. It was created when I ran thecilkview program.

Okay a ';' was expected on line 6 of the

qsort-results.plt.

How didI leave it out and how do I get it back in when i rerun the

cilkview -trials all 2 -verbose ./qsort

command again? This is discussed on the Cilk Arts programming manualCilk++ version 1.1.0

on page 9, 10 and 11.

Cilk++ version version 1.1.0

Any help appreciated . Thanks in advance.

Newport_j

7 posts / 0 new
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de newport_j

Please note in the immediate above posting. I do have GNUPLOT installed.

Newport_j

imagem de Georg Zitzlsberger (Intel)

Hello,

have you used the Intel Cilk Plus SDK package from here?
http://software.intel.com/en-us/articles/download-intel-cilk-plus-software-development-kit/
(Two different versions for 12.0 & 12.1)

The following is working for me. This is my system configuration and what I did:

  • Ubuntu 10.04 (64 bit)
  • GNUPLOT version 4.2 patchlevel 6
  • C/C++ compiler 12.1 Update 8
  • cilkutil-linux-build_002061-v12.1.tgz

You need a small modification to .../Samples/en_US/C++/cilk_samples/qsort.cpp:

...

#include 

...

// A simple test harness-
int qmain(int n)
{
    cilkview_data_t start;
    int* a = new int[n];

    for (int i = 0; i < n; ++i)
        a[i] = i;

    std::random_shuffle(a, a + n);
    std::cout << "Sorting " << n << " integers" << std::endl;

    __cilkview_query(start);
    unsigned long long start_ticks = cilk_getticks();
    sample_qsort(a, a + n);
    unsigned long long end_ticks = cilk_getticks();
    __cilkview_report(&start, NULL, "my_tag", CV_REPORT_WRITE_TO_RESULTS);

    // Confirm that a is sorted and that each element contains the index.
    for (int i = 0; i < n - 1; ++i) {
        if (a[i] >= a[i + 1] || a[i] != i) {
            std::cout << "Sort failed at location i=" << i << " a[i] = "
                      << a[i] << " a[i+1] = " << a[i + 1] << std::endl;
            delete[] a;
            return 1;
        }
    }

    unsigned long long ticks = end_ticks - start_ticks;
    std::cout << "Sort succeeded in " << cilk_ticks_to_seconds(ticks)*1000 << " milliseconds." << std::endl;
    delete[] a;
    return 0;
}

...

Including cilkview.h & calls to __cilkview_query(...)/__cilkview_report(...) were added.
If you don't add the calls you won't get a plotfile! Everything enclosed between the two calls will be measured.
The cilkview.h header is part of the SDK.

$ cilkview -trials all -verbose ./qsort
cilkview: CILK_NWORKERS=4 ./qsort
Sorting 10000000 integers
Sort succeeded in 368.407 milliseconds.
cilkview: CILK_NWORKERS=3 ./qsort
Sorting 10000000 integers
Sort succeeded in 467.951 milliseconds.
cilkview: CILK_NWORKERS=2 ./qsort
Sorting 10000000 integers
Sort succeeded in 660.198 milliseconds.
cilkview: CILK_NWORKERS=1 ./qsort
Sorting 10000000 integers
Sort succeeded in 1285.29 milliseconds.
cilkview: CILK_NWORKERS=16 .../cilkutil/bin/../lib64/pinbin -ifeellucky -t .../cilkutil/bin/../lib64/cilkview-tool.so -- ./qsort
Cilkview Scalability Analyzer V2.0.0, Build 2061
Sorting 10000000 integers
Sort succeeded in 5296.24 milliseconds.

Whole Program Statistics
1) Parallelism Profile
Work : 5,486,160,283 instructions
Span : 1,027,058,708 instructions
Burdened span : 1,028,473,708 instructions
Parallelism : 5.34
Burdened parallelism : 5.33
Number of spawns/syncs: 10,000,000
Average instructions / strand : 182
Strands along span : 115
Average instructions / strand on span : 8,930,945
Total number of atomic instructions : 10,000,003
Frame count : 30,000,000
2) Speedup Estimate
2 processors: 1.52 - 2.00
4 processors: 2.04 - 4.00
8 processors: 2.48 - 5.34
16 processors: 2.77 - 5.34
32 processors: 2.94 - 5.34

Finally you'll see a plot like this:

Does this help?

Best regards,

Georg Zitzlsberger

imagem de newport_j

I am still getting ther error. I habe attached all relevant files.

What is

set xlabel "Worker Count" 0.0,0.0
^
"qsort-results.plt" line 6 ';' expected

Thi output is shown in screenshot

I believe it is a gnuplot error. It is happending in all of my cilkview runs regardless of which files are used:
matrix, qsort, cilk-for, etc.

I use cv.start
cv.stop
cv.dump

instead of your expressions. I am using Cilk Arts Cilk++, not Intel Cilk++, so my code is slightly different.

Any help appreciated. Thanks in advance.

Newport_j

imagem de Jim Sukha (Intel)

Hi,

I observed a similar error on your .plot file, for gnuplot version 4.4.
(For me, gnuplot --version returns "gnuplot 4.4 patchlevel 0").
Perhaps there is some incompatilibity between gnuplot versions?

I was able to get the script to work by removing the "0.0, 0.0".

set xlabel "Worker Count"
set ylabel "Speedup"

You may also need to uncomment the first two lines of your .plt to save your output to file.
Cheers,

Jim

imagem de newport_j

Yes, thta did it. It works now. I wonder if upgrading gnuplot would help? It seems that would also work.

Newport_j

imagem de Georg Zitzlsberger (Intel)

Hello,

unfortunately upgrading does not help since GNUPLOT 4.4 changed (extended?) the "set [x|y]label" command to require offsets explicitly via the keyword "offset", e.g.:

set xlabel "Test" offset 0.0,0.0

So, possible solutions are:

  • Remove 0.0,0.0 (as Jim proposed) [manually]
  • Add keyword "offset" before 0.0,0.0 [manually]
  • Or downgrade to GNUPLOT 4.2

Best regards,

Georg Zitzlsberger

Faça login para deixar um comentário.