xuyiqing / gsynth

Generalized Synthetic Control Method
Other
132 stars 40 forks source link

Misleading parameter name `cores` #9

Open inkrement opened 6 years ago

inkrement commented 6 years ago

The function gsynth has a parameter called cores, which is defined as

an integer indicating the number of cores to be used in parallel computing. If not specified, the algorithm will use the maximum number of logical cores of your computer (warning: this could prevent you from multi-tasking on your computer)

It seems like this is not the number of cores which are used. Instead it defines the number of processes. Specifically, each of those processes can use (at least for some tasks) multiple cores. Fore example, on my test system this parameter was set to 4, but those 4 processes utilised all 32 physical cores.

liulch commented 6 years ago

You are right. I think it should be the number of processes after reading this page http://www.parallelr.com/r-with-parallel-computing/ . We named it cores because if this option is left blank, the function detectCores() from package parallel will be called.

inkrement commented 6 years ago

Ok I see, but a small note in the docs would be useful :)