On Wed, Sep/09/2009 10:30:44AM, Mike Dubman wrote:
>    Hey Eytan,
> 
>    It seems argv is participating in the following scenarios:
> 
>    1. argv should be defined in mtt.ini for every single [Test Run] section
>    2. Currently, &test_argv() is returing un-evaluated argv`s value
>    3. &test_argv() is usually part of "exec=" parameter line of [MPI
>    Details], which is evaluated for very test invocation:
> 
>    mpiexec @options@ -n &test_np() &test_executable() &test_argv()
> 
>    According to analysis above, if argv contains funclets or variables, they
>    will get expanded during "exec" line evaluation.

Okay, so we delay the evaluation of "argv" to when "exec" is
evaluated. The error case is:

  argv = &test_np()

Before fix:

  argv is undefined

After fix:

  argv is the value of &test_np()

-Ethan

> 
>    regards
> 
>    Mike
> 
>    On Tue, Sep 8, 2009 at 9:10 PM, Ethan Mallove <ethan.mall...@sun.com>
>    wrote:
> 
>      Mike,
> 
>      What if argv contains a funclet, e.g.,
> 
>      *argv = &foo()
> 
>      Won't this change prevent it from getting expanded?
> 
>      -Ethan
> 
>      On Tue, Sep/08/2009 09:43:37AM, mi...@osl.iu.edu wrote:
>      > Author: miked
>      > Date: 2009-09-08 09:43:37 EDT (Tue, 08 Sep 2009)
>      > New Revision: 1314
>      > URL: https://svn.open-mpi.org/trac/mtt/changeset/1314
>      >
>      > Log:
>      > fix:
>      >
>      > &test_np() can return incorrect value if used inside argv, here is a
>      scenario:
>      >
>      > This behavior can be explained in next words as evaluation &np_test()
>      > returns uninitialized $MTT::Test::Run::test_np that is initialized
>      later in _run_one_np function.
>      >
>      > As a result using
>      > $MTT::Test::Run::test_argv = $run->{argv};
>      > allows to avoid damaging $MTT::Test::Run::test_argv *variable on
>      current step but evaluation of &test_np() is done with whole
>      command_line.
>      >
>      >
>      > Text files modified:
>      > * *trunk/lib/MTT/Test/RunEngine.pm | * * 2 +-
>      > * *1 files changed, 1 insertions(+), 1 deletions(-)
>      >
>      > Modified: trunk/lib/MTT/Test/RunEngine.pm
>      >
>      
> ==============================================================================
>      > --- trunk/lib/MTT/Test/RunEngine.pm * (original)
>      > +++ trunk/lib/MTT/Test/RunEngine.pm * 2009-09-08 09:43:37 EDT (Tue, 08
>      Sep 2009)
>      > @@ -191,7 +191,7 @@
>      > * * * * *$MTT::Test::Run::test_executable_abspath = $test_exe_abs;
>      > * * * * *$MTT::Test::Run::test_executable_basename =
>      $test_exe_basename;
>      >
>      > - * * * *$MTT::Test::Run::test_argv =
>      MTT::Values::EvaluateString($run->{argv}, $ini, $test_run_full_name);
>      > + * * * *$MTT::Test::Run::test_argv = $run->{argv};
>      > * * * * *my $all_np = MTT::Values::EvaluateString($run->{np}, $ini,
>      $test_run_full_name);
>      >
>      > * * * * *my $save_run_mpi_details = $MTT::Test::Run::mpi_details;
>      > _______________________________________________
>      > mtt-svn mailing list
>      > mtt-...@open-mpi.org
>      > http://www.open-mpi.org/mailman/listinfo.cgi/mtt-svn
>      _______________________________________________
>      mtt-devel mailing list
>      mtt-de...@open-mpi.org
>      http://www.open-mpi.org/mailman/listinfo.cgi/mtt-devel
> 
> References
> 
>    Visible links
>    . mailto:ethan.mall...@sun.com
>    . mailto:mi...@osl.iu.edu
>    . https://svn.open-mpi.org/trac/mtt/changeset/1314
>    . mailto:mtt-...@open-mpi.org
>    . http://www.open-mpi.org/mailman/listinfo.cgi/mtt-svn
>    . mailto:mtt-de...@open-mpi.org
>    . http://www.open-mpi.org/mailman/listinfo.cgi/mtt-devel

> _______________________________________________
> mtt-devel mailing list
> mtt-de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/mtt-devel

Reply via email to