#1558: trying to activate more thorns than compiled into Cactus leads to strange error message --------------------+------------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Keywords: | --------------------+------------------------------------------------------- Right now if one tries to activate more thorns than the total number of thorns compiled into the executable, Cactus aborts with {{{ WARNING level 0 in thorn Cactus processor 0 host horizon.tapir.caltech.edu (line 951 of /mnt/data/rhaas/postdoc/gr/Zelmani/configs/null/build/Cactus/main/ActiveThorns.c): -> Internal error }}} this is utimately due to Cactus creating a list of maximum size number-of- compiled-in-thorns to record the number of thorns that are requested to be activated.
The attached patches automatically grows this list whenever it would otherwise be too small (doubles the size).
An alternative would be to implement stringlist using a std::map object, however the mapping of the std::map interface to what StringList provides is cumbersome.
ok to apply?
#1558: trying to activate more thorns than compiled into Cactus leads to strange error message ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------ Changes (by rhaas):
* status: new => review
#1558: trying to activate more thorns than compiled into Cactus leads to strange error message ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------
Comment (by eschnett):
Please apply.
I don't think it makes sense to replace the StringList implementation by map. However, the places that use StringList should slowly be converted to use map etc. instead.
#1558: trying to activate more thorns than compiled into Cactus leads to strange error message ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: reviewed_ok Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------ Changes (by rhaas):
* status: review => reviewed_ok
Comment:
Using std::map directly in the clients is occasionally work-intensive since the callers are usually C codes and C++ (required to use std::map directly) is stricter eg when it comes automatic casts of pointers to void* (eg passing a const pointer to free()). I agree though, touching this is not worthwhile right now.
Thank you for the review.
Applied as rev 5097 of the flesh.
#1558: trying to activate more thorns than compiled into Cactus leads to strange error message ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: closed Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: fixed | Keywords: ---------------------+------------------------------------------------------ Changes (by eschnett):
* status: reviewed_ok => closed * resolution: => fixed
trac@lists.einsteintoolkit.org