Rstan based package and winbuilder -- out of memory allocating


#1

Are other package maintainers having success with winbuilder? ctsem is working fine for me locally (win64 and ubuntu), on Travis CI (whatever the default *nix OS is), and on the Debian CRAN pre-check, but winbuilder and CRAN windows pre check fail with:

* installing *source* package 'ctsem' ...
** libs

*** arch - i386
"D:/RCompile/recent/R/bin/i386/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/ctsm.stan
Registered S3 methods overwritten by 'ggplot2':
  method         from 
  [.quosures     rlang
  c.quosures     rlang
  print.quosures rlang
Registered S3 method overwritten by 'dplyr':
  method               from  
  as.data.frame.tbl_df tibble
DIAGNOSTIC(S) FROM PARSER:
Info: left-hand side variable (name=o) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=o) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sMANIFESTVAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sT0VAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=ukfmeasures) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=merrorstates) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=ukfmeasures) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sMANIFESTVAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sT0VAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=ukfmeasures) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=merrorstates) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=ukfmeasures) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=pop_DIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=pop_MANIFESTVAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=pop_T0VAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.

Wrote C++ file "stan_files/ctsm.cc"
d:/Compiler/gcc-4.9.3/mingw_32/bin/g++   -std=gnu++14  -I"D:/RCompile/recent/R/include" -DNDEBUG -I"../inst/include" -I"`"D:/RCompile/recent/R/bin/i386/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -I"`"D:/RCompile/recent/R/bin/i386/Rscript" --vanilla -e "cat(system.file('include', 'boost_not_in_BH', package = 'rstan'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_NO_CXX11_RVALUE_REFERENCES -I"d:/RCompile/CRANpkg/lib/3.6/StanHeaders/include" -I"d:/RCompile/CRANpkg/lib/3.6/rstan/include" -I"d:/RCompile/CRANpkg/lib/3.6/BH/include" -I"d:/RCompile/CRANpkg/lib/3.6/Rcpp/include" -I"d:/RCompile/CRANpkg/lib/3.6/RcppEigen/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2  -c stan_files/ctsm.cc -o stan_files/ctsm.o

cc1plus.exe: out of memory allocating 15295104 bytes
make: *** [stan_files/ctsm.o] Error 1
rm stan_files/ctsm.cc
ERROR: compilation failed for package 'ctsem'
* removing 'd:/RCompile/CRANguest/R-devel/lib/ctsem'
In R CMD INSTALL

Cc1plus.exe: out of memory allocating 65536 bytes
#2

In general, rstanarm and similar packages seem to be fine on Winbuilder. We may have to work on making ctsem consume less RAM during compilation.


#3

Ok. Do you know if 2.18 increased compilation RAM requirements? The .stan file ctsem compiles has not changed in size. At the moment the .stan contains a heap of repetition for generated quantities, is this likely to increase compile memory usage? Any general suggestions?


#4

It is likely due to changing to C++14 particularly with the 32bit mode, which was not very optimized. How difficult would it be to move (some of the) generated quantities calculations to R?


#5

The issue is that 800 odd lines of kalman filter type setup are repeated in generated quantities – this can’t be thrown out to R. I’ve wondered about putting it in a separate model and then calling transformed_pars using the original draws on this new model – I guess this should work, but is there any way I can append the new output on to the old output, to save adapting various functions (which I guess may be a short term adaptation if an improved approach for generated quantities appears).


#6

I have started to implement the standalone generated quantities thing in rstan, but I am not sure it is going to help you here because CRAN compiles in parallel. So, then it would be compiling two big Stan things whose combined size is on the order of the 2000 line thing you have now.

So, can you first try adding -flto -ffat-lto-objects to PKG_CPPFLAGS in src/Makevars.win and let’s see if that is sufficient to get it going on winbuilder.


#7

unfortunately no :(

* installing *source* package 'ctsem' ...
** libs

*** arch - i386
"D:/RCompile/recent/R/bin/i386/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/ctsm.stan
Registered S3 methods overwritten by 'ggplot2':
  method         from 
  [.quosures     rlang
  c.quosures     rlang
  print.quosures rlang
Registered S3 method overwritten by 'dplyr':
  method               from  
  as.data.frame.tbl_df tibble
DIAGNOSTIC(S) FROM PARSER:
Info: left-hand side variable (name=o) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=o) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sMANIFESTVAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sT0VAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=ukfmeasures) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=merrorstates) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=ukfmeasures) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sMANIFESTVAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=sT0VAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=etacov) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=discreteDIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=eta) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=ukfmeasures) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=merrorstates) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=ukfmeasures) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=pop_DIFFUSION) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=pop_MANIFESTVAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
Info: left-hand side variable (name=pop_T0VAR) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.

