saezlab / CARNIVAL

CAusal Reasoning for Network Identification with integer VALue programming in R
https://saezlab.github.io/CARNIVAL/
57 stars 29 forks source link

CBC multithreading arguments #62

Closed ahmedasadik closed 2 years ago

ahmedasadik commented 3 years ago

Dear @ivanovaos as we discussed in this issue #61, I would suggest that we add two additional options to be sent to the CBC solver command line. Those would be: threads and randomseed , which would help speed up CBC that was built with support for multithreading by adding that option to the config file ./configure --enable-cbc-parallel Many thanks!! Ahmed

gabora commented 2 years ago

thanks @ahmedasadik for your comments. the threads option is available in the current version. I just updated the documentation of runCARNIVAL documentation

It works nicely with some test networks, with 4 threads the wall time was reduced from 60 to 20 sec.

gabora commented 2 years ago

some additional notes: There is no need to start parallel sessions with the future package. CARNIVAL uses the interactive interface of cbc, so multithreading is handled completely outside of the R environment. Just run runCARNIVAL(..., threads = 4,...) to use 4 threads.