#9603: Speed up installation of iconv by permitting parallel builds. Also 
install
iconv on HP-UX
--------------------------------------------+-------------------------------
   Reporter:  drkirkby                      |       Owner:  drkirkby  
       Type:  defect                        |      Status:  needs_info
   Priority:  minor                         |   Milestone:  sage-4.5.3
  Component:  build                         |    Keywords:            
     Author:  David Kirkby                  |    Upstream:  N/A       
   Reviewer:  Peter Jeremy, Leif Leonhardy  |      Merged:            
Work_issues:                                |  
--------------------------------------------+-------------------------------

Old description:

> Currently iconv builds only on Solaris and Cygwin, as it caused problems
> on some linux distributions.
>
> It would be good if this would build on HP-UX too, as then some other
> packages could be checked on HP-UX to aid testing on different platforms.
> This ticket makes 3 changes.
>
> * Changes {{{#!/bin/bash}}} to {{{#!/usr/bin/env bash}}} in spkg-check.
> This in in conformance with the
> [http://www.sagemath.org/doc/developer/producing_spkgs.html#creating-a
> -new-spkg Sage Developers Guide] and is necessary on HP-UX as 'bash' is
> not installed in /bin.
>
> {{{
> -#!/bin/bash
> +#!/usr/bin/env bash
> }}}
>
> * Force install on HP-UX, instead of just Cygwin and Solaris. The
> relevant bit of the patch is:
> {{{
> -# Only build iconv on Solaris and Cygwin
> -if [ "x$UNAME" != xSunOS ] && [ "x$UNAME" != xCYGWIN ] ; then
> +# Only build iconv on Solaris, HP-UX and Cygwin
> +if [ "x$UNAME" != xSunOS ] && [ "x$UNAME" != xHP-UX ] && [ "x$UNAME" !=
> xCYGWIN ] ; then
> }}}
> * Force iconv to be checked only HP-UX, in addition to Solaris and Cygwin
> on which it was previously checked.
> {{{
> -if [ "x$UNAME" != xSunOS ] && [ "x$UNAME" != xCYGWIN ] ; then
> +if [ "x$UNAME" != xSunOS ] && [ "x$UNAME" != xHP-UX ] && [ "x$UNAME" !=
> xCYGWIN ] ; then
> }}}
>
> * Print all tests have pass if they have done. The relevant bit of the
> patch is
>
> {{{
> +echo "All the tests for iconv passed"
> +exit 0
> }}}

New description:

 Currently iconv builds only on Solaris and Cygwin, as it caused problems
 on some linux distributions.

 Currently, iconv is built serially, using {{{make}}} rather than
 {{{$MAKE}}}. This needs changing to permit faster builds.

 It would be good if iconv would build on HP-UX too, as then some other
 packages could be checked on HP-UX to aid testing on different platforms.

 A cleanup of spkg-install, spkg-check and SPKG.txt was also undertaken.

--

Comment(by drkirkby):

 I've tested this in parallel on my Sun Ultra 27 running !OpenSolaris 127
 times. It builds and passes all iconv's tests every time.

 My machine is under a '''very''' heavy load at the minute as I'm running
 {{{make ptestlong}}} 100 times in a loop! Needless to say {{{iconv}}}
 takes a while to install. But with {{{MAKE}}} to to {{{make -j12}}}, the
 time to just install (not run the tests), is

 {{{
 real    1m59.844s
 user    0m19.226s
 sys     0m9.280s
 Successfully installed iconv-1.13.1.p3
 }}}

 So the total CPU time is 28.5 seconds, and the installation time 1m59s for
 a parallel build with 12 threads on this 4-core, hyperthreaded machine. (1
 physical PCU, 4 cores, 8 threads).

 With {{{MAKE}}} unset, so a serial build, the installation time rose to
 3m:49s

 {{{
 real    3m46.106s
 user    0m19.233s
 sys     0m9.788s
 Successfully installed iconv-1.13.1.p3
 }}}

 The parallel build is faster by a factor of around 1.9. The actual CPU
 time used remained virtually unchanged. So the parallel install seems
 worthwhile.

 I'll repeat this on {{{t2.math}}} for as long as my patience permits. That
 has a lot more cores, but is very slow overall. I doubt I'll test as
 extensively. I'll then ask Mike to test on Cygwin.

 I've not updated the package yet. I'll do that when I'm finished more
 testing.

 I've changed the title, so I don't get quite as much **** thrown at me if
 this goes wrong! The content of the HP-UX changes are now about 1% I
 think!

 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9603#comment:33>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to