<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic cannot find main? in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/cannot-find-main/m-p/741204#M506</link>
    <description>&lt;P&gt;The Intel Cilk Plus Tools User's Guide is only shipped as an HTML document, cilktools.html, so it doesn't have page numbers. However, I did find one stray reference to cilk_main. I've removed it and it will be fixed the next time we update the tools.&lt;/P&gt;&lt;P&gt;The Intel Cilk Plus documentation is available at &lt;A href="http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/index.htm#cref_cls/common/cilk_bk_using_cilk.htm"&gt;http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/index.htm#cref_cls/common/cilk_bk_using_cilk.htm&lt;/A&gt; If it contains any references to cilk_main, they're also an error. Please point me at the topic and I'll have it fixed.&lt;/P&gt;&lt;P&gt;If you look inside the version of cilk.h shipped with the Intel compiler, you'll see that there's very little there. Basically only macros to make using the Cilk keywords easier. &lt;/P&gt;&lt;P&gt;The icc compiler recognizes the use of the &lt;TT&gt;cilk_spawn&lt;/TT&gt; keyword and marks your function as a "spawning function". That means that it will allocate a __cilkrts_stack_frame in the function and do the appropriate things to initialize it in the function prologue and tear it down in the function epilogue. &lt;/P&gt;&lt;P&gt;- Barry&lt;/P&gt;</description>
    <pubDate>Thu, 01 Mar 2012 15:36:59 GMT</pubDate>
    <dc:creator>Barry_T_Intel</dc:creator>
    <dc:date>2012-03-01T15:36:59Z</dc:date>
    <item>
      <title>cannot find main?</title>
      <link>https://community.intel.com/t5/Software-Archive/cannot-find-main/m-p/741200#M502</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Istarted to cilkify my program with an error serial program. I took the line that said &lt;BR /&gt;&lt;BR /&gt;int main()&lt;BR /&gt;&lt;BR /&gt;and changed it to &lt;BR /&gt;&lt;BR /&gt;int cilk_main()&lt;BR /&gt;&lt;BR /&gt;I also aded the include file&lt;BR /&gt;&lt;BR /&gt;cilk.h this way&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;include &lt;CILK&gt;&lt;BR /&gt;&lt;BR /&gt;Iadded the line at the bottom of my include file list for the main function. I am not sure why I must precede it by&lt;BR /&gt;&lt;BR /&gt;cilk/&lt;BR /&gt;&lt;BR /&gt;,but I did.&lt;BR /&gt;&lt;BR /&gt;I then got the error&lt;BR /&gt;&lt;BR /&gt;ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crtl1.o(.debug_info): relocation 0 has invalid symbol index 12&lt;BR /&gt;&lt;BR /&gt;several more lines similar&lt;BR /&gt;&lt;BR /&gt;/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/../../crtl.o: In function " _start':&lt;BR /&gt;(.text+ox18): undefined reference to "main"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I did not change any file extensions from *.c to *.cilk.I am usng icc and it compiles all files with a c extension fine.&lt;BR /&gt;&lt;BR /&gt;The compiler seems to believe that i do not have a main function. I changed theint main() to int cilk_main(). &lt;BR /&gt;When I compiled I got the output that I listed above. What did I do wrong? I did everything that it said to do on the Cilk++ Programmers Guide.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Newport_j&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/CILK&gt;</description>
      <pubDate>Wed, 29 Feb 2012 20:55:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/cannot-find-main/m-p/741200#M502</guid>
      <dc:creator>newport_j</dc:creator>
      <dc:date>2012-02-29T20:55:35Z</dc:date>
    </item>
    <item>
      <title>cannot find main?</title>
      <link>https://community.intel.com/t5/Software-Archive/cannot-find-main/m-p/741201#M503</link>
      <description>Cilk++ is not the same as Intel Cilk Plus. icc supports Cilk Plus, not Cilk++. As such, do not use the programmers guide. Instead refer to the documentation in the compiler user's guide and reference and to the samples provided in the cilk subdirectory.&lt;BR /&gt;&lt;BR /&gt;In this case, I would just recommend renaming cilk_main back to main and see if that works.</description>
      <pubDate>Thu, 01 Mar 2012 00:05:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/cannot-find-main/m-p/741201#M503</guid>
      <dc:creator>Brandon_H_Intel</dc:creator>
      <dc:date>2012-03-01T00:05:50Z</dc:date>
    </item>
    <item>
      <title>cannot find main?</title>
      <link>https://community.intel.com/t5/Software-Archive/cannot-find-main/m-p/741202#M504</link>
      <description>I was using the Intel Cilk SDKguide page 14. I just started rewriting a serial program to a cilk parallell program. Since my code is in c, I thought that this Intel Cilk manual applies. &lt;BR /&gt;&lt;BR /&gt;Since, I posted my question, I thought about the problem. At first, I named int main() to int cilk_main, but I did not change the file extension from *.c to *.cilk. This the icc compiler is treating this as straight c code, and does not undertstand cilk_main(). Hence, it claims that I do not have a main function. Maybe I should give the file that contains a main function, the file extension *.cilk.&lt;BR /&gt;&lt;BR /&gt;I did not understand your first sentence in your reply. I have switched exclusivley to Intel Cilk Plus. Thus the changes thta I madeare outlined on page 14 of the Programmer's Guide.&lt;BR /&gt;&lt;BR /&gt;I will try your recommendation. But please elaborate on the first sentence in your reply. I have removed all previous versions of cilk from my hardrive.&lt;BR /&gt;&lt;BR /&gt;If I change cilk_main() back to main(), then how will icc know my code is cilk? I assume that I still must have #include &lt;CILK&gt; in the header section.&lt;BR /&gt;&lt;BR /&gt;I am using the icc command to compile my c source code.&lt;BR /&gt;&lt;BR /&gt;Newport_j&lt;/CILK&gt;</description>
      <pubDate>Thu, 01 Mar 2012 14:23:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/cannot-find-main/m-p/741202#M504</guid>
      <dc:creator>newport_j</dc:creator>
      <dc:date>2012-03-01T14:23:10Z</dc:date>
    </item>
    <item>
      <title>cannot find main?</title>
      <link>https://community.intel.com/t5/Software-Archive/cannot-find-main/m-p/741203#M505</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Yes, I see your point. I was using the wrong manual for Intel's Cilk compiler. Sorry, I have talken the Cilk Arts documents out of my notebook.&lt;BR /&gt;&lt;BR /&gt;You are correct in what you say. I have made modifications to avoid this in the future(see above).&lt;BR /&gt;&lt;BR /&gt;Newport_j</description>
      <pubDate>Thu, 01 Mar 2012 15:34:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/cannot-find-main/m-p/741203#M505</guid>
      <dc:creator>newport_j</dc:creator>
      <dc:date>2012-03-01T15:34:53Z</dc:date>
    </item>
    <item>
      <title>cannot find main?</title>
      <link>https://community.intel.com/t5/Software-Archive/cannot-find-main/m-p/741204#M506</link>
      <description>&lt;P&gt;The Intel Cilk Plus Tools User's Guide is only shipped as an HTML document, cilktools.html, so it doesn't have page numbers. However, I did find one stray reference to cilk_main. I've removed it and it will be fixed the next time we update the tools.&lt;/P&gt;&lt;P&gt;The Intel Cilk Plus documentation is available at &lt;A href="http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/index.htm#cref_cls/common/cilk_bk_using_cilk.htm"&gt;http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/index.htm#cref_cls/common/cilk_bk_using_cilk.htm&lt;/A&gt; If it contains any references to cilk_main, they're also an error. Please point me at the topic and I'll have it fixed.&lt;/P&gt;&lt;P&gt;If you look inside the version of cilk.h shipped with the Intel compiler, you'll see that there's very little there. Basically only macros to make using the Cilk keywords easier. &lt;/P&gt;&lt;P&gt;The icc compiler recognizes the use of the &lt;TT&gt;cilk_spawn&lt;/TT&gt; keyword and marks your function as a "spawning function". That means that it will allocate a __cilkrts_stack_frame in the function and do the appropriate things to initialize it in the function prologue and tear it down in the function epilogue. &lt;/P&gt;&lt;P&gt;- Barry&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2012 15:36:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/cannot-find-main/m-p/741204#M506</guid>
      <dc:creator>Barry_T_Intel</dc:creator>
      <dc:date>2012-03-01T15:36:59Z</dc:date>
    </item>
  </channel>
</rss>

