Re: GHC build times on newer MacBook Pros?

2011-08-26 Thread Evan Laforge
On Tue, Aug 23, 2011 at 10:24 AM, David Terei davidte...@gmail.com wrote:
 I have a 16 core machine at work (with 48GB of ram, a perk of the job
 :)). GHC can saturate them all. Can validate GHC in well under 10
 minutes on it.

To wander a bit from the topic, when I first saw this I thought wow,
ghc builds in parallel now, I want that but then I realized it's
because ghc itself uses make, not --make.  --make's automatic
dependencies are convenient, but figuring out dependencies on every
build and not being parallel means make should be a lot faster.  Also,
--make doesn't understand the hsc-hs link, so in practice I have to
do a fair amount of manual dependencies anyway.  So it inspired me to
try to switch from --make to make for my own project.

I took a look at the ghc build system and even after reading the
documentation it's hard for me to understand.  The first issue is how
to get ghc -M to understand hsc2hs?  My workaround was to fetch *.hsc,
and have 'make depend' depend on $(patsubst %.hsc, %hs, $(all_hsc)) so
that by the time ghc -M runs it can find the .hs files.

Then the more perplexing issue is that I'm using to using -odir and
-hidir with --make to maintain separate trees of .o and .hi built for
profiling and testing, but I'm not sure how make does that, and
fiddling with VPATH has been unsuccessful so far.  Otherwise I could
do wholesale preprocessing of the ghc generated deps file, but it
seems clunky in addition to tripling its size.  I know ghc has ways,
and it's hard for me to read rules/*dependencies* stuff, but I don't
think ghc is doing that.  Maybe it just doesn't allow profiling and
non-profiling to coexist?

Maybe I shouldn't be asking make questions on on the ghc list, but
it's related to how ghc does -odir and -hidir and the best way to
build haskell so it's at least somewhat relevant :)

To bring it back to ghc a bit, wouldn't it be nice if there didn't
have to be a tradeoff between fast but awkward to set up vs. slow but
convenient?  For larger projects, either make or something with
equivalent power is probably necessary, given C, hsc2hs, etc. all
needing to be integrated, but a wiki page with some make recipes for
ghc could help there a bunch.  I'd be happy to put one up as soon as I
figure out the current situation.

Then there's simply making --make faster...  I saw a talk about a
failed attempt to parallelize ghc, but it seems like he was trying to
parallelize the compiler itself... why not take the make approach and
simply start many ghcs?  You'd have to pay the ghc startup time cost,
but relatively speaking I think that's pretty fast nowadays.  Or you
could just do a work-stealing kind of thing where ghc marks a file as
in progress and then each ghc tries to grab a file to compile.  Then
you just start a whole bunch of 'ghc --make's and let them fight it
out.

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: GHC build times on newer MacBook Pros?

2011-08-23 Thread Karel Gardas


Hi,

go for 4 cores if the price is not prohibitive. I'm using Q6600 here and 
all cores are quite busy except for the configuration and compilations 
which is done by cabal (if only this cabal would be parallel too!). On 
ARM/Linux -- 2 cores cortex-a9 (OMAP4430) I've noticed that sometimes 
build process strangely occupies just one core but I don't have enough 
resources to search for the culprit and yet majority of times 2 cores 
are 100% busy...


Karel

On 08/23/11 11:27 AM, Johan Tibell wrote:

Hi!

I'm looking to upgrade my laptop so that I can (among other things)
compile GHC faster. I'll either get the 13 2.7GHz dual-core Intel
Core i7 model or the 15 2.2GHz quad-core Intel Core i7 model. Anyone
know if it's worth to get the 15 model? According to these benchmarks
it should be quite a bit faster:

http://www.primatelabs.ca/geekbench/mac-benchmarks/

but I don't know if I can get enough parallelism out of GHC's build to
use all 4 cores in the 15 model.

-- Johan

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users




___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: GHC build times on newer MacBook Pros?

2011-08-23 Thread austin seipp
I'm using a MBP with a quad core 2gHz Core i7; it has 8 overall
hardware threads. GHC's build process using 'make -j9' or 'make -j12'
totally saturates all my cores. I believe I can clock in a full build
at well under 10 minutes (with BuildFlavor = quick in mk/build.mk.)
For comparison, I also have a dual core 2gHz Core i7 (4 hardware
threads) in a lenovo sitting next to it running Linux, and a full GHC
build takes a bit longer. I can get real numbers later if it's
actually that interesting.

