* [gentoo-python] [distutils-r1] Improvements to parallel builds
@ 2012-12-06 10:54 Michał Górny
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 1/4] Don't rely on phase function return code Michał Górny
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Michał Górny @ 2012-12-06 10:54 UTC (permalink / raw
To: gentoo-python; +Cc: python
A two quick improvements to parallel builds using distutils-r1.
1) use post-fork mode to avoid early output
In other words, you no longer see 'running X for Y' before it is
actually being run.
2) create split logs for each implementation
Aside to the usual soup on stdout, the eclass writes separate build logs
for each implementation to ${T}/build-${EPYTHON}.log.
TODO: replace tee with an awesome use of multitail to display logs
of currently running builds on split-screen.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-python] [PATCH distutils-r1 1/4] Don't rely on phase function return code.
2012-12-06 10:54 [gentoo-python] [distutils-r1] Improvements to parallel builds Michał Górny
@ 2012-12-06 10:54 ` Michał Górny
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 2/4] Use post-fork mode to avoid early output Michał Górny
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2012-12-06 10:54 UTC (permalink / raw
To: gentoo-python; +Cc: python, Michał Górny
It prohibits constructs like 'use x && y', and is not really necessary
when '|| die' should be used there anyway.
---
gx86/eclass/distutils-r1.eclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index b1b3f90..9e37a56 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -380,9 +380,9 @@ distutils-r1_run_phase() {
fi
if [[ ${DISTUTILS_NO_PARALLEL_BUILD} ]]; then
- "${@}" || die "${1} failed."
+ "${@}"
else
- multijob_child_init "${@}" || die "${1} failed."
+ multijob_child_init "${@}"
fi
if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
--
1.8.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-python] [PATCH distutils-r1 2/4] Use post-fork mode to avoid early output.
2012-12-06 10:54 [gentoo-python] [distutils-r1] Improvements to parallel builds Michał Górny
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 1/4] Don't rely on phase function return code Michał Górny
@ 2012-12-06 10:54 ` Michał Górny
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 3/4] multiprocessing: use the expanded call form Michał Górny
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2012-12-06 10:54 UTC (permalink / raw
To: gentoo-python; +Cc: python, Michał Górny
In pre-fork mode, we first output 'running phase', then check for jobs.
Therefore, the output for (n+1)th phase goes too early. Using post-fork
mode fixes that.
---
gx86/eclass/distutils-r1.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index 9e37a56..1006813 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -382,7 +382,7 @@ distutils-r1_run_phase() {
if [[ ${DISTUTILS_NO_PARALLEL_BUILD} ]]; then
"${@}"
else
- multijob_child_init "${@}"
+ multijob_child_init --post "${@}"
fi
if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
--
1.8.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-python] [PATCH distutils-r1 3/4] multiprocessing: use the expanded call form.
2012-12-06 10:54 [gentoo-python] [distutils-r1] Improvements to parallel builds Michał Górny
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 1/4] Don't rely on phase function return code Michał Górny
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 2/4] Use post-fork mode to avoid early output Michał Górny
@ 2012-12-06 10:54 ` Michał Górny
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 4/4] Create split logs when doing parallel builds Michał Górny
2012-12-06 17:28 ` [gentoo-python] Re: [distutils-r1] Improvements to " Mike Gilbert
4 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2012-12-06 10:54 UTC (permalink / raw
To: gentoo-python; +Cc: python, Michał Górny
The short one doesn't want to work with pipes, for some reason.
---
gx86/eclass/distutils-r1.eclass | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index 1006813..8ba2aa8 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -382,7 +382,11 @@ distutils-r1_run_phase() {
if [[ ${DISTUTILS_NO_PARALLEL_BUILD} ]]; then
"${@}"
else
- multijob_child_init --post "${@}"
+ (
+ multijob_child_init
+ "${@}"
+ ) &
+ multijob_post_fork
fi
if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
--
1.8.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-python] [PATCH distutils-r1 4/4] Create split logs when doing parallel builds.
2012-12-06 10:54 [gentoo-python] [distutils-r1] Improvements to parallel builds Michał Górny
` (2 preceding siblings ...)
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 3/4] multiprocessing: use the expanded call form Michał Górny
@ 2012-12-06 10:54 ` Michał Górny
2012-12-06 17:28 ` [gentoo-python] Re: [distutils-r1] Improvements to " Mike Gilbert
4 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2012-12-06 10:54 UTC (permalink / raw
To: gentoo-python; +Cc: python, Michał Górny
Therefore, making it possible to get a non-ugly build log for each
implementation used.
---
gx86/eclass/distutils-r1.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index 8ba2aa8..a0c6f6b 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -384,7 +384,7 @@ distutils-r1_run_phase() {
else
(
multijob_child_init
- "${@}"
+ "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
) &
multijob_post_fork
fi
--
1.8.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-python] Re: [distutils-r1] Improvements to parallel builds
2012-12-06 10:54 [gentoo-python] [distutils-r1] Improvements to parallel builds Michał Górny
` (3 preceding siblings ...)
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 4/4] Create split logs when doing parallel builds Michał Górny
@ 2012-12-06 17:28 ` Mike Gilbert
2012-12-06 17:40 ` Michał Górny
4 siblings, 1 reply; 7+ messages in thread
From: Mike Gilbert @ 2012-12-06 17:28 UTC (permalink / raw
To: Michał Górny; +Cc: gentoo-python, python
On Thu, Dec 6, 2012 at 5:54 AM, Michał Górny <mgorny@gentoo.org> wrote:
> A two quick improvements to parallel builds using distutils-r1.
>
>
> 1) use post-fork mode to avoid early output
>
> In other words, you no longer see 'running X for Y' before it is
> actually being run.
>
I assume you know what you are doing here; I'm not that familiar with
the multiprocessing eclass.
>
> 2) create split logs for each implementation
>
> Aside to the usual soup on stdout, the eclass writes separate build logs
> for each implementation to ${T}/build-${EPYTHON}.log.
>
> TODO: replace tee with an awesome use of multitail to display logs
> of currently running builds on split-screen.
>
The split logs could be handy for developers.
I had not considered the ugly bug reports that the multi-job build
will generate. If that becomes a major problem, we might need to
change the default to single-job, or produce some output to point
users to the split logs.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-python] Re: [distutils-r1] Improvements to parallel builds
2012-12-06 17:28 ` [gentoo-python] Re: [distutils-r1] Improvements to " Mike Gilbert
@ 2012-12-06 17:40 ` Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2012-12-06 17:40 UTC (permalink / raw
To: Mike Gilbert; +Cc: gentoo-python, python
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
On Thu, 6 Dec 2012 12:28:37 -0500
Mike Gilbert <floppym@gentoo.org> wrote:
> On Thu, Dec 6, 2012 at 5:54 AM, Michał Górny <mgorny@gentoo.org> wrote:
> >
> > 2) create split logs for each implementation
> >
> > Aside to the usual soup on stdout, the eclass writes separate build logs
> > for each implementation to ${T}/build-${EPYTHON}.log.
> >
> > TODO: replace tee with an awesome use of multitail to display logs
> > of currently running builds on split-screen.
> >
>
> The split logs could be handy for developers.
>
> I had not considered the ugly bug reports that the multi-job build
> will generate. If that becomes a major problem, we might need to
> change the default to single-job, or produce some output to point
> users to the split logs.
It would be great if we had a more general solution here. I will ask
Zac if portage could point users to all *.log files in ${T}.
On the other hand, telling user to attach up to 8 logs feels a bit bad.
But I guess they'll just put them in a tarball.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-12-06 17:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06 10:54 [gentoo-python] [distutils-r1] Improvements to parallel builds Michał Górny
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 1/4] Don't rely on phase function return code Michał Górny
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 2/4] Use post-fork mode to avoid early output Michał Górny
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 3/4] multiprocessing: use the expanded call form Michał Górny
2012-12-06 10:54 ` [gentoo-python] [PATCH distutils-r1 4/4] Create split logs when doing parallel builds Michał Górny
2012-12-06 17:28 ` [gentoo-python] Re: [distutils-r1] Improvements to " Mike Gilbert
2012-12-06 17:40 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox