4
4
5
5
# [ Getting Started] ( #getting-started ) #
6
6
7
- * [ Compiling a CAF Program]
8
- * [ The caf compiler wrapper]
9
- * [ A sample basic workflow]
10
- * [ Sample advanced workflows]
11
- * [ Executing a CAF Program]
12
- * [ The cafrun program launcher]
13
-
14
- <a name =" compiling-a-caf-program " >
15
- ## Compiling a CAF Program ##
16
- </a >
7
+ * [ The caf compiler wrapper]
8
+ * [ A sample basic workflow]
9
+ * [ An advanced workflow]
17
10
18
11
<a name =" the-caf-compiler-wrapper " >
19
- ### The caf compiler wrapper # ##
12
+ ## The caf compiler wrapper ##
20
13
</a >
21
14
22
15
The preferred method for compiling a CAF program is by invoking the "caf" bash script
@@ -51,14 +44,14 @@ For example, a non-OCA CAF compiler, such as the Cray or Intel compilers, might
51
44
program's coarray square-bracket syntax, while OpenCoarrays supports the same program's calls to
52
45
collective subroutine such as ` co_sum ` and ` co_reduce ` .
53
46
54
- <a name =" a-sample-basic-workflow " >
55
- ### A sample basic workflow # ##
47
+ <a name =" workflow-with-oca-aware-compiler " >
48
+ ## A sample basic workflow ##
56
49
</a >
57
50
58
- ## Compiling and Running with an OpenCoarrays-aware (OCA) CAF Compiler</ a > ##
59
-
60
- Inserting the "bin" directory of the chosen installation path into the user's PATH enables the following
61
- CAF program compilation and execution workflow :
51
+ The following program listing, compilation, and execution workflow exemplify
52
+ the use of an OCA compiler (e.g., gfortran 5.1.0 or later) in a Linux bash shell
53
+ with the "bin" directory of the chosen installation path in the user's PATH
54
+ environment variable :
62
55
63
56
$ cat tally.f90
64
57
program main
@@ -86,19 +79,19 @@ CAF program compilation and execution workflow:
86
79
where "4" is the number of images to be launched at program start-up.
87
80
88
81
<a name="extending-a-non-oca-CAF-compiler"
89
- ## Extending a Non-OCA CAF Compiler </a > ##
82
+ ## An advanced workflows </a > ##
90
83
91
- To extend the capabilities of a non-OCA CAF compiler (e.g., the Intel or Cray compilers)
92
- or a non-CAF compiler (e.g., GCC 4.9), access the types and procedures of the
93
- [ opencoarrays module] by use assocication. For example, insert the following at line 2
94
- in the above example:
84
+ To extend the capabilities of a non-OCA CAF compiler (e.g., the Intel or Cray compilers),
85
+ access the types and procedures of the [ opencoarrays module] by use assocication. We
86
+ recommend using a ` use ` statement with an ` only ` clause to reduce the likelihood of a
87
+ name clash with the compiler's native CAf support. For eample, innsert the following
88
+ at line 2 of ` tally.f90 ` above:
95
89
96
90
use opencoarrays, only : co_sum
97
91
98
- Then compile with the "caf" compiler wrapper and launch with "cafrun" program launcher.
99
-
100
- <a name =" sample-advanced-workflow " >
101
- ### A sample advanced workflows</a > ###
92
+ To extend the capabilities of a non-CAF compiler (e.g., GCC 4.9), use an unqualified
93
+ ` use ` statement with no ` only ` clause. The latter practrice reduces the likelihood of
94
+ name clashes with the compiler's or programs existing capabilities.
102
95
103
96
If the "caf" compiler wrapper cannot process the source code in question, invoke
104
97
the underlying communication library directly:
@@ -119,6 +112,7 @@ and also run the program with the lower-level commnication library:
119
112
[ The caf compiler wrapper ] : #the-caf-compiler-wrapper
120
113
[ The cafrun program launcher ] : #the-cafrun-program-launcher
121
114
[ Compiling a CAF Program ] : #compiling-a-caf-program
122
- [ A sample basic workflow] : #a-sample-basic-workflow
115
+ [ workflow-with-oca-aware-compiler ] : #workflow-with-oca-aware-compiler
123
116
[ Sample advanced workflows ] : #sample-advanced-workflows
124
- [ Executing a CAF program ] : #executing-a-caf-program
117
+ [ or a non-CAF compiler (e.g., GCC 4.9)Executing a CAF program ] : #executing-a-caf-program
118
+
0 commit comments