Co-Array Fortran: Questions & Answers for Amateur Programmers

  • Fortran
  • Thread starter natski
  • Start date
  • Tags
    Fortran
In summary, the coarray compiler for g95 is not released yet, and there is no Fortran compiler with co-arrays. However, a windows version of the coarray library is being developed.
  • #1
natski
267
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
  • #2
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
 
  • #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!
 

What is Co-Array Fortran?

Co-Array Fortran is an extension of the Fortran programming language that allows for parallel programming. It allows multiple instances of the same program to run simultaneously, sharing data and communicating with each other.

What are the advantages of using Co-Array Fortran?

Co-Array Fortran can greatly increase the speed and efficiency of programs that require large amounts of data processing. It also simplifies the process of writing parallel programs, as it eliminates the need for complex communication and synchronization code.

How is Co-Array Fortran different from traditional Fortran?

Co-Array Fortran adds co-array constructs to the Fortran language, which allows for parallel programming. These constructs include co-array variables, co-array notation, and co-array statements. Traditional Fortran does not have these features.

Can Co-Array Fortran be used on any computer?

Co-Array Fortran can be used on any computer that supports parallel processing. This includes supercomputers, cluster systems, and multi-core processors. However, it may not be supported on older or less powerful systems.

Are there any resources available for learning Co-Array Fortran?

Yes, there are many resources available for learning Co-Array Fortran. These include online tutorials, books, and community forums. The official Co-Array Fortran website also has documentation and examples to help amateur programmers get started.

Similar threads

  • Programming and Computer Science
Replies
14
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Programming and Computer Science
Replies
4
Views
2K
  • Programming and Computer Science
Replies
2
Views
3K
  • Programming and Computer Science
Replies
6
Views
2K
  • Programming and Computer Science
Replies
17
Views
1K
  • Programming and Computer Science
Replies
4
Views
2K
  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
5
Views
3K
  • Programming and Computer Science
Replies
6
Views
2K
Back
Top