<?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  Hi Ian,  Thanks for reaching in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183981#M6766</link>
    <description>&lt;P&gt;&amp;nbsp;Hi Ian,&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Thanks for reaching out to us.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Could you please share the following :&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;1) The MPI code which uses the shell function&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;2) The mpirun command you are using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Prasanth&lt;/P&gt;</description>
    <pubDate>Thu, 13 Feb 2020 10:54:04 GMT</pubDate>
    <dc:creator>PrasanthD_intel</dc:creator>
    <dc:date>2020-02-13T10:54:04Z</dc:date>
    <item>
      <title>Error importing shell functions</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183980#M6765</link>
      <description>&lt;P&gt;We use Intel MPI by default on our clusters, and we've recently run into a problem which, I think, is due to some problem with the way it passes environment variables through to the tasks.&lt;/P&gt;&lt;P&gt;If you export a shell function in bash:&lt;/P&gt;
&lt;PRE class="brush:bash; class-name:dark;"&gt;function hw() { echo "Hello world"; }
export -f hw&lt;/PRE&gt;

&lt;P&gt;That is available to child processes, and can be seen with env:&lt;/P&gt;

&lt;PRE class="brush:bash; class-name:dark;"&gt;$ env | grep -A1 hw
BASH_FUNC_hw()=() {  echo 'Hello world!'
}
&lt;/PRE&gt;

&lt;P&gt;Using `mpirun` with this set, without any modifications to the environment, gives the following error:&lt;/P&gt;

