<?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 Intel TBB link question in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Intel-TBB-link-question/m-p/871580#M2953</link>
    <description>I'm not quite sure how to pose this question because I'm so thoroughly confused by it, so I'll just jump right into it.&lt;BR /&gt;&lt;BR /&gt;I have a simple little chunk of code that basically just grabs data from a text repository on disk. When I first started I had it in a single threaded process and it linked and worked just fine. Then I decided to thread it using tbb's parallel_for. I wrote the "Apply" constructor and overloaded the operator() and simply copy-and-pasted the for loop that originally worked into the operator() function and the only change I made was to the iteration space of the for loop. Now when I compile it, it throws an undefined reference to a function inside the for loop. What's really confusing is that other functions in the library that also contains the undefined function work just fine. I know this is a horrible description of the problem, was just hoping that someone else may have had a similar error and may give me some insight as to what is going on. And yes, ApplyParser does include the .h file in which storage_read is defined.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;Here's the actual link error that it is throwing:&lt;BR /&gt;./src/PercyIndexer.o: In function `ApplyParser::operator()(tbb::blocked_range&lt;UNSIGNED int=""&gt; const&amp;amp;) const':&lt;BR /&gt;PercyIndexer.cc:(.text._ZNK11ApplyParserclERKN3tbb13blocked_rangeIjEE[ApplyParser::operator()(tbb::blocked_range&lt;UNSIGNED int=""&gt; const&amp;amp;) const]+0xf3): undefined reference to `storage_read(storage_t*, unsigned long, char*, long*)'&lt;BR /&gt;./src/PercyIndexer.o: In function `tbb::internal::start_for&lt;:BLOCKED_RANGE&gt;&lt;UNSIGNED int=""&gt;, ApplyParser&amp;gt;::execute()':&lt;BR /&gt;PercyIndexer.cc:(.text._ZN3tbb8internal9start_forINS_13blocked_rangeIjEE11ApplyParserE7executeEv[tbb::internal::start_for&lt;:BLOCKED_RANGE&gt;&lt;UNSIGNED int=""&gt;, ApplyParser&amp;gt;::execute()]+0x1d5): undefined reference to `storage_read(storage_t*, unsigned long, char*, long*)'&lt;BR /&gt;&lt;/UNSIGNED&gt;&lt;/:BLOCKED_RANGE&gt;&lt;/UNSIGNED&gt;&lt;/:BLOCKED_RANGE&gt;&lt;/UNSIGNED&gt;&lt;/UNSIGNED&gt;</description>
    <pubDate>Thu, 05 Apr 2007 18:04:02 GMT</pubDate>
    <dc:creator>johnpr01</dc:creator>
    <dc:date>2007-04-05T18:04:02Z</dc:date>
    <item>
      <title>Intel TBB link question</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Intel-TBB-link-question/m-p/871580#M2953</link>
      <description>I'm not quite sure how to pose this question because I'm so thoroughly confused by it, so I'll just jump right into it.&lt;BR /&gt;&lt;BR /&gt;I have a simple little chunk of code that basically just grabs data from a text repository on disk. When I first started I had it in a single threaded process and it linked and worked just fine. Then I decided to thread it using tbb's parallel_for. I wrote the "Apply" constructor and overloaded the operator() and simply copy-and-pasted the for loop that originally worked into the operator() function and the only change I made was to the iteration space of the for loop. Now when I compile it, it throws an undefined reference to a function inside the for loop. What's really confusing is that other functions in the library that also contains the undefined function work just fine. I know this is a horrible description of the problem, was just hoping that someone else may have had a similar error and may give me some insight as to what is going on. And yes, ApplyParser does include the .h file in which storage_read is defined.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;Here's the actual link error that it is throwing:&lt;BR /&gt;./src/PercyIndexer.o: In function `ApplyParser::operator()(tbb::blocked_range&lt;UNSIGNED int=""&gt; const&amp;amp;) const':&lt;BR /&gt;PercyIndexer.cc:(.text._ZNK11ApplyParserclERKN3tbb13blocked_rangeIjEE[ApplyParser::operator()(tbb::blocked_range&lt;UNSIGNED int=""&gt; const&amp;amp;) const]+0xf3): undefined reference to `storage_read(storage_t*, unsigned long, char*, long*)'&lt;BR /&gt;./src/PercyIndexer.o: In function `tbb::internal::start_for&lt;:BLOCKED_RANGE&gt;&lt;UNSIGNED int=""&gt;, ApplyParser&amp;gt;::execute()':&lt;BR /&gt;PercyIndexer.cc:(.text._ZN3tbb8internal9start_forINS_13blocked_rangeIjEE11ApplyParserE7executeEv[tbb::internal::start_for&lt;:BLOCKED_RANGE&gt;&lt;UNSIGNED int=""&gt;, ApplyParser&amp;gt;::execute()]+0x1d5): undefined reference to `storage_read(storage_t*, unsigned long, char*, long*)'&lt;BR /&gt;&lt;/UNSIGNED&gt;&lt;/:BLOCKED_RANGE&gt;&lt;/UNSIGNED&gt;&lt;/:BLOCKED_RANGE&gt;&lt;/UNSIGNED&gt;&lt;/UNSIGNED&gt;</description>
      <pubDate>Thu, 05 Apr 2007 18:04:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Intel-TBB-link-question/m-p/871580#M2953</guid>
      <dc:creator>johnpr01</dc:creator>
      <dc:date>2007-04-05T18:04:02Z</dc:date>
    </item>
  </channel>
</rss>

