Note that there are some explanatory texts on larger screens.

plurals
  1. POCilk++ cilkexample.c = 200 lines in stderr
    primarykey
    data
    text
    <p>I installed Cilk successfully on my home computer, a 32-bit machine running Ubuntu. I replicated the process to the best of my knowledge on my 64-bit Ubuntu netbook, excepting, of course, that I downloaded the 64-bit version instead of the 32-bit version. When attempting to run the very simple cilkexample.c copied below, however, I get very very many errors, all seeming related to it not having access to library files:</p> <pre><code>In file included from /usr/include/stdio.h:28, from cilkexample.c:1: /usr/include/features.h:323:26: error: bits/predefs.h: No such file or director\ y /usr/include/features.h:356:25: error: sys/cdefs.h: No such file or directory /usr/include/features.h:388:23: error: gnu/stubs.h: No such file or directory In file included from cilkexample.c:1: /usr/include/stdio.h:36:25: error: bits/types.h: No such file or directory /usr/include/stdio.h:161:28: error: bits/stdio_lim.h: No such file or directory /usr/include/stdio.h:846:30: error: bits/sys_errlist.h: No such file or directo\ ry In file included from /usr/include/stdio.h:34, from cilkexample.c:1: /usr/local/cilk/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.4/include/stddef.h:\ 214: error: expected constructor, destructor, or type conversion before ‘typede\ f’ In file included from cilkexample.c:1: /usr/include/stdio.h:49: error: expected constructor, destructor, or type conve\ rsion before ‘typedef’ </code></pre> <p>et cetera, et cetera, et cetera.</p> <p>Here is the file I attempted to compile with the command <code>cilk++ -o cilkexample cilkexample.c</code>:</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;cilk.h&gt; int foo() { return 100; } int bar() { return 50; } int cilk_main(int argc, char **argv) { int x, y; x = cilk_spawn foo(); y = cilk_spawn bar(); cilk_sync; printf("Got %d %d, expecting %d %d\n", x, y, 100, 50); return 0; } </code></pre> <p>Again, I think this has to be a configuration problem. The code is unmodified from the working version our professor distributed, which I tested on a separate machine.</p> <p>Last bit of information I can think of is the PATH.</p> <pre><code>******@********:~/Path/To/Cilk$ echo $PATH /usr/local/cilk/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games </code></pre> <p>Thanks for your help!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload