I know this question is somewhat familiar to my previous question found here, however I am now coming at it from a slightly different and more general angle.
Let's say I have a code whose runtime is in the days to weeks range. For one reason or another, the code can not be changed to improve performance. My goal is to purchase a computer to run this specific code as fast as possible. It is currently parallel is some regards, but must be shared memory.
Currently I have two computers on which to run it. They both run the same Linux distribution and both run on Intel-Xeon processors, however the CPU models are different as is the memory speed, and other hardware values (the computers have about 5 years of age difference between them). On both computers I can easily change the number of cores utilized for running the code, and the newer of the two supports hyperthreading.
My question is, is there a way to profile runs of the code on one or both computers that would allow me to find where the hardware bottlenecks are, and thereby tune a new computer purchase for optimal performance with this code.