futureverse / future.mirai

:rocket: R package future.mirai: A Future API for Parallel Processing using 'mirai'
https://future.mirai.futureverse.org/
22 stars 1 forks source link

future.tests: Tests with 'ff' fail (or times out) #1

Closed HenrikBengtsson closed 1 year ago

HenrikBengtsson commented 1 year ago
$ Rscript -e future.tests::check --args --test-plan="future.mirai::mirai_multisession" --test-tags=future,ff
── Settings ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
- future.tests version      : 0.6.0.9002
- R_FUTURE_TESTS_ROOT       : 
- Option 'future.tests.root': NULL
- Default test set folder   : /home/henrik/R/x86_64-pc-linux-gnu-library/4.2-CBI-gcc11/future.tests/test-db
- Max number of workers     : 2
- Timeout                   : N/A

── Running 4 test sets with plan(future.mirai::mirai_multisession) ─────────────────────────────────────────────────────────────────────
ℹ Backend package: future.mirai 0.0.0.9002
✔  1. future() - 'data.table' inject (1 test) (188ms)                           
✔  2. future() - can load 'ff' package (1 test) (123ms)                         
✔  3. future() - can attach 'ff' package (1 test) (111ms)                       
✖  4. future() - preserve R options (ff) (1 test) (670ms)                       
  ✖ lazy=FALSE, globals=TRUE, stdout=TRUE
    Error of class ‘simpleError’ with message:
    NULL value passed as symbol address
    Call:
    .Call(C_R_int_is_asc_break, x)
    Output:

Number of tests: 4
Number of test steps: 4
Duration: 1.2s
Results: 3 ok ✔ | 0 skips ★ | 1 error ✖ | 0 timeouts T
HenrikBengtsson commented 1 year ago

It only happens with the default daemon(n, dispatcher = TRUE). Using daemon(n, dispatcher = FALSE) seems to work.

HenrikBengtsson commented 1 year ago

If we run more tests prior to this, we get a TIMEOUT error, e.g.

$ Rscript -e future.tests::check --args --test-plan="future.mirai::mirai_multisession" --test-tags=future,ff
── Settings ───────────────────────────────────────────────────────────────────────────────────────────────
- future.tests version      : 0.6.0
- R_FUTURE_TESTS_ROOT       : 
- Option 'future.tests.root': NULL
- Default test set folder   : /home/henrik/R/x86_64-pc-linux-gnu-library/4.3-CBI-gcc11/future.tests/test-db
- Max number of workers     : 2
- Timeout                   : N/A

── Running 12 test sets with plan(future.mirai::mirai_multisession) ───────────────────────────────────────
ℹ Backend package: future.mirai 0.0.0.9006
✔  1. future() - conditions (1 test) (142ms)                                    
✔  2. future() - muffle conditions (1 test) (122ms)                             
✔  3. future() - rm() a global variable (2 tests) (220ms)                       
✔  4. future() - non-exported package objects (1 test) (151ms)                  
✔  5. future() - NSE '...' (1 test) (223ms)                                     
✔  6. future() - preserve R options (data.table) (1 test) (276ms)               
✔  7. future() - can load 'ff' package (1 test) (14ms)                          
✔  8. future() - 'data.table' inject (1 test) (117ms)                           
✔  9. future() - can attach 'ff' package (1 test) (12ms)                        
T 10. future() - preserve R options (ff) (1 test) (30.2s)                       
  T lazy=FALSE, globals=TRUE, stdout=TRUE (> 30s)
✔ 11. Random Number Generation (RNG) - future (2 tests) (404ms)                 
✔ 12. future() - standard output (2 tests) (258ms)                              

Number of tests: 12
Number of test steps: 15
Duration: 32.4s (including 1 timeouts)
Results: 14 ok ✔ | 0 skips ★ | 0 errors ✖ | 1 timeout T
HenrikBengtsson commented 1 year ago

This has been fixed in the next release of future.tests.