Wrote C++ file "stan_files/ctsm.cc"
d:/Compiler/gcc-4.9.3/mingw_32/bin/g++   -std=gnu++14  -I"D:/RCompile/recent/R/include" -DNDEBUG -flto -ffat-lto-objects -I"../inst/include" -I"`"D:/RCompile/recent/R/bin/i386/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -I"`"D:/RCompile/recent/R/bin/i386/Rscript" --vanilla -e "cat(system.file('include', 'boost_not_in_BH', package = 'rstan'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_NO_CXX11_RVALUE_REFERENCES -I"d:/RCompile/CRANpkg/lib/3.6/StanHeaders/include" -I"d:/RCompile/CRANpkg/lib/3.6/rstan/include" -I"d:/RCompile/CRANpkg/lib/3.6/BH/include" -I"d:/RCompile/CRANpkg/lib/3.6/Rcpp/include" -I"d:/RCompile/CRANpkg/lib/3.6/RcppEigen/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2  -c stan_files/ctsm.cc -o stan_files/ctsm.o

cc1plus.exe: out of memory allocating 15295104 bytes
make: *** [stan_files/ctsm.o] Error 1
rm stan_files/ctsm.cc
ERROR: compilation failed for package 'ctsem'
* removing 'd:/RCompile/CRANguest/R-devel/lib/ctsem'
In R CMD INSTALL

#8

I can compile it from GitHub on Windows if I don’t multiarch, but the 32bit case is giving me the same error message as winbuilder.


#9

I think the 32bit compiler is hitting the 4GB limit that it can access while compiling your Stan program rather than the physical memory limit of the machine. I would suggest trying to consolidate your Stan program into fewer declarations. To take one example,


this could be

matrix[nindvarying, nindvarying] rawpopc[2]; // 1st=cov and 2nd=corr

that will take up the same amount of RAM at runtime but is one fewer declaration that the compiler has to navigate through Eigen’s template metaprogramming.


#10

Thanks for looking into this. So that at least suggests separating gen quantities could help, so far as I interpret. I’ll see what can be done, hopefully the posterior predictive checks don’t need to be removed…
edit: the memory limit for win32 turns out to be 2gb, actually…


#11

Everyone used to run into this problem constantly in the 90s and early 00s until everything went 64 bit. If you don’t mind sharing, could you explain what hardware is forcing you to run on 32-bit Windows? How old is the machine?

One alternative you may be able to track down at a company or university would be a remote cluster or just a remote server you could run on. That also has the advantage of not tying up your own machine. It has the disadvantage of requiring lots of file transfer.

When we refactor the parser, the big memory requirements for compiling from source problem will go away, but compiling the models will remain expensive. That burden will go down as we refactor into more precompiled units (we’re hoping to cut compile time in half or more over the next year).

I think there may be ways to configure the OS to use 4GB, even in Windows. See:


#12

Think there’s some confusion Bob – CRAN is forcing this :)


#13

Specifically CRAN builds binaries that contain both the 32bit and the 64bit shared objects, on both Windows and Mac.


#14

Thanks for the clarification. It did seem strange that anyone would actually have a 32-bit machine these days.


#15

I think it is more 64bit machines that run 32bit R due to some legacy program that they need.


#16

Does anyone know how I might set it to compile a different .stan file if win32 is in use?


#17

You would have to put conditionals into the Makefile.win . Instead of unconditionally doing SOURCES = $(wildcard stan_files/*.stan) you would need to switch based on the bitness.


#18

Right, yes. Replacing the sources line with:

ifeq "$(WIN)" "64"
SOURCES = $(wildcard stan_files/ctsm.stan)
else
SOURCES = $(wildcard stan_files/ctsmW32.stan)
endif 

seems to achieve that, but then I get the wonderful:

Error in is(module, "character") : object 'm' not found

error when the build process loops around to building docs (on any OS). When I rename the W32.stan file to .bak instead, I can build find (w64 and ubuntu). Any idea where things might be going wrong having the extra, uncompiled .stan file?


#19

#20

Thanks! And for those following along in the future, that line now includes a conditional that checks for 32 bit:

  stan_files <- file.path(MODELS_HOME, 
    ifelse(.Machine$sizeof.pointer == 4, "stan_files/ctsmW32.stan", "stan_files/ctsm.stan" ))

edit: argh but still seems to fail if the build / check is multiarch…

* installing *source* package 'ctsem' ...
** libs

*** arch - i386
"C:/PROGRA~1/R/R-35~1.0/bin/i386/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/ctsmW32.stan
C:/Rtools/mingw_32/bin/g++ -m32 -std=c++1y  -I"C:/PROGRA~1/R/R-35~1.0/include" -DNDEBUG -I"../inst/include" -I"`"C:/PROGRA~1/R/R-35~1.0/bin/i386/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -I"`"C:/PROGRA~1/R/R-35~1.0/bin/i386/Rscript" --vanilla -e "cat(system.file('include', 'boost_not_in_BH', package = 'rstan'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_NO_CXX11_RVALUE_REFERENCES -I"C:/Users/driver/Documents/R/win-library/3.5/StanHeaders/include" -I"C:/Users/driver/Documents/R/win-library/3.5/rstan/include" -I"C:/Users/driver/Documents/R/win-library/3.5/BH/include" -I"C:/Users/driver/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/driver/Documents/R/win-library/3.5/RcppEigen/include"        -O3 -mtune=native  -c init.cpp -o init.o

Wrote C++ file "stan_files/ctsmW32.cc"
C:/Rtools/mingw_32/bin/g++ -m32 -std=c++1y  -I"C:/PROGRA~1/R/R-35~1.0/include" -DNDEBUG -I"../inst/include" -I"`"C:/PROGRA~1/R/R-35~1.0/bin/i386/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -I"`"C:/PROGRA~1/R/R-35~1.0/bin/i386/Rscript" --vanilla -e "cat(system.file('include', 'boost_not_in_BH', package = 'rstan'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_NO_CXX11_RVALUE_REFERENCES -I"C:/Users/driver/Documents/R/win-library/3.5/StanHeaders/include" -I"C:/Users/driver/Documents/R/win-library/3.5/rstan/include" -I"C:/Users/driver/Documents/R/win-library/3.5/BH/include" -I"C:/Users/driver/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/driver/Documents/R/win-library/3.5/RcppEigen/include"        -O3 -mtune=native  -c stan_files/ctsmW32.cc -o stan_files/ctsmW32.o
C:/Rtools/mingw_32/bin/g++ -m32 -std=c++1y -shared -s -static-libgcc -o ctsem.dll tmp.def stan_files/ctsmW32.o init.o -LC:/PROGRA~1/R/R-35~1.0/bin/i386 -lR
rm stan_files/ctsmW32.cc
Warning messages:
1: In FUN(X[[i]], ...) : this requires 'nm' to be on the PATH
2: In FUN(X[[i]], ...) : this requires 'nm' to be on the PATH
installing to C:/Users/driver/Dropbox/MPIB/CT-SEM/ctsem.Rcheck/ctsem/libs/i386

*** arch - x64
"C:/PROGRA~1/R/R-35~1.0/bin/x64/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/ctsm.stan
C:/Rtools/mingw_64/bin/g++ -m64 -std=c++1y  -I"C:/PROGRA~1/R/R-35~1.0/include" -DNDEBUG -I"../inst/include" -I"`"C:/PROGRA~1/R/R-35~1.0/bin/x64/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -I"`"C:/PROGRA~1/R/R-35~1.0/bin/x64/Rscript" --vanilla -e "cat(system.file('include', 'boost_not_in_BH', package = 'rstan'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_NO_CXX11_RVALUE_REFERENCES -I"C:/Users/driver/Documents/R/win-library/3.5/StanHeaders/include" -I"C:/Users/driver/Documents/R/win-library/3.5/rstan/include" -I"C:/Users/driver/Documents/R/win-library/3.5/BH/include" -I"C:/Users/driver/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/driver/Documents/R/win-library/3.5/RcppEigen/include"        -O3 -mtune=native  -c init.cpp -o init.o

Wrote C++ file "stan_files/ctsm.cc"
C:/Rtools/mingw_64/bin/g++ -m64 -std=c++1y  -I"C:/PROGRA~1/R/R-35~1.0/include" -DNDEBUG -I"../inst/include" -I"`"C:/PROGRA~1/R/R-35~1.0/bin/x64/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -I"`"C:/PROGRA~1/R/R-35~1.0/bin/x64/Rscript" --vanilla -e "cat(system.file('include', 'boost_not_in_BH', package = 'rstan'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_NO_CXX11_RVALUE_REFERENCES -I"C:/Users/driver/Documents/R/win-library/3.5/StanHeaders/include" -I"C:/Users/driver/Documents/R/win-library/3.5/rstan/include" -I"C:/Users/driver/Documents/R/win-library/3.5/BH/include" -I"C:/Users/driver/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/driver/Documents/R/win-library/3.5/RcppEigen/include"        -O3 -mtune=native  -c stan_files/ctsm.cc -o stan_files/ctsm.o
C:/Rtools/mingw_64/bin/g++ -m64 -std=c++1y -shared -s -static-libgcc -o ctsem.dll tmp.def stan_files/ctsm.o init.o -LC:/PROGRA~1/R/R-35~1.0/bin/x64 -lR
rm stan_files/ctsm.cc
Warning messages:
1: In FUN(X[[i]], ...) : this requires 'nm' to be on the PATH
2: In FUN(X[[i]], ...) : this requires 'nm' to be on the PATH
installing to C:/Users/driver/Dropbox/MPIB/CT-SEM/ctsem.Rcheck/ctsem/libs/x64
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
Warning: package 'Rcpp' was built under R version 3.5.1
Warning: package 'OpenMx' was built under R version 3.5.1
Error: package or namespace load failed for 'ctsem' in .doLoadActions(where, attach):
 error in load action .__A__.1 for package ctsem: is(module, "character"): object 'm' not found
Error: loading failed
Execution halted
*** arch - x64
Warning: package 'Rcpp' was built under R version 3.5.1
Warning: package 'OpenMx' was built under R version 3.5.1
ERROR: loading failed for 'i386'
* removing 'C:/Users/driver/Dropbox/MPIB/CT-SEM/ctsem.Rcheck/ctsem'
In R CMD INSTALL

and winbuilder devel is not getting very far, hopefully it’s just a dev issue and not some kind of policy change. It complains:

* installing *source* package 'ctsem' ...
** libs

*** arch - i386
"D:/RCompile/recent/R/bin/i386/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/ctsmW32.stan
Registered S3 methods overwritten by 'ggplot2':
  method         from 
  [.quosures     rlang
  c.quosures     rlang
  print.quosures rlang
Registered S3 method overwritten by 'dplyr':
  method               from  
  as.data.frame.tbl_df tibble
Error in file.remove(tf) : 
  (converted from warning) cannot remove file 'D:\temp\RtmpKY4WWw\file2102038d62690', reason 'Permission denied'
Calls: make_cc -> <Anonymous> -> file.remove
Execution halted
make: *** [stan_files/ctsmW32.cc] Error 1
ERROR: compilation failed for package 'ctsem'
* removing 'd:/RCompile/CRANguest/R-devel/lib/ctsem'
In R CMD INSTALL