[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Similar systems, different performance of fortran code



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:

System A (Debian woody)

Linux version 2.4.18-bf2.4
Pentium 4 2.40GHz 
RAM: 512 Mb

$df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1              18G   14G  3.9G  78% /
/dev/hda3              54G   24G   27G  46% /disco

>From dmesg:
hda: ST380011A, ATA DISK drive

#swapon -s
Filename  		Type		Size	Used	Priority
/dev/hda2               partition	996020	44548	-1

Fortran compiler: g77-2.95
C++ compiler: g++-3.0

System B: (Debian sid)

Linux version 2.4.18-bf2.4
Pentium 4 3GHz
RAM: 512 Mb

Filesystem            Size  Used Avail Use% Mounted on
/dev/hdc3              73G  2.2G   67G   4% /
tmpfs                 251M  4.0K  251M   1% /dev/shm
/dev/hdc2              92M  4.6M   82M   6% /boot

# swapon -s
Filename   	Type		Size	Used	Priority
/dev/hdc1       partition	995988	584	-1

>From dmesg:
hdc: ST380817AS, ATA DISK drive

Fortran compiler: g77-3.3
C++ compiler: g++-3.3

    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?


Regards,

							Victor
							



Reply to: