Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Newbie question continues, a step toward real app
From: Gus Correa (gus_at_[hidden])
Date: 2011-01-13 19:18:54


Tena Sakai wrote:
> Fantastic, Gus! Now I think I got framework pretty much done.
> The rest is to work on 'problem solving' end with R.
>
> Many thanks for your insight and kindness. I really appreciate it.
>
> Regards,
>
> Tena Sakai
> tsakai_at_[hidden]
>
Hi Tena

I'm glad that it helped somebody at the other side of the country,
but solving a problem (MIMD) so close to ours here at home.

Still thinking of what could one do to fix the Rmpi guts,
to work nicely with OpenMPI, MPICH2, etc.
The hint I took from your postings was that the whole
issue revolves around the mechanism to launch MPI jobs
(the whole mambo jumbo of start LAM boot, and stuff like that,
that is no longer there).
I think typically this is where the MPIs differ,
and the difficulties in portability appear.
Did you speak to the Rmpi author about this?
If I only had the time to learn some R and take a look at Rmpi
I might give it a try.
The MIMD trick will do for the embarrassingly parallel problem you
mentioned, but it would be nice to have Rmpi working for when
parallelism is essential.
Nobody uses R here (but do in the Statistics Department),
probably because they're used to other tools (Matlab, etc).
However, there is plenty of statistics of climate and other
Earth Science data that goes on here,
hence R might be used also.

Good luck with your research and with "R on the cloud"!

Regards,
Gus Correa
---------------------------------------------------------------------
Gustavo Correa
Lamont-Doherty Earth Observatory - Columbia University
Palisades, NY, 10964-8000 - USA
---------------------------------------------------------------------

>
> On 1/13/11 2:40 PM, "Gus Correa" <gus_at_[hidden]> wrote:
>
>> Tena Sakai wrote:
>>> Hi,
>>>
>>> I have a script I call fib.r. It looks like:
>>>
>>> #!/usr/bin/env r
>>>
>>> fib <- function( n ) {
>>> a <- 0
>>> b <- 1
>>> for ( i in 1:n ) {
>>> t <- b
>>> b <- a
>>> a <- a + t
>>> }
>>> a
>>> }
>>>
>>> print( fib(argv[1]) )
>>>
>>> When I run this script with a parameter, it generates a fibonocci number:
>>>
>>> $ fib.r 5
>>> 5
>>> $ fib.r 6
>>> 8
>>>
>>> and if I stick this into <program> part of MIMD example I have used
>>> previously:
>>>
>>> $ mpirun -H vixen -np 1 hostname : --hostfile myhosts -np 8 fib.r 7
>>>
>>> I get:
>>>
>>> vixen.egcrc.org
>>> [1] 13
>>> [1] 13
>>> [1] 13
>>> [1] 13
>>> [1] 13
>>> [1] 13
>>> [1] 13
>>> [1] 13
>>>
>>> This is good as proof of concept, but what I really want to do is to
>>> have that 7
>>> different for each (slave) process. Ie., I want to run ³rfib 5² on node
>>> 0, ³rfib 6²
>>> on node 1, ³rfib 7² on node 2, and so on. Is there any way to give a
>>> different
>>> parameter(s) to different process/slot?
>>>
>>> I thought maybe I can use ­rf option to do this, but I am leaning toward
>>> ­app
>>> option. Unfortunately, I see no example for the application context
>>> file. Would
>>> someone kindly explain how I can do what I describe?
>>>
>>> Thank you.
>>>
>>> Tena Sakai
>>> tsakai_at_[hidden]
>>>
>> Hi Tena
>>
>> We ran MPMD/MIMD programs here using in the past.
>> Coupled climate modes: atmosphere, ocean, sea ice, etc, each one one
>> executable, communicating via MPI.
>> Actually this was with MPICH1, somewhat different syntax than OpenMPI,
>> the flag/file was called '-pgfile' not '-app',
>> but I see no reason why it shouldn't work in your case with OpenMPI.
>>
>> I think if you create a 'appfile' with this content:
>>
>> -H node0 -np 1 rfib 5
>> -H node0 -np 1 rfib 6
>> ...
>>
>> and launch mpirun with
>>
>> mpirun -app appfile
>>
>> it is likely to work.
>>
>> Under Torque I cannot test this very easily,
>> because I need to parse the Torque file that gives me the nodes,
>> then write down the 'appfile' on the fly (which is what I used to
>> do for the coupled climate models).
>>
>> However, I tried on a standalone machine (where the -H nodename didn't
>> make sense, and was not used) and it worked.
>> My appfile test was like this:
>> -np 1 ls appfile
>> -np 1 hostname
>> -np 2 date
>> -np 4 who
>>
>> You can add your -H nodename to each line.
>>
>> I hope this helps,
>> Gus Correa
>> ---------------------------------------------------------------------
>> Gustavo Correa
>> Lamont-Doherty Earth Observatory - Columbia University
>> Palisades, NY, 10964-8000 - USA
>> ---------------------------------------------------------------------
>>
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users