Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
docs.it4i.cz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Petr Strakos
docs.it4i.cz
Commits
6d2ff606
Commit
6d2ff606
authored
8 years ago
by
Josef Hrabal
Browse files
Options
Downloads
Patches
Plain Diff
Added documentation for OpenCoarrays
parent
31afad08
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs.it4i/salomon/software/numerical-languages/opencoarrays.md
+23
-17
23 additions, 17 deletions
...it4i/salomon/software/numerical-languages/opencoarrays.md
mkdocs.yml
+2
-3
2 additions, 3 deletions
mkdocs.yml
with
25 additions
and
20 deletions
docs.it4i/salomon/software/numerical-languages/opencoarrays.md
+
23
−
17
View file @
6d2ff606
...
...
@@ -13,6 +13,8 @@ By default, the CAF is using Message Passing Interface (MPI) for lower-level com
Read more on
<http://www.opencoarrays.org/>
## Coarray Basics
### Indexing of coarray images
Indexing of individual images can be shown on the simple
*Hello World*
program:
...
...
@@ -74,13 +76,21 @@ Example program:
**number**
is the local variable while
**
number[
*index*
]
**
accesses the variable in a specific image.
**number[this_image()]**
is the same as
**number**
.
### Compiling CAF program
## Compile and run
Currently, version 1.8.10 compiled with OpenMPI 1.10.7 library is installed on Cluster. The OpenCoarrays module can be load as follows:
```
console
$
ml OpenCoarrays/1.8.10-GCC-6.3.0-2.27
```
### Compile CAF program
The preferred method for compiling a CAF program is by invoking the
*caf*
compiler wrapper.
The above mentioned
*Hello World*
program can be compiled as follows:
```
bash
$
caf hello_world.f90
-o
hello_world.x
```
console
$
caf hello_world.f90
-o
hello_world.x
```
!!! warning
...
...
@@ -89,33 +99,29 @@ The above mentioned *Hello World* program can be compiled as follows:
Another method for compiling is by invoking the
*mpif90*
compiler wrapper directly:
```
bash
$
mpif90 hello_world.f90
-o
hello_world.x
-L
$CAF_LIBRARY_PATH
-fcoarray
=
lib
-lcaf_mpi
```
console
$
mpif90 hello_world.f90
-o
hello_world.x
-fcoarray
=
lib
-lcaf_mpi
```
### Run
ning
CAF program
### Run CAF program
The preferred method for running a
CAF program
is
by invoking the
*cafrun*
wrapper:
A
CAF program
can be run
by invoking the
*cafrun*
wrapper
or directly by the
*mpiexec*
:
```
bash
$
cafrun
-np
4 ./hello_world.x
```
console
$
cafrun
-np
4 ./hello_world.x
Hello world from image 1 of 4
Hello world from image 2 of 4
Hello world from image 3 of 4
Hello world from image 4 of 4
```
where
**-np 4**
is number of images to run.
Another method is using the
*mpiexec*
directly:
```
bash
$
mpiexec
-np
4 ./synchronization_test.x
$
mpiexec
-np
4 ./synchronization_test.x
The random number is 242
The random number is 242
The random number is 242
The random number is 242
```
The parameters of
**cafrun**
and
**mpiexec**
are the same.
\ No newline at end of file
where
**-np 4**
is number of images to run. The parameters of
**cafrun**
and
**mpiexec**
are the same.
For more information about running CAF program please follow
[
Running OpenMPI
](
../mpi/Running_OpenMPI.md
)
This diff is collapsed.
Click to expand it.
mkdocs.yml
+
2
−
3
View file @
6d2ff606
...
...
@@ -117,9 +117,8 @@ pages:
-
Introduction
:
salomon/software/numerical-languages/introduction.md
-
Matlab
:
salomon/software/numerical-languages/matlab.md
-
Octave
:
salomon/software/numerical-languages/octave.md
-
R
:
salomon/software/numerical-languages/r.md
-
'
Fortran'
:
-
OpenCoarrays
:
salomon/software/numerical-languages/opencoarrays.md
-
R
:
salomon/software/numerical-languages/r.md
-
OpenCoarrays
:
salomon/software/numerical-languages/opencoarrays.md
-
Operating System
:
salomon/software/operating-system.md
-
ParaView
:
salomon/software/paraview.md
-
Anselm Software
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment