Pasha sent me this list of changes that Mellanox made to the client
side of MTT. Some of them have already been accepted back into the
trunk, so I snipped those from this mail. There's two main fixes
left: copytree and new functionality in the Mail reporter.
More comments below.
On Jan 10, 2008, at 10:21 AM, Pavel Shamis wrote:
Jeff, please see the attached file.
Most of the fixes already fixed by mtt.
Please see below my comments (grep <pasha>)
Index: lib/MTT/MPI/Install/Copytree.pm
===================================================================
--- lib/MTT/MPI/Install/Copytree.pm (revision 1123)
+++ lib/MTT/MPI/Install/Copytree.pm (working copy)
@@ -48,7 +48,7 @@ sub Install {
$ret->{exit_status} = 1;
$ret->{result_message} = "MPI INSTALL COPYTREE PLUGIN IS OUT OF
DATE. CONTACT AUTHORS";
Verbose("*** $ret->{result_message}\n");
- return $ret;
+ #return $ret;
Hah -- I guess the above message says it all, eh? :-)
Debug(">> copytree copying to $config->{installdir}\n");
@@ -69,9 +69,18 @@ sub Install {
}
# Copy the tree
- MTT::DoCommand::Pushdir($config->{installdir});
+ #MTT::DoCommand::Pushdir($config->{installdir});
+ #$x = MTT::Files::copy_tree("$config->{abs_srcdir}", 1);
+ #MTT::DoCommand::Popdir();
+ #return undef
+ # if (!$x);
+
+ #OLEG#
+ # Copy the tree
+ my $start_dir = cwd();
+ MTT::DoCommand::Chdir($config->{installdir});
$x = MTT::Files::copy_tree("$config->{abs_srcdir}", 1);
- MTT::DoCommand::Popdir();
+ MTT::DoCommand::Chdir($start_dir);
return undef
if (!$x);
<pasha> i guess it is copytree fixes
Looks mostly good; I'll commit (and remove the other "this is broken!"
stuff).
Index: lib/MTT/Mail.pm
===================================================================
--- lib/MTT/Mail.pm (revision 1123)
+++ lib/MTT/Mail.pm (working copy)
@@ -54,7 +54,9 @@ sub Init {
#--------------------------------------------------------------------------
sub Send {
- my ($subject, $to, $body) = @_;
+ #my ($subject, $to, $body) = @_;
+ #OLEG#
+ my ($subject, $to, $from, $body) = @_;
Init()
if (! $initialized);
@@ -66,11 +68,12 @@ sub Send {
# Invoke the mail agent to send the mail
- open MAIL, "|$mail_agent -s \"$subject\" \"$to\"" ||
+ #open MAIL, "|$mail_agent -s \"$subject\" \"$to\"" ||
+ #OLEG#
+ open MAIL, "|$mail_agent -r \"$from\" -s \"$subject\" \"$to\"" ||
die "Could not open pipe to output e-mail\n";
print MAIL "Subject: $subject\n";
print MAIL "$body\n";
- close MAIL;
# Restore the old environment
<pasha> Here he is changing default user from to some other value.
This looks reasonable, but I think we only want to add the -r if $from
is defined.
# If we have a hostlist, return its max procs count
Index: lib/MTT/Reporter/Email.pm
===================================================================
--- lib/MTT/Reporter/Email.pm (revision 1123)
+++ lib/MTT/Reporter/Email.pm (working copy)
@@ -81,6 +81,8 @@ sub Submit {
# Evaluate the email subject header
my $subject = Value($ini, $section, "email_subject");
+ #OLEG#
+ my $from = Value($ini, $section, "email_from");
my $s;
my $body;
@@ -116,7 +118,9 @@ sub Submit {
}
# Now send it
- MTT::Mail::Send($s, $to, $body);
+ #MTT::Mail::Send($s, $to, $body);
+ #OLEG#
+ MTT::Mail::Send($s, $to, $from, $body);
Verbose(">> Reported to e-mail: $to\n");
}
<pasha> again mail fixes
--
Jeff Squyres
Cisco Systems