[Bioc-devel] R_CheckUserInterrupt guidelines (was Re: R_CheckUserInterrupt in IRanges)

Patrick Aboyoun paboyoun at fhcrc.org
Mon Jan 11 22:31:16 CET 2010


I just modified the C or Fortran code section of package guidelines to 
reflect this new entry:

http://wiki.fhcrc.org/bioc/Package_Guidelines#c-or-fortran-code


Patrick


Wolfgang Huber wrote:
> Hi Patrick
>
> I suggest:
>
>> We have been silent on when to add R_CheckUserInterrupt calls at the 
>> C level for long running operations and only around 20 BioC packages 
>> use it. I added calls to R_CheckUserInterrupt in coverage, run*, and 
>> view* methods in IRanges, but more can certainly be added to the 
>> interval operations.
>>
>> For the developer wiki how does the following general rule sound:
>>
>> C level for loops should include a call to R_CheckUserInterrupt when 
>> the total loop time exceeds 10 seconds for a "reasonably sized" job 
>> on "reasonable" hardware AND the method is intended for interactive use.
>
> C level loops should include a call to R_CheckUserInterrupt when there 
> is any chance that they may not terminate for certain parameter 
> constellations, or when their run time exceeds 10 seconds with typical 
> parameters and the method is intended for interactive use.
>
> /*
> The notion "reasonable hardware" is difficult, since it may just be on 
> unreasonable hardware (like a netbook) where people experience the 
> greatest need for interrupting a carelessly called function. Also, even
> reasonable hardware can become unreasonable when there is competition 
> for memory and it starts swapping. Unless there is a substantial cost 
> for calling R_CheckUserInterrupt, I don't see why not to be liberal 
> with it.
> */
>
>
>     Best wishes
>     Wolfgang
>
>> Thoughts?
>>
>>
>> Patrick
>>
>>
>>
>> Wolfgang Huber wrote:
>>>
>>> Hi all,
>>>
>>> I noted that some functions in IRanges, e.g. 'runq', can take a long 
>>> time to terminate; that interrupting the evaluation e.g. by Ctrl-C 
>>> does not seem to be possible; and that in the C code of that 
>>> package, the function R_CheckUserInterrupt is never used.
>>>
>>> Are these conscious design decisions? Are there (should there be) 
>>> general recommendations from the project regarding use of that 
>>> function (or possibly equivalent functionality)?
>>>
>>> Various other packages (Biostrings, Biobase, ShortRead, vsn, puma, 
>>> limma) do use it in various places.
>>>
>>> Best wishes
>>>      Wolfgang
>>>
>>>
>>> -- 
>>> Wolfgang Huber
>>> EMBL
>>> http://www.embl.de/research/units/genome_biology/huber/contact
>>>
>>> _______________________________________________
>>> Bioc-devel at stat.math.ethz.ch mailing list
>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>
>



More information about the Bioc-devel mailing list