On Fri, Nov/03/2006 08:03:04AM, Jeff Squyres wrote: > On Nov 2, 2006, at 6:11 PM, Ethan Mallove wrote: > > >> ./configure --with-lib-mpi=blah; gmake > > > > Right. I left out the ';'. It still errors out. It works > > if I trim the leading/trailing quote(s). > > Right, sorry -- you don't need the quotes if you're not in functlet > args. In this case, if you add quotes around the string, those will > be part of the field value (and in this case, since that field is > used to provide the value that is fork/exec'ed, you'll end up trying > to launch "foo" [which will fail] as opposed to foo [which would > success]). > > For example, I use this in my ini file: > > hostfile = /users/jsquyres/svn/mtt-core/&shell("hostname")/hostfile > > So just to confirm -- this works: > > command = ./configure --with-mpi-dir=&test_prefix(); gmake > > Right?
Right. I still like doing trim_quotes before returning, so that we're more forgiving in allowing ''both'' of these: shell_build_command = configure --with-mpi-dir=&test_prefix(); gmake shell_build_command = "configure --with-mpi-dir=&test_prefix(); gmake" -Ethan > > > String now: "configure --with-mpi-dir=foo/bar; gmake" > > No more functions left; final: "configure --with-mpi-dir=foo/bar; > > gmake" > > Running command: /tmp/VTzq0i9cqZ > > OUT:/tmp/VTzq0i9cqZ[2]: configure --with-mpi-dir=foo/bar; > > gmake: not found > > Command complete, exit status: 127 > > Writing built file: > > /opt/mtt/netpipe/i386/32/trunk/installs/ompi-nightly-trunk/ > > solaris_i386_32/1.3a1r12364/tests/imb_performance/PMB-2.2/ > > test_built.ini > > *** WARNING: Failed to build test [test build: imb > > performance]: Shell: command failed ""configure > > --with-mpi-dir=foo/bar; > > gmake"" > > > > -Ethan > > > > > >> ? > >> > >> > >> On Nov 2, 2006, at 5:36 PM, Ethan Mallove wrote: > >> > >>> On Thu, Nov/02/2006 03:24:48PM, Jeff Squyres wrote: > >>>> On Nov 2, 2006, at 2:18 PM, Ethan Mallove wrote: > >>>> > >>>>> I need to compile a testsuite like this: > >>>>> > >>>>> shell_build_command = &join("configure --with-lib-mpi=", > >>>>> &test_prefix(), "gmake") > >>>> > >>>> I don't quite understand what the resulting command is supposed to > >>>> do... > >>>> > >>>> configure --with-lib-mpi=/foo/bar/baz gmake > >>>> > >>>> ? > >>>> > >>>> But if you really want that, can't you use: > >>>> > >>>> shell_build_command = "configure --with-lib-mpi=&test_prefix() > >>>> gmake" > >>>> > >>> > >>> That doesn't work for me: > >>> > >>> Building Shell > >>> Evaluating: "configure --with-mpi-dir=&test_prefix() gmake" > >>> Got name: test_prefix > >>> Got args: > >>> _do: $ret = MTT::Values::Functions::test_prefix() > >>> &test_prefix returning: > >>> my_mpi/install/dir > >>> String now: "configure > >>> --with-mpi-dir=my_mpi/install/dir > >>> gmake" > >>> No more functions left; final: "configure > >>> --with-mpi-dir=my_mpi/install/dir > >>> gmake" > >>> Running command: /tmp/gaWTMDvUvr > >>> OUT:configure: WARNING: you should use --build, --host, > >>> --target > >>> OUT:checking build system type... Invalid configuration > >>> `gmake': machine `gmake' not recognized > >>> OUT:configure: error: /bin/bash ./config.sub gmake failed > >>> Command complete, exit status: 1 > >>> Writing built file: > >>> /opt/mtt/netpipe/i386/32/trunk/installs/ompi-nightly-trunk/ > >>> solaris_i386_32/1.3a1r12364/tests/imb_performance/PMB-2.2/ > >>> test_built.ini > >>> *** WARNING: Failed to build test [test build: imb > >>> performance]: Shell: command failed "configure > >>> --with-mpi-dir=my_mpi/install/dir > >>> gmake" > >>> > >>> -Ethan > >>> > >>> > >>>> > >>>> > >>>>> But MTT errors out with: > >>>>> > >>>>> Building Shell > >>>>> Evaluating: &join("configure --with-lib-mpi=", &test_prefix(), > >>>>> "gmake") > >>>>> Got name: test_prefix > >>>>> Got args: > >>>>> _do: $ret = MTT::Values::Functions::test_prefix() > >>>>> &test_prefix returning: my_mpi/install/dir > >>>>> String now: &join("configure --with-lib-mpi=", my_mpi/install/dir, > >>>>> "gmake") > >>>>> Got name: join > >>>>> Got args: "configure --with-lib-mpi=", my_mpi/install/dir, "gmake" > >>>>> _do: $ret = MTT::Values::Functions::join("configure --with-lib- > >>>>> mpi=", my_mpi/install/dir, "gmake") > >>>>> Bareword found where operator expected at (eval 33) line 1, > >>>>> near "/ > >>>>> opt/mtt" > >>>>> (Missing operator before tt?) > >>>>> Bareword found where operator expected at (eval 33) line 1, near > >>>>> "1.3a1r12364" > >>>>> (Missing operator before a1r12364?) > >>>>> *** ERROR: Module aborted: MTT::Test::Build::Shell:Build: *** > >>>>> ERROR: Could not evaluate: $ret = MTT::Values::Functions::join > >>>>> ("configure --with-lib-mpi=", my_mpi/install/dir, "gmake"): syntax > >>>>> error at (eval 33) line 1, near "/opt/mtt" > >>>>> > >>>>> It looks like EvaluateString does not like the slashes, > >>>>> because something silly like this doesn't give me the syntax > >>>>> error: > >>>>> > >>>>> shell_build_command = &join("configure --with-lib-mpi=", &test_np > >>>>> (), "gmake") > >>>>> > >>>>> Note: Below is a patch to give Build.pm visibility of > >>>>> test_prefix(), though this will also produce the error: > >>>>> > >>>>> &join("configure --with-lib-mpi=", &shell("pwd"), "gmake") > >>>>> > >>>>> -Ethan > >>>>> > >>>>> > >>>>> Index: MTT/Test/Build.pm > >>>>> ================================================================== > >>>>> = > >>>>> --- MTT/Test/Build.pm (revision 410) > >>>>> +++ MTT/Test/Build.pm (working copy) > >>>>> @@ -251,6 +251,10 @@ > >>>>> } > >>>>> } > >>>>> > >>>>> + # Some test suites require knowledge of where > >>>>> + # the MPI library is at the build stage > >>>>> + $MTT::Test::Run::test_prefix = $mpi_install->{installdir}; > >>>>> + > >>>>> # Process setenv, unsetenv, prepend-path, and append-path -- > >>>>> for > >>>>> # both the MPI that we're building with and the section of > >>>>> the > >>>>> ini > >>>>> # file that we're building. > >>>>> _______________________________________________ > >>>>> mtt-users mailing list > >>>>> mtt-us...@open-mpi.org > >>>>> http://www.open-mpi.org/mailman/listinfo.cgi/mtt-users > >>>> > >>>> > >>>> -- > >>>> Jeff Squyres > >>>> Server Virtualization Business Unit > >>>> Cisco Systems > >>>> > >>>> _______________________________________________ > >>>> mtt-users mailing list > >>>> mtt-us...@open-mpi.org > >>>> http://www.open-mpi.org/mailman/listinfo.cgi/mtt-users > >>> _______________________________________________ > >>> mtt-users mailing list > >>> mtt-us...@open-mpi.org > >>> http://www.open-mpi.org/mailman/listinfo.cgi/mtt-users > >> > >> > >> -- > >> Jeff Squyres > >> Server Virtualization Business Unit > >> Cisco Systems > >> > >> _______________________________________________ > >> mtt-users mailing list > >> mtt-us...@open-mpi.org > >> http://www.open-mpi.org/mailman/listinfo.cgi/mtt-users > > _______________________________________________ > > mtt-users mailing list > > mtt-us...@open-mpi.org > > http://www.open-mpi.org/mailman/listinfo.cgi/mtt-users > > > -- > Jeff Squyres > Server Virtualization Business Unit > Cisco Systems > > _______________________________________________ > mtt-users mailing list > mtt-us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/mtt-users