You are not logged in.

#1 2010-02-20 03:13:35

Skripka
Member
From: 2X1280X1024
Registered: 2009-02-19
Posts: 555

[Solved]Using multiple cores of a dual/quad-core for compiling code ?

Title basically says it all.

Was playing around with Firefox-PGO PKGBUILDS, and compiling 50MB of source code, even on my quad core takes a long time...only for the compiler to crash, and have to start again to try to get a usable package.  So, I was wondering if it is possible to actually use more than 1 out of my 4 CPU cores in compiling source code?

Nada on the forums yet, or in the Wiki that I could find. sad

Last edited by Skripka (2010-02-20 03:25:00)

Offline

#2 2010-02-20 03:22:03

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,395
Website

Re: [Solved]Using multiple cores of a dual/quad-core for compiling code ?

MAKEFLAGS="-j5" in /etc/makepkg.conf will use them all.

Edit: warning - some packages do not like this and you need to add options=('!makeflags') to the PKGBUILD.

Offline

#3 2010-02-20 03:24:27

Skripka
Member
From: 2X1280X1024
Registered: 2009-02-19
Posts: 555

Re: [Solved]Using multiple cores of a dual/quad-core for compiling code ?

Ooo...thx Allan smile

Offline

#4 2010-02-20 03:52:10

beroal
Member
From: Ukraine
Registered: 2009-06-07
Posts: 325
Website

Re: [Solved]Using multiple cores of a dual/quad-core for compiling code ?

Allan wrote:

Can I add MAKEFLAGS="-j5" to PKGBUILD?


we are not condemned to write ugly code

Offline

#5 2010-02-20 04:12:04

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,395
Website

Re: [Solved]Using multiple cores of a dual/quad-core for compiling code ?

beroal wrote:
Allan wrote:

Can I add MAKEFLAGS="-j5" to PKGBUILD?

No I didn't... 

Anyway, better to add it to makepkg.conf as the number is normally the number of cores + 1, so is specific to the computer.

Offline

#6 2010-03-09 22:49:14

ScottArch
Member
From: Cork, Ireland
Registered: 2009-10-23
Posts: 58

Re: [Solved]Using multiple cores of a dual/quad-core for compiling code ?

Hi,

Just wanted to chime in with a quick question. I have a Core 2 Duo T7300 and /proc/cpuinfo suggests that I have 2 CPU's, but 4 cores, would that be j3 or a j5 MAKEFLAGS?

Cheers


Acer Aspire 5920G - 2Ghz Core 2 Duo T7300 - 256mb Nvidia 8600GS - 4GB RAM

Offline

#7 2010-08-21 23:24:58

DarksideEE7
Member
From: Arkansas, United States
Registered: 2009-06-06
Posts: 356

Re: [Solved]Using multiple cores of a dual/quad-core for compiling code ?

ScottArch wrote:

Hi,

Just wanted to chime in with a quick question. I have a Core 2 Duo T7300 and /proc/cpuinfo suggests that I have 2 CPU's, but 4 cores, would that be j3 or a j5 MAKEFLAGS?

Cheers

Well this is an old thread, but I searching trying to confirm this from memory:

options=('!makeflags')

Anyhow since nobody answered your question, you in fact have 1 physical CPU with 2 cores.  You have 2 threads as well since the Core architecture didn't do hyperthreading.  Thus you should use

MAKEFLAGS='-j3'

This is what I use on my laptop with a Core 2 Duo CULV U7300, which is essentially the same CPU as yours except lower voltage and frequency.



So I added -j5 to my MAKEFLAGS on my Q6600 and I've already run into a failed build on package qt4-qtruby.  Is this fairly common, and if so then is there any way of knowing that the build won't be able to utilize the extra cores by reading the PKGBUILD before actually building?

It would be nice to use all 4 cores...I mean I don't have this overclocked and watercooled PC for looks yikes)

Last edited by DarksideEE7 (2010-08-22 06:56:52)

Offline

Board footer

Powered by FluxBB