[bug#33284] python: Honor '--cores=...' in tests.

Message ID 20181105202344.0cab8e1e@centurylink.net
State Accepted
Headers show
Series [bug#33284] python: Honor '--cores=...' in tests. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Eric Bavier Nov. 6, 2018, 2:23 a.m. UTC
Hello Guix,

I noticed building 'python-minimal' that its tests seemed to have poor
memory performance, i.e. using *a lot* of RAM.  I thought maybe
dropping --cores=... would help, but it did not; the tests use all
available cores by default.  The attached patch fixes this issue,
though, the package still uses all cores while building some extension
libraries.

I suppose this patch would go to core-updates?

Cheers,
`~Eric

Comments

Mathieu Othacehe Nov. 6, 2018, 5:07 a.m. UTC | #1
Hi Eric,

Your patch seems go to me, even if I think the root cause of your problem
is fixed by:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33186#26

I think that both could be applied to core-updates.

Thanks,

Mathieu

Le mar. 6 nov. 2018 11:27, Eric Bavier <ericbavier@centurylink.net> a
écrit :

> Hello Guix,
>
> I noticed building 'python-minimal' that its tests seemed to have poor
> memory performance, i.e. using *a lot* of RAM.  I thought maybe
> dropping --cores=... would help, but it did not; the tests use all
> available cores by default.  The attached patch fixes this issue,
> though, the package still uses all cores while building some extension
> libraries.
>
> I suppose this patch would go to core-updates?
>
> Cheers,
> `~Eric
>
Eric Bavier Nov. 6, 2018, 2:52 p.m. UTC | #2
Hello Mathieu,

On Tue, 6 Nov 2018 14:07:47 +0900
Mathieu Othacehe <m.othacehe@gmail.com> wrote:

> Hi Eric,
> 
> Your patch seems go to me, even if I think the root cause of your problem
> is fixed by:
> 
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33186#26
> 
> I think that both could be applied to core-updates.

Thanks for the link; it looks like it should help.  But, yes, I think
both can be applied.

> 
> Le mar. 6 nov. 2018 11:27, Eric Bavier <ericbavier@centurylink.net> a
> écrit :
> 
> > Hello Guix,
> >
> > I noticed building 'python-minimal' that its tests seemed to have poor
> > memory performance, i.e. using *a lot* of RAM.  I thought maybe
> > dropping --cores=... would help, but it did not; the tests use all
> > available cores by default.  The attached patch fixes this issue,
> > though, the package still uses all cores while building some extension
> > libraries.
> >
> > I suppose this patch would go to core-updates?
> >
> > Cheers,
> > `~Eric
> >
Marius Bakke Nov. 6, 2018, 4 p.m. UTC | #3
Eric Bavier <ericbavier@centurylink.net> writes:

> Hello Mathieu,
>
> On Tue, 6 Nov 2018 14:07:47 +0900
> Mathieu Othacehe <m.othacehe@gmail.com> wrote:
>
>> Hi Eric,
>> 
>> Your patch seems go to me, even if I think the root cause of your problem
>> is fixed by:
>> 
>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33186#26
>> 
>> I think that both could be applied to core-updates.
>
> Thanks for the link; it looks like it should help.  But, yes, I think
> both can be applied.

Note that the broken test has already been removed on 'core-updates'.

Eric: can you push a 'python-updates' branch?  I wonder if we have time
for a "half-rebuild" before the next 'core-updates' round; I've got some
other heavy-impact patches in my pipeline (Glib, Cairo, ++).

The patch LGTM.
Eric Bavier Nov. 7, 2018, 1:22 a.m. UTC | #4
On Tue, 06 Nov 2018 17:00:01 +0100
Marius Bakke <mbakke@fastmail.com> wrote:

> Eric Bavier <ericbavier@centurylink.net> writes:
> 
> > Hello Mathieu,
> >
> > On Tue, 6 Nov 2018 14:07:47 +0900
> > Mathieu Othacehe <m.othacehe@gmail.com> wrote:
> >  
> >> Hi Eric,
> >> 
> >> Your patch seems go to me, even if I think the root cause of your problem
> >> is fixed by:
> >> 
> >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33186#26
> >> 
> >> I think that both could be applied to core-updates.  
> >
> > Thanks for the link; it looks like it should help.  But, yes, I think
> > both can be applied.  
> 
> Note that the broken test has already been removed on 'core-updates'.
> 
> Eric: can you push a 'python-updates' branch?  I wonder if we have time
> for a "half-rebuild" before the next 'core-updates' round; I've got some
> other heavy-impact patches in my pipeline (Glib, Cairo, ++).
> 
> The patch LGTM.

Sure, I can push this to a new branch.  Thanks for the review.

`~Eric
Eric Bavier Nov. 7, 2018, 2:18 a.m. UTC | #5
On Tue, 6 Nov 2018 19:22:37 -0600
Eric Bavier <ericbavier@centurylink.net> wrote:

> On Tue, 06 Nov 2018 17:00:01 +0100
> Marius Bakke <mbakke@fastmail.com> wrote:
>
> > Eric: can you push a 'python-updates' branch?  I wonder if we have time
> > for a "half-rebuild" before the next 'core-updates' round; I've got some
> > other heavy-impact patches in my pipeline (Glib, Cairo, ++).
> > 
> > The patch LGTM.  
> 
> Sure, I can push this to a new branch.

Oops, there's already a 'python-updates' branch on savannah.  Should
that branch be deleted, or force-pushed? (sorry, haven't paid much
attention to our branch management...)

`~Eric
Eric Bavier Nov. 17, 2018, 6:45 a.m. UTC | #6
On Tue, 06 Nov 2018 17:00:01 +0100
Marius Bakke <mbakke@fastmail.com> wrote:

> Eric Bavier <ericbavier@centurylink.net> writes:
> 
> > Hello Mathieu,
> >
> > On Tue, 6 Nov 2018 14:07:47 +0900
> > Mathieu Othacehe <m.othacehe@gmail.com> wrote:
> >  
> >> Hi Eric,
> >> 
> >> Your patch seems go to me, even if I think the root cause of your problem
> >> is fixed by:
> >> 
> >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33186#26
> >> 
> >> I think that both could be applied to core-updates.  
> >
> > Thanks for the link; it looks like it should help.  But, yes, I think
> > both can be applied.  
> 
> Note that the broken test has already been removed on 'core-updates'.
> 
> Eric: can you push a 'python-updates' branch?  I wonder if we have time
> for a "half-rebuild" before the next 'core-updates' round; I've got some
> other heavy-impact patches in my pipeline (Glib, Cairo, ++).
> 
> The patch LGTM.

I've pushed this to the core-updates-next branch in commit
5b01b6034aeab32a5011c5757f18bd9772d3497d

`~Eric

Patch

From 076d2f7f32a51f90f85be3da836d208987e9c678 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Thu, 1 Nov 2018 21:18:41 -0500
Subject: [PATCH] python: Honor '--cores=...' in tests.

* gnu/packages/python.scm (python-2.7)[arguments]: Add #:make-flags.
---
 gnu/packages/python.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index fbb280224..9a8b9dfcf 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -206,6 +206,9 @@ 
              "--enable-unicode=ucs4"
              (string-append "LDFLAGS=-Wl,-rpath="
                             (assoc-ref %outputs "out") "/lib"))
+       ;; With no -j argument tests use all available cpus, so provide one.
+       #:make-flags
+       (list (format #f "EXTRATESTOPTS=-j~d" (parallel-job-count)))
 
         #:modules ((ice-9 ftw) (ice-9 match)
                    (guix build utils) (guix build gnu-build-system))
-- 
2.19.1