Re: [Patch, Fortra, Coarray] Free allocated memory for static coarrays.

2011-06-16 Thread Tobias Burnus
Hi Daniel, Daniel Carrera wrote: Have you tested the modifications with MPI? I mean: Compiling mpi.c, and then in gcc/testsuite/gfortran.dg/coarray: Ooops. I compiled and ran the test suite but I forgot to test MPI separately. Seemingly, there was also a bug in the single.c version: + loc

Re: [Patch, Fortra, Coarray] Free allocated memory for static coarrays.

2011-06-16 Thread Daniel Carrera
Hi Tobias, New patch attached. In addition to the fixes you listed I also had to fix the call to MPI_Allgather. More below: Between "size," and "caf_register_t" is a instead of a simple " ". Fixed. As you mentioned yourself (in a private mail, commenting on my code): There is a "*" mis

Re: [Patch, Fortra, Coarray] Free allocated memory for static coarrays.

2011-06-16 Thread Tobias Burnus
Hi Daniel, Daniel Carrera wrote: > This patch adds a linked list to keep track of the allocated > memory of all static coarrays and ensures that at the end of > the program the memory is freed. +_gfortran_caf_register (ptrdiff_t size,caf_register_t type, void **tok

[Patch, Fortra, Coarray] Free allocated memory for static coarrays.

2011-06-16 Thread Daniel Carrera
Hello, This is my second patch for GFortran. This patch adds a linked list to keep track of the allocated memory of all static coarrays and ensures that at the end of the program the memory is freed. Additionally, I use MPI_Allgather in mpi.c to ensure that all images know the address of the