[mpich-discuss] Running an mpi program that needs to access /dev/mem

Pavan Balaji balaji at mcs.anl.gov
Thu Jun 13 11:48:35 CDT 2013


Try running:

% mpiexec [whatever-argument] id

This will give you what user id you are running your program as.

  -- Pavan

On 06/13/2013 11:46 AM, Lee, Eibhlin wrote:
> It sounds like that won't solve the problem I have. I have run mpiexec as the root user and still get the same problem.
> Eibhlin
> ________________________________________
> From: Pavan Balaji [balaji at mcs.anl.gov]
> Sent: 13 June 2013 16:17
> To: Lee, Eibhlin
> Cc: discuss at mpich.org
> Subject: Re: [mpich-discuss] Running an mpi program that needs to access /dev/mem
>
> No.  Think of hydra as an ssh program.  If you run mpiexec as root,
> it'll try to ssh as root.  You'll need to make sure ssh as root is
> passwordless.
>
>    -- Pavan
>
> On 06/13/2013 10:08 AM, Lee, Eibhlin wrote:
>> My apologies,
>> So hydra is in effect a super user?
>> Eibhlin
>> ________________________________________
>> From: Pavan Balaji [balaji at mcs.anl.gov]
>> Sent: 13 June 2013 16:02
>> To: Lee, Eibhlin
>> Cc: discuss at mpich.org
>> Subject: Re: [mpich-discuss] Running an mpi program that needs to access /dev/mem
>>
>> Please don't drop the mailing list from the cc.
>>
>> You can do an strace to see where /dev/mem is being used.
>>
>> If you are using multiple nodes, hydra only relies on passwordless ssh.
>>     It doesn't really care what the user id is (root or non-root).
>>
>>     -- Pavan
>>
>> On 06/13/2013 09:27 AM, Lee, Eibhlin wrote:
>>> Unfortunately I didn't come across this mailing list until recently. Sods law.
>>> ./main does not work but sudo ./main does work.
>>> Could hydra compile and run a program where this is the case?
>>> I ask because the only way I'll be able to get around using sudo is to change ownership of /dev/mem. It goes without saying that that's dangerous!
>>> Eibhlin
>>> ________________________________________
>>> From: Pavan Balaji [balaji at mcs.anl.gov]
>>> Sent: 13 June 2013 15:21
>>> To: discuss at mpich.org
>>> Cc: Lee, Eibhlin
>>> Subject: Re: [mpich-discuss] Running an mpi program that needs to access        /dev/mem
>>>
>>> smpd was mainly meant for windows support.  It is now deprecated, so we
>>> don't officially support that.  Someone on the mailing list might help,
>>> but no promises.
>>>
>>> With respect to hydra, problems with that is what you should have
>>> reported on this mailing list and we would have tried to help.  :-)
>>>
>>> If ./main itself is not working, there's no hope of getting it to work
>>> with mpiexec.  You'll need to debug that first.
>>>
>>>      -- Pavan
>>>
>>> On 06/13/2013 09:09 AM, Lee, Eibhlin wrote:
>>>> Pavan,
>>>> I had a lot of trouble getting hydra to work without having to enter a password/passphrase. I saw the option to pass a phrase in the mpich installers guide. I eventually found that for that command you needed to use the smpd process manager. That's the only reason I chose smpd over hydra.
>>>> As to your other suggestion. I ran ./main and the same error (Can't open /dev/mem...) appeared. sudo ./main works but of course without multiple processes.
>>>> Eibhlin
>>>> ________________________________________
>>>> From: discuss-bounces at mpich.org [discuss-bounces at mpich.org] on behalf of Pavan Balaji [balaji at mcs.anl.gov]
>>>> Sent: 13 June 2013 14:34
>>>> To: discuss at mpich.org
>>>> Subject: Re: [mpich-discuss] Running an mpi program that needs to access        /dev/mem
>>>>
>>>> I just saw your older email.  Why are you using smpd instead of the
>>>> default process manager (hydra)?
>>>>
>>>>       -- Pavan
>>>>
>>>> On 06/13/2013 08:05 AM, Pavan Balaji wrote:
>>>>>
>>>>> What's "-phrase"?  That's not a recognized option.  I'm not sure where
>>>>> the /dev/mem check is coming from.  Try running ~/main without mpiexec
>>>>> first.
>>>>>
>>>>>       -- Pavan
>>>>>
>>>>> On 06/13/2013 06:56 AM, Lee, Eibhlin wrote:
>>>>>> Hello all,
>>>>>>
>>>>>> I am trying to use two raspberry-pi to sample and then process some
>>>>>> data. The first process samples while the second processes and vice
>>>>>> versa. To do this I use gpio and also mpich-3.0.4 with the process
>>>>>> manager smpd. I have successfully run cpi on both machines (from the
>>>>>> master machine). I have also managed to run a similar program but
>>>>>> without the MPI, this involved compiling with gcc and when running
>>>>>> putting sudo in front of the binary file.
>>>>>>
>>>>>> When I combine these two processes I get various error messages.
>>>>>> For input:
>>>>>> mpiexec -phrase cat -machinefile machinefile -n 2 ~/main
>>>>>> the error is:
>>>>>> Can't open /dev/mem
>>>>>> Did you forget to use 'sudo .. ?'
>>>>>>
>>>>>> For input:
>>>>>> sudo mpiexec -phrase cat -machinefile machinefile -n 2 ~/main
>>>>>> the error is:
>>>>>> sudo: mpiexec: Command not found
>>>>>>
>>>>>> I therefore put mpiexec into /usr/bin
>>>>>>
>>>>>> now for input:
>>>>>> sudo mpiexec -phrase cat -machinefile machinefile -n 2 ~/main
>>>>>> the error is:
>>>>>> Can't open /dev/mem
>>>>>> Did you forget to use 'sudo .. ?'
>>>>>>
>>>>>> Does anyone know how I can work around this?
>>>>>> Thanks,
>>>>>> Eibhlin
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> discuss mailing list     discuss at mpich.org
>>>>>> To manage subscription options or unsubscribe:
>>>>>> https://lists.mpich.org/mailman/listinfo/discuss
>>>>>>
>>>>>
>>>>
>>>> --
>>>> Pavan Balaji
>>>> http://www.mcs.anl.gov/~balaji
>>>> _______________________________________________
>>>> discuss mailing list     discuss at mpich.org
>>>> To manage subscription options or unsubscribe:
>>>> https://lists.mpich.org/mailman/listinfo/discuss
>>>> _______________________________________________
>>>> discuss mailing list     discuss at mpich.org
>>>> To manage subscription options or unsubscribe:
>>>> https://lists.mpich.org/mailman/listinfo/discuss
>>>>
>>>
>>> --
>>> Pavan Balaji
>>> http://www.mcs.anl.gov/~balaji
>>>
>>
>> --
>> Pavan Balaji
>> http://www.mcs.anl.gov/~balaji
>>
>
> --
> Pavan Balaji
> http://www.mcs.anl.gov/~balaji
>

-- 
Pavan Balaji
http://www.mcs.anl.gov/~balaji



More information about the discuss mailing list