User forums > Using Code::Blocks

CB-launched code runs slower than command-line launched code

(1/1)

mark1977:
Hi,

I am using CB svn rev 7953 on Ubuntu 32bit Linux. When I compile my code through CB it creates the executable. If I launch that executable through CB (in xterm or gnome-terminal) then it runs slower (about 383ms per timestep) than if I go to the command line and execute it directly in the shell (about 225ms per timestep).

Anybody know why this would happen?

Thanks

Mark

p.s. This is c++ code with intel compiler.

oBFusCATed:
Do you use the same terminal emulator?

mark1977:
Yes. Though it happens whatever terminal I use.

oBFusCATed:
How many cores do you have on the machine?
Is you application using all the cores?
If yes, then your app and C::B battle for CPU usage, as C::B is using some CPU to wait for the console.

mark1977:

--- Quote from: oBFusCATed on October 09, 2012, 01:00:20 pm ---How many cores do you have on the machine?
Is you application using all the cores?
If yes, then your app and C::B battle for CPU usage, as C::B is using some CPU to wait for the console.

--- End quote ---

I have 4 cores, one thread per core. I run on only one core.

Navigation

[0] Message Index

Go to full version