Author Topic: CB-launched code runs slower than command-line launched code  (Read 4197 times)

Offline mark1977

  • Multiple posting newcomer
  • *
  • Posts: 26
CB-launched code runs slower than command-line launched code
« on: October 09, 2012, 11:49:37 am »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CB-launched code runs slower than command-line launched code
« Reply #1 on: October 09, 2012, 12:24:57 pm »
Do you use the same terminal emulator?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mark1977

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: CB-launched code runs slower than command-line launched code
« Reply #2 on: October 09, 2012, 12:46:45 pm »
Yes. Though it happens whatever terminal I use.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CB-launched code runs slower than command-line launched code
« Reply #3 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mark1977

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: CB-launched code runs slower than command-line launched code
« Reply #4 on: October 09, 2012, 02:58:03 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.

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