Discovered something unintuitive when running a serial (nonMPI, non-OpenMP) program on a dual-Xeon 2.8GHz with 512K cache, 2GB DDR RAM.
uname -a: "Linux machine1 2.4.20-28.7smp #1 SMP Thu Dec 18 11:18:31 EST 2003 i686 unknown"
Compiler: ifort 8.0 Build 20040318Z Package ID: l_fc_pc_8.0.039_pe044.1
Compile options = "-tpp7 -O3 -fpp1 -mp -xW -Bstatic -Vaxlib
-static-libcxa -w -FI"
Although there are 2 CPU's, the cpu time taken for running the same program is quite different depending on whether or not the other CPU is loaded. I'm the only user of this machine. Results below.
When running only one program (case 1 below), 'top' shows the other CPU idle. For case 2, 'top' shows both CPUs at 100% used. For case 2, I loaded both CPU's by running prog1 and prog2 simultaneously (prog1 is identical to prog2).
Any insights as to why this is? I was expecting the timings for prog1 and prog2 in case 2 to be the same as in case 1.
Times are from the 'time' cmd.
case 1 (no other load):
Run 1: real 36m4.255s user 35m56.240s sys 0m2.840s
Run 2: real 38m16.741s user 37m49.950s sys 0m2.070s
case 2 (both cpu's loaded):
Timing for prog1:
real 66m48.420s user 65m26.900s sys 0m12.780s
Timing for prog2: (prog1 and prog2 are identical)
real 67m14.479s user 66m20.950s sys 0m8.420s