Open MPI logo

MTT Devel Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all MTT Users mailing list

From: Ethan Mallove (ethan.mallove_at_[hidden])
Date: 2007-06-21 11:29:02


Hi,

I have a way to toggle single-node testing at the command
line. E.g., it looks like this:

  $ client/mtt run_on_single_node=1 ...
  $ client/mtt run_on_single_node=0 ...

I just needed the below INI mojo to get this going.

Added a "run_on_single_node" boolean to my [MTT] section.
("ompinfo" is an internal Sun script that spits out
hard-coded hostlist's based on what node the user is on.)

{{{
[MTT]
...
# Boolean which tells MTT to run on a single node
run_on_single_node = 0

ompinfo = /ws/ompi-tools/bin/ompinfo
hostlist = <<EOT
&perl("
     if ($run_on_single_node) {
        return `$ompinfo -j' ' | cut -f1 -d' '`;
     } else {
        return `$ompinfo -j' '`;
     }
")
EOT
}}}

And then I have this in my [MPI Details] section:

{{{
[MPI Details: Open MPI]
...
# Figure out which btl's to use
btls = <<EOT
&perl("

     # Return cached btls var, if we have it
     if (defined(\@btls)) {
         return \\\@btls;
     }

     # What hosts is MTT currently running on?
     my \@hosts = split /\s+|,/, hostlist_hosts();

     # If there is only one host, use SM
     if (scalar(\@hosts) < 2) {
         push(\@btls, 'self,sm');

     # Otherwise, use uDAPL or TCP
     } else {
         if ($ib_is_up) {
             push(\@btls, 'self,udapl');
         } else {
             push(\@btls, 'self,tcp');
         }
     }
     return \\\@btls;
")
EOT
}}}

Is there an easier way to do this?

-Ethan