@@ -4,13 +4,13 @@ Since the introduction of the Fortran 2008 standard, Fortran is a
4
4
parallel language. Unlike the parallel extensions
5
5
[ OpenMP] ( https://www.openmp.org/ ) or
6
6
[ OpenACC] ( https://www.openacc.org/ ) , the coarray parallelism
7
- Coarrays is built into the language core, so there no
7
+ Coarrays is built into the language core, so there are
8
8
fewer problems with interaction between different standards and
9
9
different standards bodies.
10
10
11
11
This tutorial aims to introduce Fortran coarrays to the general user.
12
12
A general familiarity with modern Fortran is assumed. People who are
13
- not familar, but are familiar with other imperative languages like C
13
+ not familar with Fortran , but are familiar with other imperative languages like C
14
14
might need to refer to other sources such as the [ FortranWiki] ( http://fortranwiki.org/fortran/show/HomePage ) to check what
15
15
individual language constructs mean.
16
16
@@ -25,21 +25,21 @@ memory of other images via special constructs.
25
25
This is more loosely coupled than the thread model, where threads
26
26
share variables unless explicitly directed otherwise.
27
27
28
- Using PGAS means that coarray Fortran can be used on a massively
28
+ Using PGAS means that coarray Fortran can be used on a
29
29
massively parallel computing system as well as a shared-memory
30
30
implementation on a single, multi-CPU computer.
31
31
32
32
## A remark on compiling and running the example programs
33
33
34
- If you want to try out the example programs, you need have a coarray-capable
34
+ If you want to try out the example programs, you need to have a coarray-capable
35
35
compiler and know how to compile and run the programs. Setting the number
36
36
of images is done in a compiler-dependent manner, usually via a compiler option,
37
37
an environment variable, or, if the system is MPI-based, as an argument
38
38
to ` mpirun ` .
39
39
40
40
# Images and synchronization
41
41
42
- One central concepts of coarray Fortran is that of an image. When a
42
+ One central concept of coarray Fortran is that of an image. When a
43
43
program is run, it starts multiple copies (or, possibly, one copy) of
44
44
itself. Each image runs in parallel until completion, and works
45
45
independently of other images unless the programmer specifically
@@ -63,6 +63,7 @@ This program will output something like
63
63
```
64
64
depending on how many images you run and shows the use of two
65
65
important functions: The number of images that is run can be found
66
+ with the
66
67
` num_images() ` function and the current image via ` this_image() ` .
67
68
Both of these are functions that are built into the language
68
69
(so-called intrinsic functions).
@@ -97,7 +98,7 @@ The output will look something like
97
98
Goodbye from image 1 of 4
98
99
Goodbye from image 2 of 4
99
100
```
100
- What you can do instead is to put things into order is to insert
101
+ What you can do instead to put things into order is to insert
101
102
` SYNC ALL ` between the two ` write ` statements, like this:
102
103
```
103
104
program main
@@ -471,7 +472,7 @@ to have MPI installed to run it.
471
472
Another possibilility currently under development is the [ shared
472
473
memory coarray
473
474
branch] ( https://gcc.gnu.org/git/?p=gcc.git;a=tree;h=refs/heads/devel/coarray_native;hb=refs/heads/devel/coarray_native ) .
474
- This is currently under active development, but does not yet have all
475
+ This will work without any additional libraries and currently under active development, but does not yet have all
475
476
features implemented.
476
477
477
478
## Using ifort
0 commit comments