Re: Parallel programming with FORALL?
- From: Daniel Carrera <dcarrera@xxxxxxxxx>
- Date: Tue, 11 Jan 2011 15:44:48 -0800 (PST)
On Jan 12, 12:18 am, Dick Hendrickson <dick.hendrick...@xxxxxxx>
wrote:
Yes, that's the way it works. One statement is completely processed
before the next one is started. (Of course, the compiler can optimize
around this if things are safe.) This is different from DO loops. If
your FORALLs were naively replaced with DO loops you'd get a completely
different answer.
Yeah. I wrote it intentionally like that (mixing indices) because I
wanted to see that feature in action. It's interesting that you can do
things like that. Like, you could implement a transpose with:
forall (i = 1:N, j=1:N) B(i,j) = B(j,i) end forall
I think it's an interesting feature.
The F2008 DO CONCURRENT is sort of a replacement for FORALL. The
programmer guarantees that there is complete iteration-to-iteration
order independence in the loop. The compiler can freely spread the
execution across many CPUs. The loss is that DO CONCURRENT wouldn't
work for your example.
Sounds interesting. Too bad it's not implemented in GFortran.
Daniel.
.
- Follow-Ups:
- Re: Parallel programming with FORALL?
- From: Tobias Burnus
- Re: Parallel programming with FORALL?
- From: glen herrmannsfeldt
- Re: Parallel programming with FORALL?
- References:
- Parallel programming with FORALL?
- From: Daniel Carrera
- Re: Parallel programming with FORALL?
- From: gmail-unlp
- Re: Parallel programming with FORALL?
- From: Daniel Carrera
- Re: Parallel programming with FORALL?
- From: Dick Hendrickson
- Parallel programming with FORALL?
- Prev by Date: Re: Parallel programming with FORALL?
- Next by Date: Re: Read send and write an ASCII file
- Previous by thread: Re: Parallel programming with FORALL?
- Next by thread: Re: Parallel programming with FORALL?
- Index(es):
Relevant Pages
|