Co-Array Fortran: Questions & Answers for Amateur Programmers

  • Context: Fortran 
  • Thread starter Thread starter natski
  • Start date Start date
  • Tags Tags
    Fortran
Click For Summary
SUMMARY

The discussion centers on the challenges of using co-arrays in Fortran for parallel programming, particularly for amateur programmers. Users express frustration over the lack of support for co-arrays in Intel's Fortran compiler, despite references to Fortran 2008. The only available compiler with co-array support is g95, which presents complications such as requiring a console for network setup and being optimized for distributed systems rather than multi-core usage. A community member is developing an optimized co-array library for SMP machines, with a Linux version expected soon.

PREREQUISITES
  • F77/F90 programming experience
  • Understanding of parallel programming concepts
  • Familiarity with Fortran 2008 features
  • Basic knowledge of compiler functionalities and limitations
NEXT STEPS
  • Research the latest updates on Intel Fortran compiler support for co-arrays
  • Explore the g95 compiler and its co-array capabilities
  • Learn about the development of the new co-array library for SMP machines
  • Investigate alternative parallel programming models in Fortran, such as OpenMP
USEFUL FOR

This discussion is beneficial for amateur Fortran programmers, developers looking to optimize their code for multi-core processors, and anyone interested in the evolution of Fortran's parallel programming capabilities.

natski
Messages
262
Reaction score
2
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?

Natski
 
Technology news on Phys.org
natski said:
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?

Natski
The coarray console for g95 is for setting up the network for the coarray program-- ie logging into 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.

Andy
 
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!
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
8K