&lt;PRE class="brush:; class-name:dark;"&gt;bash: hw: line 1: syntax error: unexpected end of file
bash: error importing function definition for `BASH_FUNC_hw'&lt;/PRE&gt;

&lt;P&gt;We see this in 2018.3 and 2019.4, the most recent versions we have installed on our clusters. I tried to get a better handle on what it was doing with strace but I couldn't manage to find how it was going wrong -- like I said above, I'm guessing the way the environment variables are passed through wasn't written with these functions in mind and can't handle them.&lt;/P&gt;
&lt;P&gt;Has anyone else seen this problem? I'd guess the ability to export shell functions doesn't get much use, but the module command in Environment Modules 4.4.x does it, so I would have thought it would come up elsewhere.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 18:18:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183980#M6765</guid>
      <dc:creator>Ian_K_2</dc:creator>
      <dc:date>2020-02-12T18:18:21Z</dc:date>
    </item>
    <item>
      <title> Hi Ian,  Thanks for reaching</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183981#M6766</link>
      <description>&lt;P&gt;&amp;nbsp;Hi Ian,&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Thanks for reaching out to us.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Could you please share the following :&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;1) The MPI code which uses the shell function&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;2) The mpirun command you are using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Prasanth&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 10:54:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183981#M6766</guid>
      <dc:creator>PrasanthD_intel</dc:creator>
      <dc:date>2020-02-13T10:54:04Z</dc:date>
    </item>
    <item>
      <title>Quote:Dwadasi, Prasanth</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183982#M6767</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Dwadasi, Prasanth (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Hi Ian,&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Thanks for reaching out to us.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Could you please share the following :&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;1) The MPI code which uses the shell function&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;2) The mpirun command you are using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Prasanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This happens when running MPI and non-MPI-using code with mpirun -- it happens whether the executable I'm running with mpirun is something really simple like "/bin/true", or a simple MPI &lt;A href="https://github.com/UCL-RITS/pi_examples/tree/master/c_mpi_pi_dir"&gt;pi-calculating example code we use for training.&lt;/A&gt; They're not using the shell functions themselves internally, and execute successfully.&lt;/P&gt;&lt;P&gt;And, this is with the mpirun command on 64-bit Linux (Red Hat Enterprise Linux 7.6) from either Intel MPI 2018.3.222 or 2019.4.243. I haven't tried any other versions.&lt;/P&gt;&lt;P&gt;Full paths to those if relevant:&lt;/P&gt;
&lt;PRE class="brush:; class-name:dark;"&gt;/shared/ucl/apps/intel/2018.Update3/impi/2018.3.222/intel64/bin/mpirun
/shared/ucl/apps/intel/2019.Update4/impi/2019.4.243/intel64/bin/mpirun&lt;/PRE&gt;

&lt;P&gt;Running as:&lt;/P&gt;

&lt;PRE class="brush:; class-name:dark;"&gt;mpirun -machinefile $TMPDIR/machines -np 80 /bin/true&lt;/PRE&gt;

&lt;P&gt;which in turn is actually running, for example:&lt;/P&gt;

&lt;PRE class="brush:; class-name:dark;"&gt;mpiexec.hydra -machinefile /tmpdir/job/30889.undefined/sge_machinefile_uccaiki.34978 -machinefile /tmpdir/job/30889.undefined/machines -np 80 /bin/true&lt;/PRE&gt;

&lt;P&gt;(The fact that it's using two machinefiles is almost certainly an artefact of some automatic SGE integration I wasn't aware of before trying to find this out, and I assume shouldn't affect the issue I'm talking about.)&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 13:26:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183982#M6767</guid>
      <dc:creator>Ian_K_2</dc:creator>
      <dc:date>2020-02-13T13:26:05Z</dc:date>
    </item>
    <item>
      <title>Hi Ian,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183983#M6768</link>
      <description>&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;We tried to reproduce the same but haven't faced any errors that you mentioned.&lt;/P&gt;&lt;P&gt;We have tried with both the versions IMPI you have mentioned.&lt;/P&gt;&lt;P&gt;Could you provide the log info while running after exporting these two variables:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I_MPI_DEBUG=5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FI_LOG_LEVEL=debug&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Also if possible could you please share the machine file which you using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Prasanth&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 09:48:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183983#M6768</guid>
      <dc:creator>PrasanthD_intel</dc:creator>
      <dc:date>2020-02-14T09:48:40Z</dc:date>
    </item>
    <item>
      <title>Hi Ian,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183984#M6769</link>
      <description>&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;Are you still facing the issue? Could you check with Latest IMPI 2019.6 version.&lt;/P&gt;&lt;P&gt;Let us know if you have any other queries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Prasanth&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 04:37:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183984#M6769</guid>
      <dc:creator>PrasanthD_intel</dc:creator>
      <dc:date>2020-02-20T04:37:00Z</dc:date>
    </item>
    <item>
      <title>Quote:Dwadasi, Prasanth</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183985#M6770</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Dwadasi, Prasanth (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;Are you still facing the issue? Could you check with Latest IMPI 2019.6 version.&lt;/P&gt;&lt;P&gt;Let us know if you have any other queries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Prasanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies, I've been prevented from working on this due to industrial action and other concerns.&lt;/P&gt;&lt;P&gt;The environment variables you suggested did not provide any additional output, sadly.&lt;/P&gt;&lt;P&gt;We do not currently have IMPI 2019.6 installed on the cluster I am testing this on, so this will have to be done first.&lt;/P&gt;&lt;P&gt;To be honest, though, it's possible this is a problem with how the startup process integrates with our scheduler, which would mean this wouldn't help. Because the whole SSH chain breaks if you try to ptrace it, there's a limited amount of inspection I can do there.&lt;/P&gt;&lt;P&gt;I'll see what else I can do.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 10:52:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183985#M6770</guid>
      <dc:creator>Ian_K_2</dc:creator>
      <dc:date>2020-03-06T10:52:15Z</dc:date>
    </item>
    <item>
      <title>Hi Ian,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183986#M6771</link>
      <description>&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are forwarding this issue to the respective engineering team.&lt;/P&gt;&lt;P&gt;We will get back to you soon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Prasanth&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 10:33:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Error-importing-shell-functions/m-p/1183986#M6771</guid>
      <dc:creator>PrasanthD_intel</dc:creator>
      <dc:date>2020-03-09T10:33:06Z</dc:date>
    </item>
  </channel>
</rss>

