1 |
I just emerged sci-libs/scipy. I was unpleasantly surprised that the |
2 |
job only loaded one of my cpus most of the time, resulting in a longish |
3 |
wait (15-20 minutes). |
4 |
|
5 |
I investigated a bit. Originally, I had this in make.conf: |
6 |
|
7 |
MAKEOPTS="-j5" |
8 |
|
9 |
Then I had a look at the ebuild. I saw that it inherits |
10 |
multiprocessing.eclass and uses the makeopts_jobs function from it. |
11 |
Here is the function: |
12 |
|
13 |
makeopts_jobs() { |
14 |
[[ $# -eq 0 ]] && set -- "${MAKEOPTS}" |
15 |
# This assumes the first .* will be more greedy than the second .* |
16 |
# since POSIX doesn't specify a non-greedy match (i.e. ".*?"). |
17 |
local jobs=$(echo " $* " | sed -r -n \ |
18 |
-e 's:.*[[:space:]](-[a-z]*j|--jobs[=[:space:]])[[:space:]]*([0-9]+).*:\2:p' \ |
19 |
-e "s:.*[[:space:]](-[a-z]*j|--jobs)[[:space:]].*:${2:-999}:p") |
20 |
echo ${jobs:-1} |
21 |
} |
22 |
|
23 |
Looking at this it seems to require at least one space between the -j |
24 |
and the number! Isn't that an unwarranted assumption? |
25 |
|
26 |
So, I changed my make.conf to |
27 |
|
28 |
MAKEOPTS="-j 5" |
29 |
|
30 |
and rerun the build, but no joy - still no parallelization! Another |
31 |
closer look at the ebuild and I see this: |
32 |
|
33 |
python_compile() { |
34 |
${EPYTHON} tools/cythonize.py || die |
35 |
distutils-r1_python_compile \ |
36 |
$(usex python_targets_python3_5 "" "-j $(makeopts_jobs)") \ |
37 |
${SCIPY_FCONFIG} |
38 |
} |
39 |
|
40 |
and sure enough, I'm building for python3.5, so I guess makeopts_jobs is |
41 |
not even called and my MAKEOPTS are just ignored. Why - what is so |
42 |
special with python3.5 in the respect? Would it help to switch to python3.6? |
43 |
|
44 |
-- |
45 |
Please don't Cc: me privately on mailing lists and Usenet, |
46 |
if you also post the followup to the list or newsgroup. |
47 |
To reply privately _only_ on Usenet and on broken lists |
48 |
which rewrite From, fetch the TXT record for no-use.mooo.com. |