I am running same C++ implementation in two different computation environment where the first one is Xeon 2.3 GHz with 48 Gb memory and the second one is Core2 Duo 2.53 GHz with 3 Gb memory. For the compilation, I have used g++ with similar options. I should note that first system is 64 bit Red Hat, second one is 32 bit Ubuntu. Additionally, g++ versions are different, in the first system version 4.1.2 is installed, in the second system version 4.6.1 is installed.
When I run the code, both systems return exactly same solution. For each system, time results are as follows.
System-1:
real 0m19.623s
user 2m13.588s
sys 0m3.118s
System-2:
real 0m11.229s
user 0m11.785s
sys 0m1.496s
I have 2 questions.
- Why System-1 (better computation environment) runs this code inferior than System-2?
- For System-1, the difference between the real time and the user time is considerable. Why such situation occurs?
The problem is solved. I am using a shared library in my application. I realize that this shared library works multi-threaded in its default settings. I set it to single-threaded then it starts to work fine in both systems.