Open MPI logo

MTT Users Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2007-06-12 16:53:21


On Jun 12, 2007, at 10:50 AM, Ethan Mallove wrote:

>>> eval $btls = MTT::Functions::if(MTT::Functions::regexp
>>> (MTT::Functions::shell("hostname"), "v440-2|v20z-2"),
>>> MTT::Functions::enumerate("self,sm,tcp"),
>>> MTT::Functions::if("MTT::Functions::regexp
>>> ("MTT::Functions::shell("hostname"), "v440-6"),
>>> MTT::Functions::enumerate("udapl"),
>>> MTT::Functions::enumerate("sm", "tcp",
>>> "sm,tcp", "udapl", "sm,udapl")
>>> )
>>> )
>>
>> Ah -- I had to think about this a bit before I figured it out/
>> remembered. I think we won't get the expansion effect if you do it
>> this way.
>
> No expansion effect? As long as the perl code evaluates to
> an array, couldn't it to work? E.g.,

We'll need to revamp all the current funclets to accept arrays and
return [potentially] arrays of arrays. What if, as a
counterproposal, we have a &perl() funclet? Then you could do the
following:

btls = &perl("if ($hostname =~ /foo/) { \
            return ("self,sm,tcp"); \
        } elsif ($hostname =~ /bar/) { \
            return ("udapl"); \
        } else { \
            return ("sm", "tcp", "sm,tcp", "udapl", "sm,udapl"); \
        }")

(or something like that)

-- 
Jeff Squyres
Cisco Systems