check_cores: Check number of available CPUs

View source: R/check_cores.R

check_coresR Documentation

Check number of available CPUs

Description

This function checks for the number of available CPUs (cores) available on the user's machine. This is formatted for parallel processing on a SLURM-directed HPC system, but any *nix-like machine can multithread here as well. If a Windows OS is detected, this function automatically returns 1 to run on a single core.

Usage

check_cores()

Details

It is recommended to save this value to be called from multithreaded bngal functions such as bngal::color_nodes

Examples

n.cores <- bngal::check_cores()

mselensky/bngal documentation built on June 3, 2024, 6:27 a.m.