Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Co-Array Fortran

  1. Feb 10, 2010 #1
    Hi Guys,

    I have coded in f77/f90 for a few years in what I would consider a fairly amateurish way but I am now hitting the CPU wall for some programs and need to parallelize some programs to make use of multiple cores.

    Looking around Google, I quickly came across this co-array business which seems a perfect solution. I really want something intrinsic to Fortran rather than an extra layer. However, I am quite confused as to what is going on and would really appreciate to hear the views of the physicsforums.com community.

    Firstly, it appears to me Intel have not released a Fortran compiler which has co-arrays, is this correct? If so, I don't understand why all the references to co-arrays talk about Fortran 2008 due to implement this feature, but it is now 2010 and still no compiler? I mean that's missing a deadline by >2 years which seems bizarre for a company like Intel. What's going on there??

    Secondly, the only compiler, I *think*, which has this intrinsic co-array mode is g95 and even here there seems to be some issues. g95 seems to require a console which just doesn't make any sense to me why such a thing would be required... Also, the compiler is designed to run multiples images across a network rather than across multiple cores in a single machine. I really need the latter which makes me dumbfounded as to how to proceed.

    So this leaves me thinking, there is no solution currently present to produce an intrinsic coarray-type Fortran program... or at least certainly not an optimized one... is this correct too?

  2. jcsd
  3. Feb 13, 2010 #2

    The coarray console for g95 is for setting up the network for the coarray program-- ie logging in to the remote machines, transferring the executable and generally getting everything going. I'm thinking that may be a little too complicated, and have been considering alternatives.

    I've been working on a version of the coarray library optimized for SMP machines, no networking involved. The linux version (x86, x86-64 and ia64) should be done within a few days. Ports to architectures like sparc or ppc should be pretty straighforward, but first I'm planning on a windows version that will hopefully be done in a few more weeks. Check www.g95.org for updates.

    Like you, I've been pretty excited about coarrays-- they're integrated with the language much better than any of the parallel libraries and are far more readable code-wise than the huge and cryptic CALL statements of MPI or PVM.

  4. Feb 13, 2010 #3
    Thanks for the response Andy! Great to hear a new version is coming to linux very soon. I'm sure this will give a new lease of life to many of scripts!
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook