Compilation Printouts in R log file

My computing cluster updated its hardware leading to some complications [re]installing Stan. It works fine now, but [unlike earlier] whenever I compile a new/modified model (with stan(model,...)), the log file generated by R in batch mode saves about 1.5mb worth of compilation text.

Is there perhaps some easy way to stop this?

Running linux w/ Cent07 (details here) with rstan 2.17.3.

Session info and Makevars answers below:

writeLines(readLines(file.path(Sys.getenv("HOME"), ".R/Makevars")))

CXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function 

CXXFLAGS+= -Wno-unused-local-typedefs

CXXFLAGS+= -Wno-deprecated-declarations
Session info ------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.0 (2018-04-23)
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       EST5EDT,M3.2.0,M11.1.0      
 date     2018-06-28                  

Packages ----------------------------------------------------------------------
 package      * version   date       source        
 assertthat     0.2.0     2017-04-11 CRAN (R 3.5.0)
 BH             1.66.0-1  2018-02-13 CRAN (R 3.5.0)
 cli            1.0.0     2017-11-05 CRAN (R 3.5.0)
 colorspace     1.3-2     2016-12-14 CRAN (R 3.5.0)
 crayon         1.3.4     2017-09-16 CRAN (R 3.5.0)
 dichromat      2.0-0     2013-01-24 CRAN (R 3.5.0)
 digest         0.6.15    2018-01-28 CRAN (R 3.5.0)
 ggplot2        2.2.1     2016-12-30 CRAN (R 3.5.0)
 glue           1.2.0     2017-10-29 CRAN (R 3.5.0)
 graphics     * 3.5.0     2018-05-01 local         
 grDevices    * 3.5.0     2018-05-01 local         
 grid           3.5.0     2018-05-01 local         
 gridExtra      2.3       2017-09-09 CRAN (R 3.5.0)
 gtable         0.2.0     2016-02-26 CRAN (R 3.5.0)
 inline         0.3.14    2015-04-13 CRAN (R 3.5.0)
 labeling       0.3       2014-08-23 CRAN (R 3.5.0)
 lattice        0.20-35   2017-03-25 CRAN (R 3.5.0)
 lazyeval       0.2.1     2017-10-29 CRAN (R 3.5.0)
 magrittr       1.5       2014-11-22 CRAN (R 3.5.0)
 MASS           7.3-50    2018-04-30 CRAN (R 3.5.0)
 Matrix         1.2-14    2018-04-13 CRAN (R 3.5.0)
 methods      * 3.5.0     2018-05-01 local         
 munsell        0.5.0     2018-06-12 CRAN (R 3.5.0)
 pillar         1.2.3     2018-05-25 CRAN (R 3.5.0)
 plyr           1.8.4     2016-06-08 CRAN (R 3.5.0)
 R6             2.2.2     2017-06-17 CRAN (R 3.5.0)
 RColorBrewer   1.1-2     2014-12-07 CRAN (R 3.5.0)
 Rcpp           0.12.17   2018-05-18 CRAN (R 3.5.0)
 RcppEigen      0.3.3.4.0 2018-02-07 CRAN (R 3.5.0)
 reshape2       1.4.3     2017-12-11 CRAN (R 3.5.0)
 rlang          0.2.1     2018-05-30 CRAN (R 3.5.0)
 rstan          2.17.3    2018-01-20 CRAN (R 3.5.0)
 scales         0.5.0     2017-08-24 CRAN (R 3.5.0)
 StanHeaders    2.17.2    2018-01-20 CRAN (R 3.5.0)
 stats        * 3.5.0     2018-05-01 local         
 stats4         3.5.0     2018-05-01 local         
 stringi        1.2.3     2018-06-12 CRAN (R 3.5.0)
 stringr        1.3.1     2018-05-10 CRAN (R 3.5.0)
 tibble         1.4.2     2018-01-22 CRAN (R 3.5.0)
 tools          3.5.0     2018-05-01 local         
 utf8           1.1.4     2018-05-24 CRAN (R 3.5.0)
 utils        * 3.5.0     2018-05-01 local         
 viridisLite    0.3.0     2018-02-01 CRAN (R 3.5.0)

I’d recommend doing a “dummy” run on the computing cluster that used R but not RStan. That would make clear if it was an RStan problem or not.

Could you please clarify what you mean by ‘dummy run’? Do you mean compiling a stan script not in batch mode?

I mean a run with no RStan at all, just R. Doesn’t matter what you do in R since it’s a dummy run; you could just print “Hello world”.

There’s no issue with R. This only happens when stan files are recompiled with rstan. When rstan isn’t run or when it is run but the Stan script has already been compiled, there are no such messages/text.

What compiler are you using? -Wno-ignored-attributes can reduce the verboseness, and -Wno-unknown-pragmas can be useful if you are also using Rcpp and eigen.

1 Like

We try to squash these and usually do a good job so @bgoodri might know if there’s more you can do. It helps to have the warning messages you get if you can link that. It’s not a great situation and just compiling in a separate process might do better… sorry, no immediate solutions that I know of.

It is probably just adding CXXFLAGS += -Wno-something-else, depending on what are the warning messages that the compiler is emitting.

1 Like

Here’s an example - please let me know if it doesn’t work:

Thank you!

I found adding -w did the trick where no amount of -W seemed to. This was suggested by someone in another post I can’t find at the moment.

1 Like

Ah! Thanks very much for taking a look! Adding " -Wno-ignored-attributes " worked for me :)