I'd recommend you getting the quad-core machine, if at all possible.

On Tue, Aug 23, 2011 at 4:27 AM, Johan Tibell johan.tib...@gmail.com wrote:
 Hi!

 I'm looking to upgrade my laptop so that I can (among other things)
 compile GHC faster. I'll either get the 13 2.7GHz dual-core Intel
 Core i7 model or the 15 2.2GHz quad-core Intel Core i7 model. Anyone
 know if it's worth to get the 15 model? According to these benchmarks
 it should be quite a bit faster:

 http://www.primatelabs.ca/geekbench/mac-benchmarks/

 but I don't know if I can get enough parallelism out of GHC's build to
 use all 4 cores in the 15 model.

 -- Johan

 ___
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users




-- 
Regards,
Austin

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: GHC build times on newer MacBook Pros?

2011-08-23 Thread Johan Tibell
Sounds promising. Now I just have to decide whether to get the 2.2 or
2.3 GHz version. I suspect the latter is a bit overpriced.

On Tue, Aug 23, 2011 at 4:36 PM, austin seipp a...@hacks.yi.org wrote:
 I'm using a MBP with a quad core 2gHz Core i7; it has 8 overall
 hardware threads. GHC's build process using 'make -j9' or 'make -j12'
 totally saturates all my cores. I believe I can clock in a full build
 at well under 10 minutes (with BuildFlavor = quick in mk/build.mk.)
 For comparison, I also have a dual core 2gHz Core i7 (4 hardware
 threads) in a lenovo sitting next to it running Linux, and a full GHC
 build takes a bit longer. I can get real numbers later if it's
 actually that interesting.

 I'd recommend you getting the quad-core machine, if at all possible.

 On Tue, Aug 23, 2011 at 4:27 AM, Johan Tibell johan.tib...@gmail.com wrote:
 Hi!

 I'm looking to upgrade my laptop so that I can (among other things)
 compile GHC faster. I'll either get the 13 2.7GHz dual-core Intel
 Core i7 model or the 15 2.2GHz quad-core Intel Core i7 model. Anyone
 know if it's worth to get the 15 model? According to these benchmarks
 it should be quite a bit faster:

 http://www.primatelabs.ca/geekbench/mac-benchmarks/

 but I don't know if I can get enough parallelism out of GHC's build to
 use all 4 cores in the 15 model.

 -- Johan

 ___
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users




 --
 Regards,
 Austin


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: GHC build times on newer MacBook Pros?

2011-08-23 Thread David Terei
I have a 16 core machine at work (with 48GB of ram, a perk of the job
:)). GHC can saturate them all. Can validate GHC in well under 10
minutes on it.

I also just got the 15 core i7 2.3GHz less then a week ago, it's a
very nice machine so I would recommend it. But yeah just getting the
2.2GHz is the better value for money.

On 23 August 2011 07:56, Johan Tibell johan.tib...@gmail.com wrote:
 Sounds promising. Now I just have to decide whether to get the 2.2 or
 2.3 GHz version. I suspect the latter is a bit overpriced.

 On Tue, Aug 23, 2011 at 4:36 PM, austin seipp a...@hacks.yi.org wrote:
 I'm using a MBP with a quad core 2gHz Core i7; it has 8 overall
 hardware threads. GHC's build process using 'make -j9' or 'make -j12'
 totally saturates all my cores. I believe I can clock in a full build
 at well under 10 minutes (with BuildFlavor = quick in mk/build.mk.)
 For comparison, I also have a dual core 2gHz Core i7 (4 hardware
 threads) in a lenovo sitting next to it running Linux, and a full GHC
 build takes a bit longer. I can get real numbers later if it's
 actually that interesting.

 I'd recommend you getting the quad-core machine, if at all possible.

 On Tue, Aug 23, 2011 at 4:27 AM, Johan Tibell johan.tib...@gmail.com wrote:
 Hi!

 I'm looking to upgrade my laptop so that I can (among other things)
 compile GHC faster. I'll either get the 13 2.7GHz dual-core Intel
 Core i7 model or the 15 2.2GHz quad-core Intel Core i7 model. Anyone
 know if it's worth to get the 15 model? According to these benchmarks
 it should be quite a bit faster:

 http://www.primatelabs.ca/geekbench/mac-benchmarks/

 but I don't know if I can get enough parallelism out of GHC's build to
 use all 4 cores in the 15 model.

 -- Johan

 ___
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users




 --
 Regards,
 Austin


 ___
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users