Re: [R-SIG-Mac] macOS may not give R much time in a long compute

2023-02-18 Thread Spencer Graves




On 2/18/23 4:34 PM, Simon Urbanek wrote:




On Feb 19, 2023, at 3:50 AM, Spencer Graves  wrote:

On 2/18/23 6:40 AM, Prof Brian Ripley wrote:

Are you using R.app (you failed to say)?



  I'm "using the newest version of RStudio" [Version 2022.12.0+353 
(2022.12.0+353)].  This means I am running R.app?




No, it means you're not using R, so please ask RStudio support since that is 
not under R's control (since RStudio is a web server there are many ways how 
this could matter).

Cheers,
Simon

PS: that made me think - if R is embedded in another application we should 
probably include that information in sessionInfo() to avoid confusion of R with 
other tools.



Agreed.  Thanks for all you do to help make it easier for people 
everywhere to understand the information available to them.  Spencer Graves


___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] macOS may not give R much time in a long compute

2023-02-18 Thread Simon Urbanek



> On Feb 19, 2023, at 3:50 AM, Spencer Graves  
> wrote:
> 
> On 2/18/23 6:40 AM, Prof Brian Ripley wrote:
>> Are you using R.app (you failed to say)?
> 
> 
> I'm "using the newest version of RStudio" [Version 2022.12.0+353 
> (2022.12.0+353)].  This means I am running R.app?
> 


No, it means you're not using R, so please ask RStudio support since that is 
not under R's control (since RStudio is a web server there are many ways how 
this could matter).

Cheers,
Simon

PS: that made me think - if R is embedded in another application we should 
probably include that information in sessionInfo() to avoid confusion of R with 
other tools.

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] macOS may not give R much time in a long compute

2023-02-18 Thread Spencer Graves




On 2/18/23 6:40 AM, Prof Brian Ripley wrote:

Are you using R.app (you failed to say)?



	  I'm "using the newest version of RStudio" [Version 2022.12.0+353 
(2022.12.0+353)].  This means I am running R.app?




If so, have you acted on the documentation about 'app nap'?  E.g. §4.1 
of the R-admin manual.



	  Thanks for the term "app nap" and the reference to §4.1 of the 
R-admin manual.  I had not previously heard of "app nap", but that 
sounds like what I've encountered, and that section of the manual 
suggests that if I encounter this problem again, I can open a terminal 
and enter:



defaults write org.R-project.R NSAppSleepDisabled -bool YES


  Will it take effect immediately?  Or will I need to restart R?


	  I've changed the code since I reported this problem, and I have not 
encountered this problem since.  I'm not sure, but when I noticed this 
problem, I may have had "if(max(et3i)>1800)" [progress report every 30 
minutes] instead of "if(max(et3i)>180)" [progress report every 3 
minutes].[*]  With luck, this change may fix this problem.  If yes, 
might you have any idea what the threshold might be?



  Thanks very much.
  Spencer Graves


[*] I'm not sure what threshold I was using when I encountered this 
problem:  180 or 1800 seconds.  I foolishly didn't save the output that 
included lines like the following:



iscan =  22992 ; et3i =  180 26 104


iscan =  32124 ; et3i =  22 1 180



On 18/02/2023 12:31, Spencer Graves wrote:

Hello:


   During a long compute (in a while loop), I've asked R to report 
progress via:



# Progress report every 3 minutes
   et3i <- proc.time()-startT3i
   if(max(et3i)>180){
 startT3i <- proc.time()
 cat('iscan = ', iscan3, '; et3i = ',
 round(et3i[1:3]), '\n')
   }


   When it's running properly, I get something like the following:


iscan =  22992 ; et3i =  180 26 104


   However if I leave my computer running unattended, I can get 
reports like the following:



iscan =  32124 ; et3i =  22 1 180


   Evidently, macOS 11.7.4 decided NOT to give time to R.


   Suggestions?
   Thanks,
   Spencer Graves


  sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.7.4

Matrix products: default
LAPACK: 
/Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib


locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.2.2 tools_4.2.2    knitr_1.42 xfun_0.37
 >





___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] macOS may not give R much time in a long compute

2023-02-18 Thread Prof Brian Ripley

Are you using R.app (you failed to say)?

If so, have you acted on the documentation about 'app nap'?  E.g. §4.1 
of the R-admin manual.


On 18/02/2023 12:31, Spencer Graves wrote:

Hello:


   During a long compute (in a while loop), I've asked R to report 
progress via:



# Progress report every 3 minutes
   et3i <- proc.time()-startT3i
   if(max(et3i)>180){
     startT3i <- proc.time()
     cat('iscan = ', iscan3, '; et3i = ',
     round(et3i[1:3]), '\n')
   }


   When it's running properly, I get something like the following:


iscan =  22992 ; et3i =  180 26 104


   However if I leave my computer running unattended, I can get 
reports like the following:



iscan =  32124 ; et3i =  22 1 180


   Evidently, macOS 11.7.4 decided NOT to give time to R.


   Suggestions?
   Thanks,
   Spencer Graves


  sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.7.4

Matrix products: default
LAPACK: 
/Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib


locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.2.2 tools_4.2.2    knitr_1.42 xfun_0.37
 >



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] macOS may not give R much time in a long compute

2023-02-18 Thread Spencer Graves

Hello:


	  During a long compute (in a while loop), I've asked R to report 
progress via:



# Progress report every 3 minutes
  et3i <- proc.time()-startT3i
  if(max(et3i)>180){
startT3i <- proc.time()
cat('iscan = ', iscan3, '; et3i = ',
round(et3i[1:3]), '\n')
  }


  When it's running properly, I get something like the following:


iscan =  22992 ; et3i =  180 26 104


	  However if I leave my computer running unattended, I can get reports 
like the following:



iscan =  32124 ; et3i =  22 1 180


  Evidently, macOS 11.7.4 decided NOT to give time to R.


  Suggestions?
  Thanks,
  Spencer Graves


 sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.7.4

Matrix products: default
LAPACK: 
/Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib


locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.2.2 tools_4.2.2knitr_1.42 xfun_0.37
>

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac