Open MPI logo

MTT Devel Mailing List Archives

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

From: Ethan Mallove (Ethan.Mallove_at_[hidden])
Date: 2006-06-30 12:41:47

I think there's an issue with escaping quotes either in,
though there's an easy workaround.

The problem is the following .ini param will not work for me without a
minor change to OMPI:

configure_arguments = CFLAGS="-xarch=v8plusa -xO5"

Here's a simple test program that illustrates the issue:

$ perl -I<path_to_your_mtt>/trunk/lib -d ./test_DoCommand
$ cat test_DoCommand
use MTT::DoCommand;
# works!
MTT::DoCommand::Cmd(0, qw{./configure CFLAGS="-g -xarch=v8plusa" 
--enable-picky --enable-debug --disable-mpi-f90});
# doesn't work
MTT::DoCommand::Cmd(0, "./configure CFLAGS="-g -xarch=v8plusa" 
--enable-picky --enable-debug --disable-mpi-f90"});
Here's the workaround that seems to do the trick:
em162155_at_burl-ct-v440-6-a /workspace/em162155/hpc/mtt/trunk 234> svn 
diff lib/MTT/MPI/Install/
Index: lib/MTT/MPI/Install/
--- lib/MTT/MPI/Install/ (revision 185)
+++ lib/MTT/MPI/Install/ (working copy)
@@ -59,7 +59,7 @@
     $ret->{bindir} = "$ret->{installdir}/bin";
     $ret->{libdir} = "$ret->{installdir}/lib";
-    $x = MTT::DoCommand::Cmd(1, "$config->{configdir}/configure 
$config->{configure_arguments} --prefix=$ret->{installdir}");
+    $x = MTT::DoCommand::Cmd(1, ("$config->{configdir}/configure", 
$config->{configure_arguments}, "--prefix=$ret->{installdir}"));
     $stdout = $x->{stdout} ? "--- Configure stdout/stderr 
---\n$x->{stdout}" :
     if ($x->{status} != 0) {
I think I would favor a revision to lines 101-133 in DoCommand because 
it seems more natural to write DoCommand("foo bar baz"), then 
DoCommand(foo, bar, baz). But I need to think more about how to do it.