<?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 The tags will work if in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/Using-MPI-Init-thread-in-one-processor/m-p/973820#M3331</link>
    <description>&lt;P&gt;The tags will work if implemented correctly.&amp;nbsp; MPI_Send and MPI_Recv must have matching tags in order to transfer data.&amp;nbsp; The tag is frequently just set to 0.&lt;/P&gt;

&lt;P&gt;To my knowledge, there is no MPI implementation that only uses one rank, as that is counter to the whole point of MPI.&amp;nbsp; There might be something like that, but not that I have seen.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2014 21:47:33 GMT</pubDate>
    <dc:creator>James_T_Intel</dc:creator>
    <dc:date>2014-01-31T21:47:33Z</dc:date>
    <item>
      <title>Using MPI_Init_thread in one processor</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Using-MPI-Init-thread-in-one-processor/m-p/973817#M3328</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a very large external package I would like to use in my application. The package runs in parallel but only under MPI. To have users start the application under "mpirun ..." is impractical.&lt;/P&gt;

&lt;P&gt;However, there is a call - MPI_Init_thread - that appears equivalent to MPI_Init. So here's my question: can I continue building the application as I normally do then, say, on Windows, start multiple threads with _beginthreadex and, in each of the threads call MPI_Init_thread? In other words, would all subsequent calls to MPI behave as if I had a true multiprocessor run, except that functions such as MPI_Comm_rank would return the rank within this multi-threaded application, rather than in a multi-processor application?&lt;/P&gt;

&lt;P&gt;I'm trying to use this external package but will only run it on multi-core machines as multi-threaded. I'm hoping that all message passing will now be optimized for shared memory and I can use MPI transparently in a single processor application.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;Arthur&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2014 20:22:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Using-MPI-Init-thread-in-one-processor/m-p/973817#M3328</guid>
      <dc:creator>mullervki</dc:creator>
      <dc:date>2014-01-31T20:22:40Z</dc:date>
    </item>
    <item>
      <title>Hi Arthur,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Using-MPI-Init-thread-in-one-processor/m-p/973818#M3329</link>
      <description>&lt;P&gt;Hi Arthur,&lt;/P&gt;

&lt;P&gt;In short, no.&amp;nbsp; This will not do what you want.&amp;nbsp; MPI_Init_thread (or MPI_Init for that matter) can only be called once per rank.&amp;nbsp; The purpose of MPI_Init_thread is to allow (subsequent) MPI calls within threaded regions to work correctly.&amp;nbsp; You could use MPI with only one rank to send data between threads in this scenario.&amp;nbsp; A single rank MPI program (singleton) can still use MPI calls, but it won't necessarily be able to see other ranks.&amp;nbsp; You couldn't for instance launch two completely independent copies and have them communicate with each other (there are ways around this, involving MPI_Comm_join, but that's a separate discussion).&lt;/P&gt;

&lt;P&gt;If you wanted, you could have one thread send data to another using MPI_Send/MPI_Recv.&amp;nbsp; All threads will have the same rank, but you can take advantage of the tag to ensure data goes where it should.&amp;nbsp; I don't know how any of the collectives would work in this scenario, I haven't tested it before.&lt;/P&gt;

&lt;P&gt;Sincerely,&lt;BR /&gt;
	James Tullos&lt;BR /&gt;
	Technical Consulting Engineer&lt;BR /&gt;
	Intel® Cluster Tools&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2014 21:04:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Using-MPI-Init-thread-in-one-processor/m-p/973818#M3329</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-01-31T21:04:32Z</dc:date>
    </item>
    <item>
      <title>Hi James,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Using-MPI-Init-thread-in-one-processor/m-p/973819#M3330</link>
      <description>&lt;P&gt;Hi James,&lt;/P&gt;

&lt;P&gt;Thanks for the very quick reply. I'm not sure I can count this external package using different tags; it may just ignore the tag and count on only the rank for communication.&lt;/P&gt;

&lt;P&gt;So this brings up the question: is there any, say, OpenMP-only emulation of MPI for one processor, multi-threaded applications such as I described, where rather than a processor per rank it uses a thread per rank and everything is running from within a single executable?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;-Arthur&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2014 21:20:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Using-MPI-Init-thread-in-one-processor/m-p/973819#M3330</guid>
      <dc:creator>mullervki</dc:creator>
      <dc:date>2014-01-31T21:20:01Z</dc:date>
    </item>
    <item>
      <title>The tags will work if</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Using-MPI-Init-thread-in-one-processor/m-p/973820#M3331</link>
      <description>&lt;P&gt;The tags will work if implemented correctly.&amp;nbsp; MPI_Send and MPI_Recv must have matching tags in order to transfer data.&amp;nbsp; The tag is frequently just set to 0.&lt;/P&gt;

&lt;P&gt;To my knowledge, there is no MPI implementation that only uses one rank, as that is counter to the whole point of MPI.&amp;nbsp; There might be something like that, but not that I have seen.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2014 21:47:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Using-MPI-Init-thread-in-one-processor/m-p/973820#M3331</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-01-31T21:47:33Z</dc:date>
    </item>
  </channel>
</rss>

