university-of-newcastle-research / pmwg

Repository for code for the Samplers Team at UoN
4 stars 3 forks source link

If n_cores not specified, detect a common environment variable and set to that. #32

Closed gjcooper closed 11 months ago

gjcooper commented 4 years ago

It can be frustrating when running multi core jobs on PBS like systems to remember to change the number of cores used in both the script file that starts the run, and the R script that has the code.

If a value for n_cores is not provided, check the environment variables for commonly used settings on job submission platforms (is PBSPro, SLURM etc) and set the n_cores to that value.

gjcooper commented 11 months ago

Too much variability in likely environment variables, lets leave this up to the end user to specify for now.