Hello,
I just wanted to notify those who are interested in a free compiler supporting Fortran coarrays that this is available in the OpenUH compiler. OpenUH is developed by the HPCTools group at the University of Houston. It is not a full Fortran 2008 implementation. It is based on the Open64 compiler, which support Fortran 95 and *some* Fortran 2003 features. We have implemented the coarray features that were added to Fortran 2008.
You can download a tarball of the prebuilt compiler or, if you wish, access the source code from here:
http://www2.cs.uh.edu/~openuh/download/
I am interested in getting feedback from the community on all aspects of the implementation -- performance issues, features that may not be implemented correctly, ease of installation on your particular system, etc.
A few notes about the implementation:
(1) OpenUH should support all the coarray features that are in Fortran 2008. This includes coarrays of basic types and derived types (including coarrays with pointer/allocatable components), the inquiry and transformational functions (this_image, image_index, num_images, ucobound, lcobound), all the sync statements (sync all, sync images, sync memory), locks, critical sections, error stop, and the atomic_define/atomic_ref subroutines.
(2) The runtime can be built against GASNet (1.18.2) or ARMCI (5.0). These are communication libraries designed to support PGAS implementations. If you are using the prebuilt compiler, then you need to download the separate caf-runtime source package and the build/install it into whereever you extracted the compiler. Both GASNet and ARMCI support a variety of networks or may operate in an SMP environment, so they provide good portability.
(3) The compiler name is uhcaf. The launcher program is cafrun. E.g.
# compile the program and links in the necessary runtime libraries:
$ uhcaf sample.f90 -o sample
# run the executable with 4 images, more options available with --help
$ cafrun -n 4 ./sample
(4) Performance is something we're focused on improving. We leverage the bulk-communication capabilities available in GASNet/ARMCI for contiguous and strided accesses across images. Currently, for the program to benefit from this it must be written using the array assignment syntax. For example, this:
x(:) = y(:)[p]
will get you better performance than this:
do i=lbound(x), ubound(x)
x(i) = y(i)[p]
end do
Another performance limitation is the compiler doesn't yet generate non-blocking calls to help overlap your communication and computation, but this is something we're working on and hope to have ready by the end of this year.
I hope the community finds this useful, and again I welcome any feedback or suggestions.
Thanks,
Deepak Eachempati
HPCTools Group
University of Houston