[Users] Carpet::baseextents, failed assertion

Scott Hawley scott.hawley at belmont.edu
Sat Jun 18 17:55:00 CDT 2011


Hey.  I updated the section code which was using basextent.at() in an earlier version of Carpet, to the new syntax of baseextents.at(0).at()   (Marked with "HERE" in below snippet of code.)

The code compiles, but when it runs, there is a failed assertion.
It seems the only value which changes in the entire run is "istr".

Is there some other part of the code that also needs to change?

Thanks,
Scott
I'll attach the par file too...(kind of a misnomer at this point)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: easyrun.par
Type: application/octet-stream
Size: 5863 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20110618/19398f00/attachment-0001.obj 
-------------- next part --------------




 char const * coordinates = 0;
  string coordinates_str;
  {
    CCTK_INFO ("Getting coordinate data from Carpet's bounding boxes");
    assert (maps == 1);
    int const m = 0;            // block index
    assert (mglevels == 1);
    int const ml = 0;           // convergence level
    vector<vector<rbbox> > gh (vhh.at(m)->reflevels());
    // Loop over all refinement levels
    CCTK_INFO ("About to loop over all refinement levels");
    for (int rl=0; rl<vhh.at(m)->reflevels(); ++rl) { // refinement level
      // Find the union of all regions on this level
      ibset level;
      for (int c=0; c<vhh.at(m)->components(rl); ++c) { // component
        ibbox const & ext = vdd.at(m)->boxes.at(ml).at(rl).at(c).exterior;
        level |= ext;
      } // for c
      level.normalize();
      // Convert the set of regions to coordinates
      CCTK_INFO ("Converting the set of regions to coordinates");
      printf("rl = %d\n",rl);
      for (ibset::const_iterator li = level.begin(); li != level.end(); ++ li) {
        printf("li = %d\n",li);
        ibbox const & ext = * li;
        rvect rlo, rup, rstr;
        ivect ilo, iup, istr;
        rvect lo, up, str;
        for (int d=0; d<3; ++d) {
          rlo[d] = domainspecs.at(m).exterior_min[d];
          rup[d] = domainspecs.at(m).exterior_max[d];
          rstr[d] = (rup[d] - rlo[d]) / (domainspecs.at(m).npoints[d] - 1);
//------------------------- HERE ----------------------------
          ilo[d] = vhh.at(m)->baseextents.at(m).at(rl).lower()[d];
          iup[d] = vhh.at(m)->baseextents.at(m).at(rl).upper()[d];
          istr[d] = vhh.at(m)->baseextents.at(m).at(rl).stride()[d];
//--------------------------------------------------------------
          lo[d] = rlo[d] + (ext.lower()[d] - ilo[d]) * ((rup[d] - rlo[d]) / (iup[d] - ilo[d]));
          up[d] = rlo[d] + (ext.upper()[d] - ilo[d]) * ((rup[d] - rlo[d]) / (iup[d] - ilo[d]));
          str[d] = ext.stride()[d] * (rstr[d] / istr[d]);
          printf("d = %d, npoints = %d\n",d, domainspecs.at(m).npoints[d] );
          printf("        rlo=%g, rup=%g, rstr=%g\n", rlo[d],rup[d],rstr[d]);
          printf("        ilo=%d, iup=%d, istr=%d\n", ilo[d],iup[d],istr[d]);
        }
        CCTK_INFO ("Just finished loop over d, about to rbbox");
        rbbox rext (lo, up, str);




Trace of the run of this part of the code looks like....

INFO (TexMEx): Getting coordinate data from Carpet's bounding boxes
INFO (TexMEx): About to loop over all refinement levels
INFO (TexMEx): Converting the set of regions to coordinates
rl = 0
li = 368448976
d = 0, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=512
d = 1, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=512
d = 2, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=512
INFO (TexMEx): Just finished loop over d, about to rbbox
INFO (TexMEx): About to gh.at(rl)...
INFO (TexMEx): Converting the set of regions to coordinates
rl = 1
li = 368448880
d = 0, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=256
d = 1, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=256
d = 2, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=256
INFO (TexMEx): Just finished loop over d, about to rbbox
INFO (TexMEx): About to gh.at(rl)...
INFO (TexMEx): Converting the set of regions to coordinates
rl = 2
li = 368448816
d = 0, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=128
d = 1, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=128
d = 2, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=128
INFO (TexMEx): Just finished loop over d, about to rbbox
INFO (TexMEx): About to gh.at(rl)...
INFO (TexMEx): Converting the set of regions to coordinates
rl = 3
li = 368443536
d = 0, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=64
d = 1, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=64
d = 2, npoints = 49
        rlo=-36, rup=36, rstr=1.5
        ilo=0, iup=24576, istr=64
INFO (TexMEx): Just finished loop over d, about to rbbox
cactus_texmex: /home/shawley/Cactus/arrangements/Carpet/CarpetLib/src/bbox.cc:25: void bbox<T, D>::assert_bbox_limits() const [with T = double, D = 3]: Assertion `all((_upper-_lower)%_stride == T(0))' failed.
Abort



 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 535 bytes
Desc: This is a digitally signed message part
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20110618/19398f00/attachment-0001.bin 


More information about the Users mailing list