[ET Trac] [Einstein Toolkit] #1260: list registered variables when exceeding MoL accumulator limit

Einstein Toolkit trac-noreply at einsteintoolkit.org
Thu Feb 14 23:08:11 CST 2013


#1260: list registered variables when exceeding MoL accumulator limit
------------------------------------+---------------------------------------
  Reporter:  rhaas                  |       Owner:        
      Type:  enhancement            |      Status:  review
  Priority:  minor                  |   Milestone:        
 Component:  EinsteinToolkit thorn  |     Version:        
Resolution:                         |    Keywords:  MoL   
------------------------------------+---------------------------------------

Comment (by rhaas):

 Hmm, I believe I cannot use Util_asnprintf directly since I don't know at
 compile time how many variables there might be so I cannot build its
 format string. I would either have to build the format string dynamically
 in memory which I could do without a realloc, or I run the list of
 variables twice first counting how much memory I need, then filling the
 string. I dislike printing to stdout directly since Cactus supports
 listeners for warnings (via CCTK_WarnCallbackRegister), it seems, which
 would be circumvented by printing to stdout directly.

 Attached is an updated patch with simplified logic and no more realloc. It
 counts how much space will be needed, then gets memory, then uses snprintf
 to build the string as before.

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1260#comment:3>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list