diff --git a/docs.it4i/salomon/software/numerical-languages/opencoarrays.md b/docs.it4i/salomon/software/numerical-languages/opencoarrays.md index d708bf21f6036adba2dad26c073ec337b2403af3..901a8020ae6d3fc117b1f1181c12c2fcc9c0f721 100644 --- a/docs.it4i/salomon/software/numerical-languages/opencoarrays.md +++ b/docs.it4i/salomon/software/numerical-languages/opencoarrays.md @@ -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 ``` -### Running 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) diff --git a/mkdocs.yml b/mkdocs.yml index 6f09d5b97c336be8bdccfa7d91cdf97b0e67dd7a..4ab7eb725f617721bb6155a34fc358e9a7ce3e2e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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: