Weiming-Hu / AnalogsEnsemble

The C++ and R packages for parallel ensemble forecasts using Analog Ensemble
https://weiming-hu.github.io/AnalogsEnsemble/
MIT License
18 stars 5 forks source link

R session terminates after "fatal error" in "demo-3_operational-search.Rmd" #90

Closed map579 closed 4 years ago

map579 commented 4 years ago

The current tutorial for demo 3 using the operational search configuration (date: February 12, 2019) results in a fatal error when generating analogs (line 104). The R session terminates and it reloads.

Mark

Weiming-Hu commented 4 years ago

Hi Mark. Thank you for finding this bug. I have commit a hot fix 3580cecdc5766bda898462fd8382db9bfb248bb9. Please update your version to 4.0.2 and try this tutorial again.

map579 commented 4 years ago

Thank you for updating the tutorial! Unfortunately, the updated version does not install without an error:

** libs

arch - i386 C:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-3.6.3/include" -DNDEBUG -I"C:/Users/spark/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/spark/Documents/R/win-library/3.6/BH/include" -fopenmp -D_DISABLE_NON_HEADER_BOOST -O2 -Wall -mtune=core2 -c AnEn.cpp -o AnEn.o C:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-3.6.3/include" -DNDEBUG -I"C:/Users/spark/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/spark/Documents/R/win-library/3.6/BH/include" -fopenmp -D_DISABLE_NON_HEADER_BOOST -O2 -Wall -mtune=core2 -c AnEnIS.cpp -o AnEnIS.o C:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-3.6.3/include" -DNDEBUG -I"C:/Users/spark/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/spark/Documents/R/win-library/3.6/BH/include" -fopenmp -D_DISABLE_NON_HEADER_BOOST -O2 -Wall -mtune=core2 -c AnEnSSE.cpp -o AnEnSSE.o C:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-3.6.3/include" -DNDEBUG -I"C:/Users/spark/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/spark/Documents/R/win-library/3.6/BH/include" -fopenmp -D_DISABLE_NON_HEADER_BOOST -O2 -Wall -mtune=core2 -c Array4DPointer.cpp -o Array4DPointer.o Array4DPointer.cpp: In member function 'virtual void Array4DPointer::subset(const std::vector&, const std::vector&, const std::vector&, const std::vector&, Array4D&) const': Array4DPointer.cpp:109:88: error: 'runtime_error' was not declared in this scope if (!sorted) throw runtime_error("Subset indices must be sorted in ascension order"); ^ make: [C:/PROGRA~1/R/R-3.6.3/etc/i386/Makeconf:215: Array4DPointer.o] Error 1 ERROR: compilation failed for package 'RAnEn'

Weiming-Hu commented 4 years ago

It looks like Windows is being more strict on including header files. I have include the missing files in eb3a3125e3ced5a4350d1e93bae70c3ed4ea154d. Please install again for me and let's see whether I have missed anything.

Unfortunately I can't test this ahead of time before I don't have a Windows machine. Thanks.

map579 commented 4 years ago

No problem. Things are good now. I can confirm that RAnEn 4.0.2 installs on my Windows laptop, that the updated tutorial for demo-3 works fine, and the operational search functionality works well with my data. Thank you!