Re: Similar systems, different performance of fortran code
On Thu, 2005-04-21 at 13:44 +0900, Victor Munoz wrote:
> Hello.
>
> This may be off topic, but I'm very confused, so any help will be
> appreciated. It could be a problem specific with the code I'm running, but
> it also could be some feature of fortran not well implemented in g77.
> Anyway, the details:
>
> I'm running a fortran code (particle simulation, everything in a single file,
> no special external library needed) in two similar systems:
>
{snip}
> Except for the order of the partitions, I don't see anything different.
> However, when running this code for 1024 timesteps...
>
> System A:
>
> real 1m17.378s
> user 1m10.870s
> sys 0m4.160s
>
> System B:
>
> real 7m36.140s
> user 7m29.090s
> sys 0m6.340s
>
>
> This simple code:
>
> int main(){
> for(double i=0;i<1e9;i++){
> }
> return 0;
> }
>
> takes about 9 seconds in both systems.
>
> Another C++ code, with some output to disk, takes 1.3 seconds in A, and 0.8
> seconds in B.
>
> It doesn't seem to be an obvious problem with output to disk, but I don't
> know. The C++ code I've tested perform well. I have also tested other
> fortran codes, and they also perform well on both machines. But the
> particular code I'm working on now, performs much worse on B than in A.
> Any suggestion?
>
Just to rule it out, have you taken steps to ensure nothing else is
happening when you do the timings? And have you repeated them many times
to get representative timings? And presumably the same compiler flags
(perhaps no optimization may be a better comparison given you're using
different compiler versions)?
I would also like at profiling the codes, this should give you a handle
on what it is that varies from one system to another.
Michael
Reply to: