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: Is mpi SYNC ALL supposed to work?


Hello,

first, I want to point out that the MPI version of gfortran's coarray support is NOT yet WORKING. (Except in very special but rather useless cases.) I think I really should tone down the release notes a bit more to make this clearer.

Regarding your question:

On 01/13/2012 04:50 PM, VladimÃr Fuka wrote:
I tried the mpi version of coarrays (library from today's trunk and gfotran
from trunk from 20. December). I can not get an a simple integral with
reduction at the end to work, because the SYNC ALL does not seem to work for
me.

I am not surprised that the *reduction* does not work as stated at several places: There is NO communication between images is supported at the moment.(*)



However, the SYNC ALL itself should work by calling MPI_Barrier. It also seems to work for me with:


print *, "BEFORE on ", this_image()
if (mod(this_image(), 2) == 0) call sleep(1)
SYNC ALL
print *, "AFTER on ", this_image()
end

$ mpicc -c libgfortran/caf/mpi.c
$ mpif90 -fcoarray=lib mpi.o foo.f90
$ mpirun -n 5 ./a.out
 BEFORE on            1
 BEFORE on            4
 BEFORE on            2
 BEFORE on            5
 BEFORE on            3
 AFTER on            3
 AFTER on            2
 AFTER on            1
 AFTER on            5
 AFTER on            4

While if I comment out the SYNC ALL, I get:

 BEFORE on            1
 AFTER on            1
 BEFORE on            2
 BEFORE on            5
 AFTER on            5
 BEFORE on            3
 AFTER on            3
 BEFORE on            4
 AFTER on            2
 AFTER on            4

Thus, it works for me and I do not see any reason why it shouldn't.

and the print were one after another from different images, without any sign
of performed barrier, ie. they were not ordered all "mpi bariera 1" first and
then all "mpi bariera 2", but first 1 then 2 and so on.
I do not understand it.

Me neither. It seems to be an MPI problem.



Regarding the Coarray status:



a) Coarrays for a single image (-fcoarray=single, but also -fcoarray=lib with a single image):


This mostly work correctly - the only issue are CLASS (polymorphic coarrays) and some issues with derived types with coarray components


b) Multi-images (-fcoarray=lib with MPI version of libcaf):


Only the very basic support is there: Registering/allocating coarrays, deregistering/deallocating coarrays, argument passing, this_image(), ucobound etc.

Missing are:
(1) Proper request handling in the libcaf_mpi library, i.e. some 'event' processing loop
(2) Implementation of SYNC IMAGES (and also sync all and error stop) with that method.
(3) Adding calls for the various data pull/push


Until (1)-(3) are at least partially implemented, no sensible coarray program is possible. As especially (3) is a larger job, it will take at least until mid-2012.

For 4.7 only some progress on (b)(1) is possible as only minor changes are allowed until the GCC 4.7.0 release, which could happen end of March.

For 4.8 the plan is to work on all those items, but it is completely unclear how far we will get. Especially as there are also other items like polymorphism are on the agenda.

Tobias

PS: Note that gfortran is developed by volunteers. The progress depends on the time the developers have - and whether new developers are joining. If you are interested ...


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