[petsc-dev] script.py

Barry Smith bsmith at mcs.anl.gov
Sat Mar 13 21:16:22 CST 2010

   Please send such mail to petsc-dev so that everyone is in the loop.

On Mar 13, 2010, at 3:51 PM, Jed Brown wrote:

> I just reverted the following because it makes the successful path
> actually an error (all the nightlies failed).  Apparently these values
> are globals *and* are returned by these functions.  I don't see the
> reason for this, but I haven't looked hard.

     I must have misunderstood this confusing code that Matt wrote :-)

     Yes, they are globals but I believe under certain conditions they  
are never set to a value (this was in a petsc-maint from someone on a  
crazy cygwin system) thus I set values for error and status (not that  
error and status are passed into the checkCommand code.

     Perhaps the status should be set to 0 and the error to '' in the  
situation where I put in the wrong values (thinking it was failure).

     Matt should also check this code and see if I am write that  
status and error are not set in one situation.


> Jed
>  changeset:   2363:49d659360001
>  user:        Barry Smith bsmith at mcs.anl.gov
>  date:        Fri Mar 12 13:55:01 2010 -0600
>  files:       script.py
>  description:
>  excecuteShellCommand() had case where error and status variables  
> never set
>  diff --git a/script.py b/script.py
>  --- a/script.py
>  +++ b/script.py
>  @@ -228,6 +228,8 @@
>           if log: log.write(error)
>         else:
>           output = logOutput(log, output)
>  +        error  = "Runaway process and thread is not alive"
>  +        status = -1
>       else:
>         (output, error, status) = Script.runShellCommand(command, log)
>         output                  = logOutput(log, output)

More information about the petsc-dev mailing list