Re: how to refrain only use certain number of processors

2012-01-31 Thread lee
lina writes: > I have a script like > > #!/bin/bash > > for i in {0..108} > do > > some job will run for mins & > > done > > Here I used & for some kinda of parallel. > but there is a problem, > > I wished at most it only run 8 jobs simultantly, no more than 8, once > finished, a new job can cont

Re: how to refrain only use certain number of processors

2012-01-31 Thread lina
On 1 Feb, 2012, at 1:19, Nicolas Bercher wrote: > On 31/01/2012 17:22, lina wrote: >> I need time to understand the suggestions have been given. > > Yes, of course. But this may interest other pepole on the list since your > topic since to be of great interest for others, including me! http:/

Re: how to refrain only use certain number of processors

2012-01-31 Thread lina
I need time to understand the suggestions have been given. A quick thanks. Best regards, On Wed, Feb 1, 2012 at 12:10 AM, Nicolas Bercher wrote: > What about the use of ulimit or any other tool that your sysadmin could > control? > > On the other hand, these solutions seem ok: > >  http://stack

Re: how to refrain only use certain number of processors

2012-01-31 Thread Nicolas Bercher
What about the use of ulimit or any other tool that your sysadmin could control? On the other hand, these solutions seem ok: http://stackoverflow.com/questions/1537956/bash-limit-the-number-of-concurrent-jobs Nicolas -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a

Re: how to refrain only use certain number of processors

