<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><br>
Hi Daniel,<br>
<br>
Your environment variables and password-less privileges are likely
to not being propagated to applications executed by "sudo" (for
example, can you do "sudo ssh" between nodes without being asked
for a password?). If you really need that, consider logging in as
root and preparing the environment there. <br>
<br>
Best,<br>
Antonio<br>
<br>
<br>
On 06/02/2015 11:21 AM, Thibault, Daniel wrote:<br>
</div>
<blockquote cite="mid:48CF5AC71E61DB46B70D0F388054EFFD86F70ED5@VAL-E-02.valcartier.drdc-rddc.gc.ca" type="cite">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div> I have a small network of machines all running the
same OS (Linaro Ubuntu Linux); they were all cloned from the
same disk image and differ only in their machine names
(UNIT1 through UNIT4).</div>
<div> </div>
<div> I can ssh between them at will, trusty has been
established and I no longer get asked for a password upon
connecting. MPICH is installed from the Ubuntu repository
(not quite the latest version: mpiexec reports version
OpenRTE 1.8.1, the mpich package
is 3.0.4-6ubuntu1), and I can run a demo like cpi with no
issues, using a little mpi-run.sh bash script (the default
shell is tcsh, however) :</div>
<div> </div>
<div>(begin script)</div>
<div>#!/bin/bash</div>
<div> </div>
<div>set -e</div>
<div> </div>
<div>ESDK=${EPIPHANY_HOME}</div>
<div>ELIBS=${ESDK}/tools/host/lib:${LD_LIBRARY_PATH}</div>
<div>EHDF=${EPIPHANY_HDF}</div>
<div> </div>
<div>echo "Running cpi on machines.u2.mpi"</div>
<div>LD_LIBRARY_PATH=${ELIBS} mpiexec --allow-run-as-root
-machinefile /home/linaro/.machines.u2.mpi -n 1
/home/linaro/myMPI/cpi</div>
<div>echo "Done!"</div>
<div>(end script)</div>
<div> </div>
<div>.machines.u2.mpi consists of the one line:</div>
<div> </div>
<div>linaro@UNIT2</div>
<div> </div>
<div>From UNIT1, if I do:</div>
<div> </div>
<div>$ ./mpi-run.sh</div>
<div>Running cpi on machines.u2.mpi</div>
<div>Process 0 of 1 is on UNIT2</div>
<div>pi is approximately 3.1415926544231341, Error is
0.0000000008333410</div>
<div>wall clock time = 0.001327</div>
<div>Done!</div>
<div> </div>
<div>If I edit the script to change the mpiexec line like
this:</div>
<div> </div>
<div>sudo -E LD_LIBRARY_PATH=${ELIBS} mpiexec
--allow-run-as-root -machinefile
/home/linaro/.machines.u2.mpi -n 1 /home/linaro/myMPI/cpi</div>
<div> </div>
<div>Now I get (edited for brevity):</div>
<div> </div>
<div>$ ./mpi-run.sh</div>
<div>Running cpi on machines.u2.mpi</div>
<div>linaro@UNIT2’s password:</div>
<div>PATH=/usr/local/bin[…]: Command not found.</div>
<div>export: Command not found.</div>
<div>LD_LIBRARY_PATH=/usr/local/lib[…]: Command not found.</div>
<div>export: Command not found.</div>
<div>DYLD_LIBRARY_PATH: Undefined variable.</div>
<div> </div>
<div>And it just stops there. Note that the LD_LIBRARY_PATH
being reported is *<b>not</b>* the one passed in by the
script. I don’t think it’s managing to reach the mpi
execution stage itself.</div>
<div> </div>
<div>If the machinefile lists more than one host, the password
prompts appear two at a time and interfere with each other
such that no login succeeds (although all machines have the
same password).</div>
<div> </div>
<div>Googling around, I’ve seen this series of error outputs
in a wide variety of other contexts, including Open MPI but
also some completely unrelated application suites and SDKs.</div>
<div> </div>
<div>My problem is that the mpi binaries I need to run on the
hosts absolutely require sudo elevation. Is sudo mpiexec
the way to go? What is going on in my example case?</div>
<div> </div>
<div><font face="Consolas">Daniel U. Thibault<br>
RDDC - Centre de recherches de Valcartier | DRDC -
Valcartier Research Centre<br>
NAC : <a moz-do-not-send="true" href="http://www.travelgis.com/map.asp?addr=918V%20QSDJ"><font color="blue" face="Courier New" size="2"><span style="font-size:10pt;"><u>918V QSDJ</u></span></font></a><font color="#1F497D" face="Calibri"> </font><font face="Calibri"><</font><font color="blue" face="Courier New" size="2"><span style="font-size:10pt;"><u><a moz-do-not-send="true" href="http://www.travelgis.com/map.asp?addr=918V%20QSDJ">http://www.travelgis.com/map.asp?addr=918V%20QSDJ</a></u></span></font><font face="Calibri">><br>
</font>Gouvernement du Canada | Government of Canada<br>
<font face="Calibri"><</font><a moz-do-not-send="true" href="http://www.valcartier.drdc-rddc.gc.ca/"><font color="blue" face="Courier New" size="2"><span style="font-size:10pt;"><u>http://www.valcartier.drdc-rddc.gc.ca/</u></span></font></a><font face="Calibri">></font></font></div>
<div> </div>
</span></font>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
discuss mailing list <a class="moz-txt-link-abbreviated" href="mailto:discuss@mpich.org">discuss@mpich.org</a>
To manage subscription options or unsubscribe:
<a class="moz-txt-link-freetext" href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Antonio J. Peña
Postdoctoral Appointee
Mathematics and Computer Science Division
Argonne National Laboratory
9700 South Cass Avenue, Bldg. 240, Of. 3148
Argonne, IL 60439-4847
<a class="moz-txt-link-abbreviated" href="mailto:apenya@mcs.anl.gov">apenya@mcs.anl.gov</a>
<a class="moz-txt-link-abbreviated" href="http://www.mcs.anl.gov/~apenya">www.mcs.anl.gov/~apenya</a></pre>
</body>
</html>