<?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 Ed, in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050652#M4407</link>
    <description>&lt;P&gt;Ed,&lt;BR /&gt;
	&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; The Intel MPI Library development team has determined that this is Microsoft Windows specific issue. There is no way to pass an empty string as one of the command line parameters when you create a new process. Windows just ignores&amp;nbsp;an empty string argument.&amp;nbsp;You can refer to the MSDN article titled, "CreateProcess function" where the details can be found at the Microsoft URL:&lt;BR /&gt;
	&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx"&gt;&lt;U&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx" target="_blank"&gt;https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;In essence, when you invoke your program as:

    mpiexec -n 1 mpicc_argument.exe a "" b

Intel MPI Library receives the correct command-line information:

    mpicc_argument.exe a "" b

and passes it to the CreateProcess function, which proceeds to create your process instance, but with the following command-line:

    mpicc_argument.exe&amp;nbsp;a b&lt;/PRE&gt;

&lt;PRE&gt;The same happens when using mpiexec.smpd.exe, also.

Thank you,

-Steve
&lt;/PRE&gt;</description>
    <pubDate>Fri, 25 Sep 2015 21:21:12 GMT</pubDate>
    <dc:creator>Steve_H_Intel1</dc:creator>
    <dc:date>2015-09-25T21:21:12Z</dc:date>
    <item>
      <title>MPI_Comm_spawn strips empty strings from argv</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050647#M4402</link>
      <description>&lt;P&gt;Hi. I'm using Intel MPI 5 on Windows and have the following problem. &amp;nbsp;I have a C++ application that spawns worker processes using MPI_Comm_spawn() and passing parameters via the argv argument. &amp;nbsp;I have an array of strings that is passed this way - however, one of these string is empty. &amp;nbsp;When the worker process receives the argv array, the empty string has been removed from the array.&lt;/P&gt;

&lt;P&gt;f argv is an array of 3 strings, then in the worker process, I would expect argc = 4 (3 + 1 for the worker exe name). &amp;nbsp;However, if one of the strings is empty (note, empty but not NULL), then argc = 3 in the worker process. &amp;nbsp;This seems to me to be a bug. &amp;nbsp;Can someone confirm? &amp;nbsp;Is there a workaround?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 10:44:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050647#M4402</guid>
      <dc:creator>Ed_F_1</dc:creator>
      <dc:date>2015-08-12T10:44:57Z</dc:date>
    </item>
    <item>
      <title>Ed,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050648#M4403</link>
      <description>&lt;P&gt;Ed,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; What does the "MPI_Comm_spawn" call look like within your C++ application?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you were to insert debug semantics just before the call to "MPI_Comm_spawn" within the C++ application that spawns the worker process, and the&amp;nbsp;semantics look something like:&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; i;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"master - argc = %-d\n"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, argc);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; (i = 1; i &amp;lt; argc; i++)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"%s%c"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, argv&lt;I&gt;, (i &amp;lt; argc - 1) ? &lt;/I&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;' '&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; : &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;'\n'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;what does&amp;nbsp;master application&amp;nbsp;generate for the "argv" array? Within the source of the worker application, if you insert debug semantics that look something like:&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; i;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"worker - argc = %-d\n"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, argc);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; (i = 1; i &amp;lt; argc; i++)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"%s%c"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, argv&lt;I&gt;, (i &amp;lt; argc - 1) ? &lt;/I&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;' '&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; : &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;'\n'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;what does the worker application generate?&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;

&lt;P&gt;-Steve&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2015 22:23:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050648#M4403</guid>
      <dc:creator>Steve_H_Intel1</dc:creator>
      <dc:date>2015-08-14T22:23:00Z</dc:date>
    </item>
    <item>
      <title>So:</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050649#M4404</link>
      <description>&lt;P&gt;So:&lt;/P&gt;

&lt;P&gt;I tweaked the printing to add quotes around the argument:&amp;nbsp;printf("\"%s\"%c", argv&lt;I&gt;, (i &amp;lt; argc - 1) ? ' ' : '\n');&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;Here is the argv array that I construct and which is passed to MPI_Comm_spawn&lt;/P&gt;

