[Users] Bug in Piraha / trac.einsteintoolkit.org is down

Erik Schnetter schnetter at cct.lsu.edu
Tue May 21 10:52:43 CDT 2019


Steven

The ET web pages still point directly to Trac.

-erik

On Tue, May 21, 2019 at 11:03 AM Steven R. Brandt <sbrandt at cct.lsu.edu> wrote:
>
> Erik, thanks for pointing this out.
>
> Trac was replaced some time ago with this:
> https://bitbucket.org/einsteintoolkit/tickets/issues/
>
> There is supposed to be a web-page redirecting you to that location.
> I'll take a look at what's happened with it.
>
> --Steve
>
> On 5/21/2019 9:56 AM, Erik Schnetter wrote:
> > I just found and corrected a problem in how Piraha handles the "min"
> > and "max" functions in parameter files:
> >
> > (1) Piraha processes the first argument twice. (This isn't really a
> > bug since min and max are idempotent.)
> >
> > (2) Piraha stops after processing the first element since a "return"
> > statement is placed wrong.
> >
> > The diff below corrects both problems.
> >
> > -erik
> >
> >
> >
> > $ git diff
> > diff --git a/src/piraha/Call.cc b/src/piraha/Call.cc
> > index cf777d58..facd2565 100644
> > --- a/src/piraha/Call.cc
> > +++ b/src/piraha/Call.cc
> > @@ -405,7 +405,7 @@ smart_ptr<Value> meval(smart_ptr<Group>
> > gr,ExpressionEvaluationData *eedata) {
> >                   std::string par = get_parfile();
> >
> > CCTK_Error(gr->line(),par.c_str(),current_thorn.c_str(),msg.str().c_str());
> >               }
> > -            for (int i=1; i<=gr->groupCount(); i++) {
> > +            for (int i=2; i<=gr->groupCount(); i++) {
> >                   smart_ptr<Value> val_next = meval(gr->group(i),eedata);
> >                   // Make sure all arguments are either integer or real
> >                   if (val_next->type != PIR_REAL && val_next->type != PIR_INT) {
> > @@ -437,8 +437,8 @@ smart_ptr<Value> meval(smart_ptr<Group>
> > gr,ExpressionEvaluationData *eedata) {
> >                       std::string par = get_parfile();
> >
> > CCTK_Error(gr->line(),par.c_str(),current_thorn.c_str(),"internal
> > error");
> >                   }
> > -                return val;
> >               }
> > +            return val;
> >           }
> >           // From here on only functions that take exactly one
> > argument: the majority.
> >           else if (gr->groupCount() != 2) {
> >
> >
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users



-- 
Erik Schnetter <schnetter at cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/


More information about the Users mailing list