[mpich-discuss] MPICH and sudo mpiexec

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Wed Jun 3 08:40:58 CDT 2015


------------------------------
Date: Tue, 2 Jun 2015 17:31:21 -0500
From: "Antonio J. Peña" <apenya at mcs.anl.gov>
To: <discuss at mpich.org>

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.

Best,
   Antonio
------------------------------
   Unfortunately, that is not an option.  Ubuntu systems have disabled root accounts: you can't log into them.  That would not be desirable anyway.

   It seems there are two problems here.  The first is using a user-qualified machine file (e.g. <username>@<host>): this fails even before we get to the elevation problem.  The failure is different under MPICH 3.1.4:

$ mpiexec -n 4 -f ~/.machines.user.mpi /usr/src/mpich-3.1.4/examples/cpi
Fatal error in MPI_Init: Other MPI error, error stack:
MPIR_Init_thread(498)..............: 
MPID_Init(187).....................: channel initialization failed
MPIDI_CH3_Init(89).................: 
MPID_nem_init(320).................: 
MPID_nem_tcp_init(171).............: 
MPID_nem_tcp_get_business_card(418): 
MPID_nem_tcp_init(377).............: gethostbyname failed, username at hostname.domainname (errno 1)
[ a duplicate of the previous 8 lines occurs here ]
===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   PID 25764 RUNNING AT username at hostname.domainname
=   EXIT CODE: 1
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================

   Is this a bug or am I just writing the machine file wrong?

   The other is regarding the need for elevation in any case: I'm not convinced MPI has the facilities required to tell the hosted instances to request sudo elevation.

   Pondering my problem, I've now come to the conclusion that the Epiphany API should not be called from a sudoed MPI worker instance; rather, I'll write a sudoed daemon that will provide the Epiphany API services to the MPI workers through a socket or some such.  That way, the unprivileged MPI workers will be able to do their thing.

Daniel U. Thibault
RDDC - Centre de recherches de Valcartier | DRDC - Valcartier Research Centre
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list