From 989f20ae58c3ecb0ce62bc4468c3dab2599637b3 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 14 Mar 2016 10:38:37 +0100 Subject: getconf for number of cores --- ext/lazar/extconf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/lazar/extconf.rb b/ext/lazar/extconf.rb index f466afb..edb960a 100644 --- a/ext/lazar/extconf.rb +++ b/ext/lazar/extconf.rb @@ -17,7 +17,7 @@ lib_dir = File.join openbabel_dir, "lib", "openbabel" ruby_src_dir = File.join src_dir, "scripts", "ruby" begin - nr_processors = `grep processor /proc/cpuinfo | wc -l` # speed up compilation, Linux only + nr_processors = `getconf _NPROCESSORS_ONLN`.to_i # should be POSIX compatible rescue nr_processors = 1 end -- cgit v1.2.3