Fortran Co-Array Fortran: Questions & Answers for Amateur Programmers

  • Thread starter Thread starter natski
  • Start date Start date
  • Tags Tags
    Fortran
AI Thread Summary
The discussion centers on the challenges of parallelizing Fortran programs using co-arrays, particularly for users familiar with Fortran 77/90. The main concern is the lack of support for co-arrays in Intel's Fortran compiler, despite references to Fortran 2008, leading to confusion about the timeline for implementation. Users express frustration over the limited options available, noting that g95 is currently the only compiler with co-array capabilities, but it requires a console for network setup, complicating local multi-core execution. There is a mention of ongoing development of a coarray library optimized for symmetric multiprocessing (SMP) machines, which aims to simplify the process and enhance usability. Overall, the community seeks intrinsic solutions within Fortran for effective parallelization without relying on external libraries.
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!
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Replies
14
Views
5K
Replies
2
Views
3K
Replies
16
Views
2K
Replies
4
Views
2K
Replies
6
Views
2K
Replies
4
Views
2K
Replies
5
Views
3K
Replies
3
Views
8K
Back
Top