&lt;P&gt;master - argc = 5&lt;BR /&gt;
	"f:\tmp\gsa" "pinene" "simpinene" "" "other_info"&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;worker - argc = 5&lt;/SPAN&gt;&lt;BR style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;" /&gt;
	&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;"f:\tmp\gsa" "pinene" "simpinene" "other_info"&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;As you see the argument between "simpinene" and "other_info" has been removed by the time the worker receives the argv array.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;I do have a workaround - effectively never submit an empty string but the behaviour still looks like a bug to me.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2015 09:09:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050649#M4404</guid>
      <dc:creator>Ed_F_1</dc:creator>
      <dc:date>2015-08-17T09:09:45Z</dc:date>
    </item>
    <item>
      <title> </title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050650#M4405</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Ed,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; Could you please provide the command-line that you are using for the "master" application? The following example does not have any MPI semantics within it:&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;#include&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&amp;lt;stdio.h&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; main(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; argc, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;char&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; *argv[]) {&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; i;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;printf(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"argc: %d\n"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, argc);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;printf(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"argv[0]: %s\n"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, argv[0]);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; (argc == 1) {&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;printf(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"No arguments were passed from the command-line.\n"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; {&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;printf(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"Arguments from the command-line:\n"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;for&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; (i = 1; i &amp;lt; argc; ++i) {&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;printf(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;" %d. %s\n"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, i, argv&lt;I&gt;);&lt;/I&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; 0;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;When the compiled executable is run with "mpiexec.smpd" or "mpiexec.hydra" on Windows OS:&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mpiexec.hydra -n 1 test_arguments.exe first second third "" fourth fifth&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;The following output is generated:&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; argc:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; argv[0]:&amp;nbsp; test_arguments.exe&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Arguments from the command-line:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. first&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. second&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3. third&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4. fourth&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5. fifth&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;When the compiled executable is run &lt;EM&gt;without&lt;/EM&gt; "mpiexec.smpd" or "mpiexec.hydra":&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; test_arguments.exe first second third "" fourth fifth&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;The following output is generated:&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; argc:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; argv[0]:&amp;nbsp; test_arguments.exe&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Arguments from the command-line:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;1. first&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;2. second&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;3. third&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;4.&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;5. fourth&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6. fifth&lt;/P&gt;

&lt;P&gt;This problem does not&amp;nbsp;appear on Linux OS.&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;

&lt;P&gt;-Steve&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2015 23:32:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050650#M4405</guid>
      <dc:creator>Steve_H_Intel1</dc:creator>
      <dc:date>2015-08-17T23:32:09Z</dc:date>
    </item>
    <item>
      <title>Steve,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050651#M4406</link>
      <description>&lt;P&gt;Steve,&lt;/P&gt;

&lt;P&gt;I am running on Windows 7. &amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;My command line is effectively: &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;mpiexec.smpd.exe -n 1 ..\bin\prog.exe&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;(Although the same happens with mpiexec.hydra.exe)&lt;/P&gt;

&lt;P&gt;In prog.exe I effectively do the following:&lt;/P&gt;

&lt;P&gt;static const in NumArgs=3;&lt;/P&gt;

&lt;P&gt;char const* m_argv[NumArgs+1];&lt;/P&gt;

&lt;P&gt;m_argv[0] = "arg0";&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;m_argv[1] = "";&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;m_argv[2] = "arg2";&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;m_argv[NumArgs] = NULL;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;I then call MPI_Comm_spawn passing m_argv.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;Your example shows the exact problem.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;Like I said earlier, I now ensure that none of my arguments are empty (by prepending option flags: e.g. -p:) - this is a more robust approach for me anyway so I'll not trip up over this behaviour. &amp;nbsp;However, any feedback on the underlying cause would be welcome.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;Cheers, Ed&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 06:52:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050651#M4406</guid>
      <dc:creator>Ed_F_1</dc:creator>
      <dc:date>2015-08-18T06:52:08Z</dc:date>
    </item>
    <item>
      <title>Ed,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050652#M4407</link>
      <description>&lt;P&gt;Ed,&lt;BR /&gt;
	&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; The Intel MPI Library development team has determined that this is Microsoft Windows specific issue. There is no way to pass an empty string as one of the command line parameters when you create a new process. Windows just ignores&amp;nbsp;an empty string argument.&amp;nbsp;You can refer to the MSDN article titled, "CreateProcess function" where the details can be found at the Microsoft URL:&lt;BR /&gt;
	&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx"&gt;&lt;U&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx" target="_blank"&gt;https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;In essence, when you invoke your program as:

    mpiexec -n 1 mpicc_argument.exe a "" b

Intel MPI Library receives the correct command-line information:

    mpicc_argument.exe a "" b

and passes it to the CreateProcess function, which proceeds to create your process instance, but with the following command-line:

    mpicc_argument.exe&amp;nbsp;a b&lt;/PRE&gt;

&lt;PRE&gt;The same happens when using mpiexec.smpd.exe, also.

Thank you,

-Steve
&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Sep 2015 21:21:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Comm-spawn-strips-empty-strings-from-argv/m-p/1050652#M4407</guid>
      <dc:creator>Steve_H_Intel1</dc:creator>
      <dc:date>2015-09-25T21:21:12Z</dc:date>
    </item>
  </channel>
</rss>

