Commit c8c81baa authored by Kirill Smelkov's avatar Kirill Smelkov

slaprunner: Build NumPy/friends & Ruby gems in parallel

Slaprunner tries to leverage multicore, and spawns multiple jobs when compiling software, based on `cpu-usage-ratio` parameter. But this currently have effect only on Make-based projects (via setting `MAKEFLAGS=-j<n>`) and does not affect software with different build systems.

Let's also provide support for parallel building for NumPy-based software and Ruby gems out of the box.

/cc @cedric.leninivin, @kazuhiko, @alain.takoudjou
/reviewed-by @jerome, @rafael  (on !22)
parents 2a3644dd fc40878c
......@@ -156,7 +156,7 @@ mode = 0644
[template-supervisord]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
md5sum = 069e593e50204b227bdb08d29d7292fd
md5sum = d294d0dafd265048399de6da8c96345f
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = supervisord.conf.in
download-only = true
......
......@@ -26,7 +26,9 @@ autorestart = {{ supervisord['autorestart'] }}
stdout_logfile = {{ supervisord['no_logfile'] }}
stderr_logfile = {{ supervisord['no_logfile'] }}
directory = {{ supervisord['directory'] }}
environment = PATH="{{- supervisord['path'] -}}",MAKEFLAGS="-j{{- '%d' % builtin.max(1, (multiprocessing.cpu_count() / builtin.int(slapparameter_dict.get('cpu-usage-ratio', 4)))) -}}"
{# how many parallel build jobs to spawn when compiling software -#}
{% set njobs = builtin.max(1, (multiprocessing.cpu_count() // builtin.int(slapparameter_dict.get('cpu-usage-ratio', 4)))) -%}
environment = PATH="{{- supervisord['path'] -}}",MAKEFLAGS="-j{{ njobs }}",NPY_NUM_BUILD_JOBS="{{ njobs }}",BUNDLE_JOBS="{{ njobs }}"
[program:{{- supervisord['slapgrid-cp'] -}}]
command = {{ supervisord['slapgrid-cp-command'] }}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment