gutmann / coarray_icar

Testing implementation of CoArrays for the basic ICAR algorithms
MIT License
5 stars 6 forks source link

Coarray ICAR

National Center for Atmospheric Research

This document provides information about the Coarray ICAR program.

CONTENTS

Installation and testing

The first execution creates three .dat files and takes about 30 minutes usin 4 cores inside a Lubuntu Linux virtualmachine. Subsequent executions will read the .dat files and executive run much faster than the first run.

Installation and execution via Make and GCC in a bash shell:

$ cd coarray_icar/src/tests 
$ export COMPILER=gnu
$ make USE_ASSERTIONS=.true.
$ cafrun -n 4 ./test-ideal

which will run the test-ideal executable program in 4 images.

Installation via CMake and execution via CTest:

Compile and test coarray in a bash shell on a Linux, macOS, or the Windows Subsystem for Linux:

  cd <path-to-coarray-icar>  # Change directory to the coarray_icar source directory
  mkdir build            # create the build directory
  cd build
  FC=<compiler-command> cmake .. -DCMAKE_INSTALL_PREFIX=<coarray-icar-install-path>
  make -j <number-of-processes>
  ctest

where

For example, you might specify, ~/coarray_icar, 4, caf, and ~/bin, respectively, if the Coarray ICAR source is in your home directoy, you want to accelerate the build by using 4 parallel processes, and you use the command caf to invoke the GNU Fortran compiler via the [OpenCoarrays] wrapper. Alternatively, specify ifort as the compiler command for to invoke the Intel Fortran compiler and optionally specific -DDISTRIBUTED:BOOL=ON to compile using the Intel Parallel Studio Cluster Edition for execution on distributed-memory platforms:

  FC=ifort cmake .. -DDISTRIBUTED:BOOL=ON

Build options

Append -DNO_ASSERTIONS=ON to the above cmake command to turn off runtime checking of assertions. Including assertions enhances the runtime error checking at a significant cost (factor of 2 in runtime).

System requirements

The following operating systems are supported:

The following compilers are supported:

The following build software is supported:

Generating documentation

Install the FORD Fortran documentation generator and type

  ford doc-generator.md

which will create doc/ subdirectory containing HTML files. Open doc/index.html for the Coarray ICAR documentation. On Linux, you might exeute the following at the command prompt:

  firefox doc/index.html &