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)
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
On Sat, Jun 18, 2011 at 6:55 PM, Scott Hawley scott.hawley@belmont.edu wrote:
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?
Scott
I don't know what other part of the code may need changing... The error message indicates that the lower and upper bounds of the bbox are not compatible, i.e. that their distance is not a multiple of the stride. It could be that the code is using a stride from the wrong refinement level.
-erik
I'm now able to get the code to run until it gives a complaint I've never seen:
-> The variable "ADMBASE::gxx" has only 1 active timelevels, which is not enough for boundary prolongation order 1
This is an initial data thorn. I've never had to specify the number of timelevels. I started going through ADMBase and declaring timelevels for various quantities, and also for ADMConstraints, but the list kept getting longer and the code would still not run to completion because of more such errors.
I noticed that such definitions do not typically appear in par files that come with the various thorns.
Is there a way around this?
-Scott
%Sent from my iPhone
On Jun 19, 2011, at 5:33 PM, "Erik Schnetter" schnetter@cct.lsu.edu wrote:
On Sat, Jun 18, 2011 at 6:55 PM, Scott Hawley scott.hawley@belmont.edu wrote:
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?
Scott
I don't know what other part of the code may need changing... The error message indicates that the lower and upper bounds of the bbox are not compatible, i.e. that their distance is not a multiple of the stride. It could be that the code is using a stride from the wrong refinement level.
-erik
-- Erik Schnetter schnetter@cct.lsu.edu http://www.cct.lsu.edu/~eschnett/
In many cases, the corresponding evolution thorn (or other thorns using ADMBase) put respective statements into their own schedule.ccl files that enable sufficiently many time levels in ADMBase:
STORAGE: ADMBase::metric[3] ADMBase::curv[3]
-erik
On Sun, Jun 19, 2011 at 9:37 PM, Scott Hawley scott.hawley@belmont.edu wrote:
I'm now able to get the code to run until it gives a complaint I've never seen:
-> The variable "ADMBASE::gxx" has only 1 active timelevels, which is not enough for boundary prolongation order 1
This is an initial data thorn. I've never had to specify the number of timelevels. I started going through ADMBase and declaring timelevels for various quantities, and also for ADMConstraints, but the list kept getting longer and the code would still not run to completion because of more such errors.
I noticed that such definitions do not typically appear in par files that come with the various thorns.
Is there a way around this?
-Scott
%Sent from my iPhone
On Jun 19, 2011, at 5:33 PM, "Erik Schnetter" schnetter@cct.lsu.edu wrote:
On Sat, Jun 18, 2011 at 6:55 PM, Scott Hawley scott.hawley@belmont.edu wrote:
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?
Scott
I don't know what other part of the code may need changing... The error message indicates that the lower and upper bounds of the bbox are not compatible, i.e. that their distance is not a multiple of the stride. It could be that the code is using a stride from the wrong refinement level.
-erik
-- Erik Schnetter schnetter@cct.lsu.edu http://www.cct.lsu.edu/~eschnett/
users@lists.einsteintoolkit.org