how to make fdtd codes run faster?
时间:03-31
整理:3721RD
点击:
how to make fdtd codes run faster?
such as what kind of languages we choose, C, fortran or matlab.
the style the code writing. etc.
can anybody pose a guide line?
such as what kind of languages we choose, C, fortran or matlab.
the style the code writing. etc.
can anybody pose a guide line?
That is a difficult question but
1) Use a language where you have very close control on what the processor does
in the end, => C or Fortran or Assembler
2) I don't understand what you mean by coding style?
3) concrete suggestion depend on
a) your algorithm (2D,3D,materials, excitation, output data, ABC)
b) your processor (clock, pipeline length, cache size, number of registers)
c) memory bandwith
d) parallelization (OpenMP, MPI, etc)
etc.
Some general advice
- Really understand the algorithm you use
- Measure speed/memory
- Concentrate on the innermost loops