This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: First Patch


Hi Daniel,

On 06/07/2011 08:44 PM, Daniel Carrera wrote:
Ok, I'll prepare a new patch and then write again to this list and CC to gcc-patches@... with an appropriate email subject. Do I need to subscribe to gcc-patches@... first?

No, you don't, which is good as it is a high-volume list.


(By the way, one convenient way to read the GCC mailing lists - in particular gcc@ or gcc-patches@ - is a news reader, using the NNTP server of gmane, cf. http://dir.gmane.org/gmane.comp.gcc.patches)

[error diagnostic]
Ok, how about this:

void
_gfortran_caf_sync_all (int *stat, char *errmsg, int errmsg_len)
{
  int ierr = MPI_Barrier (MPI_COMM_WORLD);

  if (stat && !ierr)
    *stat = 0

Well, one could just use:


  if (stat)
    *stat = ierr;

and drop the assignment part from the ierr != 0 part.

      fprintf(stderr,"SYNC ALL failed\n");
      exit(ierr);

I think at some point one needs to add a function which handle the error abort in the library. In for sync images, I used as interim solution "error_stop" instead of "exit" as the latter calls "MPI_Abort". I think calling MPI_Abort is cleaner as it might help preventing that the other MPI processes continue.
(Although, my experience was that either MPI aborts already after detecting that one process exited without calling MPI_Finalize - or that even though one process called MPI_Abort, the other processes continue until the wall time is exceeded.)


[Test case]
Ok. I'll take a look at how the tests work. Should the test be added to this patch or should it be a new patch?

I should be included - either as diff or as attached file. Could you also run the test case - manually - with the MPI version? How this is done is described at http://gcc.gnu.org/wiki/CoarrayLib
(The reason is that the test suite currently only tests -fcoarray=single and -fcoarray=lib with libcaf_single. The libcaf_mpi is currently not tested. Solution is to modify caf.exp to also allow for libcaf_mpi, using the specified options and using the specified mpiexec command. But a patch for this still has to be written.)


Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]