Alignment of gfortran allocated arrays

John Travers jtravs@gmail.com
Tue Aug 14 23:28:00 GMT 2007


On 14/08/07, François-Xavier Coudert <fxcoudert@gmail.com> wrote:
> Now, if you were to work on a patch for inclusion of a switch for
> controlled-alignment of allocated memory, you would need to:
>   1. add the option itself: what name, what possible values, for which targets?
>   2. add support for front-end emitted malloc calls (there are emitted
> by a unique function: gfc_call_malloc)
>   3. add support to the library routines in libgfortran/runtime/memory.c
>   4. last: add a way for the front-end to communicate the desired
> alignment to the library (to include in set_options, generated from
> the front-end function gfc_generate_function_code)
>
>
> This is not difficult, but not trivial either and has to be thought
> through carefully. Furthermore, it will need reviewing and
> maintaining, which has to be weighted against the use it will have.

(sorry FX, I meant to reply to the list only)

Hi all, thanks for your quick responses.

After reading through the thread, it looks as if the LD_PRELOAD method
is the easiest and quickest to setup, so I'll try this for now.
However, when I've got my thesis out of the way (at last, probably by
the end of September) I might look at preparing a patch as you
describe above. It would be a learning experience for me at least.

Thanks for your help,
John



More information about the Fortran mailing list