[mpich-discuss] MPICH and sudo mpiexec

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Tue Jun 2 11:21:30 CDT 2015


   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).

   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) :

(begin script)
#!/bin/bash

set -e

ESDK=${EPIPHANY_HOME}
ELIBS=${ESDK}/tools/host/lib:${LD_LIBRARY_PATH}
EHDF=${EPIPHANY_HDF}

echo "Running cpi on machines.u2.mpi"
LD_LIBRARY_PATH=${ELIBS} mpiexec --allow-run-as-root -machinefile /home/linaro/.machines.u2.mpi -n 1 /home/linaro/myMPI/cpi
echo "Done!"
(end script)

.machines.u2.mpi consists of the one line:

linaro at UNIT2


More information about the discuss mailing list