Re: COMPUTATIONAL FLUID DYNAMICS - Help with SIMPLE algorithm implementation



Stuart GRAHAM wrote:

>
> By how much does having the loops look like this speed it up?
>
> DO 60 I=0,N+1
> DO 60 J=0,M+1
> U(J,I)=0.d0
>


I agree with Glen and Tim that this can speed up such loops
tremendously, but you might not necessarily see it on your system.
Many optimizers can perform the appropriate loop interchange,
especially in simple cases like the above. However, in fact, I view
this as a good reason for writing the loops the `correct' way round -
it stops you wondering why the code runs so slowly in your new system,
where the compiler does not alter the loop order,

Ian

.



Relevant Pages

  • Re: Why -48V for telephone lines, and not positive?
    ... > JeffM wrote... ... Short loops were as little as -12V, ... Large parts of the civilized world use -24V as the default on telco ... Tim. ...
    (sci.electronics.design)
  • Re: Support for optimization for dual core proc in C++
    ... Does the C++ in VS2005 allow optimization to parallelize and vectorize ... automatically like the product IntelC++ Compiler Version 10.0 does? ... restructures and optimizes loops to ensure that auto-vectorization, ...
    (microsoft.public.vc.language)
  • Re: Why is C# 450% slower than C++ on nested loops ??
    ... A nested loop written the way it is in the benchmark is measuring nothing but a compiler's ability to optimize nested loops that do more or less nothing. ... C# compiler generates such code, and the C++/CLI compiler is able to do so. ... It is reported that 2005 does a much better job of optimization of .NET code, yet, only with the C++, not the C# compiler. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: File IO
    ... > (Actually, from your description, the implicit DO loops are working ... your problem is when you read array slices instead of implicit DO ... so the compiler might creat a temporary ... that's probably a bug in the I/O design. ...
    (comp.lang.fortran)
  • Poor performance of implied-DO loop with Intel Fortran
    ... Intel fortran compliers. ... I get very poor performance when using implied-DO loops to initialise ... I wasn't able to time v8.0 of the Intel compiler because it segfaulted ... unless I hid them in a subroutine. ...
    (comp.lang.fortran)