2012-01-31 Thread Nicolas Bercher
On 31/01/2012 03:19, Cam Hutchison wrote: seq 0 108 | xargs -I@ -P8 cat A_@.txt B_@.txt C_@.txt -o ABC_@.txt Of course, this is (since cat -o doesn't exist): seq 0 108 | xargs -I@ -P8 cat A_@.txt B_@.txt C_@.txt > ABC_@.txt but "> ABC_@.txt" is out of the scope of xargs. Nicolas -- To UN

Re: how to refrain only use certain number of processors

2012-01-30 Thread Cam Hutchison
lina writes: >Yes. the ultimate goal is: >for i in {0..108} >do >cat A_$i.txt B_$i.txt C_$i.txt -o ABC_$i.txt (output as ABC_$i.txt) >done >but here I wish to use only 8 processors at most, total is 16. >the administrator of the cluster asked me not to use whole, cause >someone else needs SMP

Re: how to refrain only use certain number of processors

2012-01-30 Thread Paul E Condon
On 20120130_223623, Jochen Spieker wrote: > lina: > > > > Yes. the ultimate goal is: > > > > for i in {0..108} > > do > > cat A_$i.txt B_$i.txt C_$i.txt -o ABC_$i.txt (output as ABC_$i.txt) > > done > > Ok, so you don't actually have only A_$i filenames, but B_$i and C_$i as > well. That alone

Re: how to refrain only use certain number of processors

2012-01-30 Thread Jochen Spieker
lina: > > Yes. the ultimate goal is: > > for i in {0..108} > do > cat A_$i.txt B_$i.txt C_$i.txt -o ABC_$i.txt (output as ABC_$i.txt) > done Ok, so you don't actually have only A_$i filenames, but B_$i and C_$i as well. That alone makes my previous approach useless (as I predicted!). The other

Re: how to refrain only use certain number of processors

2012-01-30 Thread lina
On Tue, Jan 31, 2012 at 12:05 AM, Jochen Spieker wrote: > lina: >> >> well, a question, >> >> $ seq 0 3 | xargs --verbose echo A >> echo A 0 1 2 3 >> A 0 1 2 3 >> >> How can I make the output as: >> >> A0 A1 A2 A3 > > Your problem in this case is that xargs adds whitespace before adding > argument

Re: how to refrain only use certain number of processors

2012-01-30 Thread Jochen Spieker
lina: > > well, a question, > > $ seq 0 3 | xargs --verbose echo A > echo A 0 1 2 3 > A 0 1 2 3 > > How can I make the output as: > > A0 A1 A2 A3 Your problem in this case is that xargs adds whitespace before adding arguments. What you can do is to modify seq's output before xargs sees it: $

Re: how to refrain only use certain number of processors

2012-01-30 Thread lina
On Mon, Jan 30, 2012 at 10:29 PM, Jochen Spieker wrote: > lina: >> On Mon, Jan 30, 2012 at 6:35 PM, Jochen Spieker >> wrote: >>> lina: I wished at most it only run 8 jobs simultantly, no more than 8, once finished, a new job can continue, >>> >>> Xargs can be used for this. An exm

Re: how to refrain only use certain number of processors

2012-01-30 Thread lina
On Mon, Jan 30, 2012 at 10:11 PM, Darac Marjal wrote: > On Mon, Jan 30, 2012 at 06:06:06PM +0800, lina wrote: >> Hi, >> >> ( sorry if it a bit off-topic) >> >> I have a script like >> >> #!/bin/bash >> >> for i in {0..108} >> do >> >> some job will run for mins & >> >> done >> >> Here I used & for

Re: how to refrain only use certain number of processors

2012-01-30 Thread lina
On Mon, Jan 30, 2012 at 10:08 PM, Chen Wei wrote: > On Mon, Jan 30, 2012 at 06:06:06PM +0800, lina wrote: >> I have a script like >> >> #!/bin/bash >> for i in {0..108} >> do >> >> some job will run for mins & >> done >> >> Here I used & for some kinda of parallel. >> but there is a problem, >> I

Re: how to refrain only use certain number of processors

2012-01-30 Thread Jochen Spieker
lina: > On Mon, Jan 30, 2012 at 6:35 PM, Jochen Spieker wrote: >> lina: >>> >>> I wished at most it only run 8 jobs simultantly, no more than 8, once >>> finished, a new job can continue, >> >> Xargs can be used for this. An exmaple: >> >> $ seq 1 100 | xargs -n1 -P8 echo >> >> Seq prints the

Re: how to refrain only use certain number of processors

2012-01-30 Thread Darac Marjal
On Mon, Jan 30, 2012 at 06:06:06PM +0800, lina wrote: > Hi, > > ( sorry if it a bit off-topic) > > I have a script like > > #!/bin/bash > > for i in {0..108} > do > > some job will run for mins & > > done > > Here I used & for some kinda of parallel. > but there is a problem, > > I wished a

Re: how to refrain only use certain number of processors

2012-01-30 Thread Chen Wei
On Mon, Jan 30, 2012 at 06:06:06PM +0800, lina wrote: > I have a script like > > #!/bin/bash > for i in {0..108} > do > > some job will run for mins & > done > > Here I used & for some kinda of parallel. > but there is a problem, > I wished at most it only run 8 jobs simultantly, no more than 8,

Re: how to refrain only use certain number of processors

2012-01-30 Thread lina
On Mon, Jan 30, 2012 at 6:35 PM, Jochen Spieker wrote: > lina: >> >> I wished at most it only run 8 jobs simultantly, no more than 8, once >> finished, a new job can continue, > > Xargs can be used for this. An exmaple: > > $ seq 1 100 | xargs -n1 -P8 echo > > Seq prints the numbers from 1 to 100

Re: how to refrain only use certain number of processors

2012-01-30 Thread Jochen Spieker
lina: > > I wished at most it only run 8 jobs simultantly, no more than 8, once > finished, a new job can continue, Xargs can be used for this. An exmaple: $ seq 1 100 | xargs -n1 -P8 echo Seq prints the numbers from 1 to 100 (one per line) and xargs starts an echo for each argument with 8 invo

Re: how to refrain only use certain number of processors

2012-01-30 Thread lina
On Mon, Jan 30, 2012 at 6:06 PM, lina wrote: > Hi, > > ( sorry if it a bit off-topic) > > I have a script like > > #!/bin/bash > > for i in {0..108} > do > > some job will run for mins & > > done > > Here I used & for some kinda of parallel. > but there is a problem, > > I wished at most it only r

how to refrain only use certain number of processors

2012-01-30 Thread lina
Hi, ( sorry if it a bit off-topic) I have a script like #!/bin/bash for i in {0..108} do some job will run for mins & done Here I used & for some kinda of parallel. but there is a problem, I wished at most it only run 8 jobs simultantly, no more than 8, once finished, a new job can continue

Re: how to detect the number of processors ?

2007-11-28 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/28/07 16:07, Jerome BENOIT wrote: [snip] > > Indeed I have a P4 HT : > must I build a SMP kernel as suggested by Knoppix ? HT isn't all that it's cracked up to be. You *might* get better performance by disabling it from the BIOS. - -- Ron Joh

Re: how to detect the number of processors ?

2007-11-28 Thread Jerome BENOIT
Hi, thanks for your answers. strawks wrote: Hello, sorry, I forgot to tell that `/proc/cpuinfo' shows up _two_ processors (when the kernel is a SMP one). Furthermore, the concerned black box is a very old one: before september 2003 (kernel 2.4.22). According to `/proc/cpuinfo', there are tw

Re: how to detect the number of processors ?

2007-11-28 Thread David
Jerome BENOIT wrote: Hello List, today I built a new kernel for one computer of the lab: whereas the boss claims that it has only one processor, Knoppix claims that there are two processors. Booting a smp kernel shows two processors. I am quite confused: how to know for sure the number of

Re: how to detect the number of processors ?

2007-11-28 Thread strawks
Hello, > sorry, I forgot to tell that `/proc/cpuinfo' > shows up _two_ processors (when the kernel is a SMP one). > > Furthermore, > the concerned black box is a very old one: > before september 2003 (kernel 2.4.22). > > According to `/proc/cpuinfo', there are two > > Intel(R) Pentium(R) 4 CPU

Re: how to detect the number of processors ?

2007-11-28 Thread Ron Johnson
gt; > > Andoni wrote: >> Hi, >> >>> today I built a new kernel for one computer of the lab: >>> whereas the boss claims that it has only one processor, >>> Knoppix claims that there are two processors. >>> Booting a smp kernel shows two process

Re: how to detect the number of processors ?

2007-11-28 Thread Gilles Mocellin
ows two processors. > I am quite confused: how to know for sure > the number of processors in a black box ? In /proc/cpuinfo, the "physical id" change when you have really several processors. signature.asc Description: This is a digitally signed message part.

Re: how to detect the number of processors ?

2007-11-28 Thread Jerome BENOIT
advance, Jerome Andoni wrote: Hi, today I built a new kernel for one computer of the lab: whereas the boss claims that it has only one processor, Knoppix claims that there are two processors. Booting a smp kernel shows two processors. I am quite confused: how to know for sure the number of

Re: how to detect the number of processors ?

2007-11-28 Thread Jerome BENOIT
advance, Jerome Andoni wrote: Hi, today I built a new kernel for one computer of the lab: whereas the boss claims that it has only one processor, Knoppix claims that there are two processors. Booting a smp kernel shows two processors. I am quite confused: how to know for sure the number of

Re: how to detect the number of processors ?

2007-11-28 Thread Jochen Schulz
Jerome BENOIT: > > today I built a new kernel for one computer of the lab: > whereas the boss claims that it has only one processor, > Knoppix claims that there are two processors. It's probably a single processor with multiple cores, hyperthreading or something similar. J. -- I use a Playstati

Re: how to detect the number of processors ?

2007-11-28 Thread Andoni
Hi, > today I built a new kernel for one computer of the lab: > whereas the boss claims that it has only one processor, > Knoppix claims that there are two processors. > Booting a smp kernel shows two processors. > I am quite confused: how to know for sure > the number of pro

how to detect the number of processors ?

2007-11-28 Thread Jerome BENOIT
Hello List, today I built a new kernel for one computer of the lab: whereas the boss claims that it has only one processor, Knoppix claims that there are two processors. Booting a smp kernel shows two processors. I am quite confused: how to know for sure the number of processors in a black box

Re: number of processors detected

2004-07-10 Thread David Goodenough
On Saturday 10 July 2004 21:12, Joakim Franzen wrote: > Hi, > > Just installed the latest debian-sarge and have the 2.6.6-smp kernel > package added. What is really strange is that debian detects 4 > processors but the server only has 2. > > The system is a Dell PowerEdge 1600 with dual 2.4GHz Xeon

Re: number of processors detected

2004-07-10 Thread Jacob S.
On Sat, 10 Jul 2004 22:12:13 +0200 Joakim Franzen <[EMAIL PROTECTED]> wrote: > Hi, > > Just installed the latest debian-sarge and have the 2.6.6-smp kernel > package added. What is really strange is that debian detects 4 > processors but the server only has 2. > > The system is a Dell PowerEdg

number of processors detected

2004-07-10 Thread Joakim Franzen
Hi, Just installed the latest debian-sarge and have the 2.6.6-smp kernel package added. What is really strange is that debian detects 4 processors but the server only has 2. The system is a Dell PowerEdge 1600 with dual 2.4GHz Xeon. Anyone know why this is happening? Regards, Joakim -- To UNSUBS

Re: Number of processors

2000-12-06 Thread Michael Sauer
> A little off topic... > > Does anyone know how to get the number of CPU's > that a machine has using the "C" programming > language?Any URL's on the subject? open /proc/cpuinfo and look how many processor entries it has. mfg Mischel S aus P Homepage: http://fsinfo.cs.uni-sb.de/~waldi

Re: Number of processors

2000-12-05 Thread Jeff Green
surely you cannot have a truly portable system that enumerates "cpus" after all who says there has to be one? Do numerical or I/O co-processors count as cpus? unless the architecture is defined it makes no sense, and if the architecture is defined you may as well define something like /proc and if

Re: Number of processors

2000-12-05 Thread Phil Brutsche
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 A long time ago, in a galaxy far, far way, someone said... > Nope. We have to use some "C" or "C++" system/function call. Our > programmers don't want to depend on the /proc file system being > available. If you're looking for an OS independant way

Re: Number of processors

2000-12-05 Thread William T Wilson
On Tue, 5 Dec 2000, Christopher W. Aiken wrote: > Nope. We have to use some "C" or "C++" system/function call. Our > programmers don't want to depend on the /proc file system being > available. Any reasonable Linux system will have the /proc file system. There is no way to do it in C. If ther

Re: Number of processors

2000-12-05 Thread Chad '^chewie' Walstrom
Christopher W. Aiken wrote: > Does anyone know how to get the number of CPU's that a machine has > using the "C" programming language?Any URL's on the subject? This is specific to the kernel you are talking to. DOS has different API than Linux for retrieving this information. Of course, you

Re: Number of processors

2000-12-05 Thread Nathan E Norman
On Tue, Dec 05, 2000 at 02:53:01PM -0500, Christopher W. Aiken wrote: > On Tue, 5 Dec 2000, Harry Henry Gebel wrote: > > Nope. We have to use some "C" or "C++" system/function > call. Our programmers don't want to depend on the > /proc file system being available. I doubt there is such a system

Re: Number of processors

2000-12-05 Thread Christopher W. Aiken
On Tue, 5 Dec 2000, Harry Henry Gebel wrote: -|On Tue, Dec 05, 2000 at 02:01:05PM -0500, Christopher W. Aiken wrote: -|> Does anyone know how to get the number of CPU's -|> that a machine has using the "C" programming -|> language?Any URL's on the subject? -| -|There's probably can easier way

Re: Number of processors

2000-12-05 Thread Michal F. Hanula
On Tue, Dec 05, 2000 at 02:01:05PM -0500, Christopher W. Aiken wrote: > A little off topic... > > Does anyone know how to get the number of CPU's > that a machine has using the "C" programming > language?Any URL's on the subject? > > Thanks you... > What about parsing /proc/cpuinfo? (this r

Number of processors

2000-12-05 Thread Christopher W. Aiken
A little off topic... Does anyone know how to get the number of CPU's that a machine has using the "C" programming language?Any URL's on the subject? Thanks you... -=[cwa]=- --- Christopher W. Aiken, Scenery Hill, Pa, USA chris at cwaiken dot com, www.c