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

Re: FORTRAN implementation in Lenny



On 2/21/2010 10:28 PM, Mark Allums wrote:
On 2/21/2010 4:44 PM, Fuentes, Adolfo wrote:
]$ gcc -O3 -lm -march=nocona -o nbody.x nbody.c
]$ time ./-o nbody.x 50000000
Energy 0: -0.169075164
Energy 1: -0.169059907
Elapsed time: 1m 17.4s

]$ f95 -O3 -lm -march=nocona -o nbody.x nbody.f90
]$ time ./nbody.x 50000000
Energy 0: -0.169075164
Energy 1: -0.169059907
Elapsed time: 2m 31.7s

]$ g95 -O3 -lm -march=nocona -o nbody.x nbody.f90
]$ time ./nbody.x 50000000
Energy 0: -0.169075164
Energy 1: -0.169059907
Elapsed time: 1m 40.3s


gcc is "highly"* optimized, the g95 compiler would have similar
optimizations, because they share back ends. The Intel compiler should
beat it, however, if you are very familiar with Intel architecture, and
are willing to learn the ins and outs. I'm not personally acquainted
with other compilers, so can't answer questions about them.

(And my FORTRAN days are behind me. I can only answer in these general
terms. I hope someone else can be more specific.)

Hope this helps,

Mark Allums


I just realized that I have confused GNU FORTRAN with something else. What is g95?

Disregard the above.  Carry on.

Mark Allums


Reply to: