Skip to content

Commit 32a4a97

Browse files
author
Damian Rouson
authored
Merge pull request #479 from sourceryinstitute/issue-478
Issue 478 update documentation
2 parents 3f7d785 + 933a3a4 commit 32a4a97

File tree

7 files changed

+442
-224
lines changed

7 files changed

+442
-224
lines changed

INSTALL

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
Developer/quickstart installation guide
2+
=======================================
3+
4+
This guide assumes that the reader is on a *nix operating system.
5+
6+
Please report any issues encountered or bugs to:
7+
8+
<https://github.com/sourceryinstitute/OpenCoarrays/issues>
9+
10+
11+
How to build OpenCoarrays for the very impatient
12+
------------------------------------------------
13+
14+
mkdir opencoarrays-build
15+
cd opencoarrays-build
16+
export FC=/path/to/gfortran
17+
export CC=/path/to/gcc
18+
cmake /path/to/OpenCoarrays/source \
19+
-DCMAKE_INSTALL_PREFIX=/path/to/desired/installation/location
20+
make
21+
make test # optional; verify build works
22+
make install
23+
24+
25+
Intended audience
26+
-----------------
27+
28+
* GCC developers
29+
* Package maintainers
30+
* Experienced users who are comfortable installing software from source (with
31+
CMake)
32+
33+
A markdown document (best viewed online) with more detailed instructions is
34+
available. It is locally available at ./INSTALL.md and viewable online at:
35+
36+
<https://github.com/sourceryinstitute/OpenCoarrays/blob/master/INSTALL.md>
37+
38+
39+
Prerequisite software
40+
---------------------
41+
42+
Before installing OpenCoarrays you will need:
43+
44+
* CMake 3.4 or newer
45+
* GFortran 6.1 or newer
46+
* A standard conforming C compiler, GCC 6.1 or newer is preferred, but clang
47+
and other alternatives should be fine too
48+
* An MPI 3 implementation. MPICH 3.2 or newer is recommended, but others,
49+
such as OpenMPI, should work as well.
50+
51+
CMake binary and source distributions can be obtained from:
52+
53+
<https://cmake.org/download/>
54+
55+
MPICH may be obtained from <http://www.mpich.org/downloads/>.
56+
57+
58+
Before you start
59+
----------------
60+
61+
Please ensure that your environment is configured so that:
62+
63+
* The MPI-3 implementation's `mpiexec` and compiler wrapper scripts
64+
are at the front of your `$PATH`. (Load the MPICH environment module, if
65+
applicable, to accomplish this.)
66+
* Your environment is setup to use the compilers you wish to build and use
67+
OpenCoarrays with. (LD_LIBRARY_PATH is set, if needed, etc.)
68+
69+
Also, you will need the OpenCoarrays source, which, you presumably already
70+
have if you are reading this. The latest stable OpenCoarrays release can be
71+
obtained at:
72+
73+
<https://github.com/sourceryinstitute/OpenCoarrays/releases/latest>
74+
75+
or the latest development version may be obtained from Github, either through
76+
the web UI or using git:
77+
78+
git clone https://github.com/sourceryinstitute/OpenCoarrays
79+
80+
81+
Configure, build and install OpenCoarrays
82+
-----------------------------------------
83+
84+
OpenCoarrays does *NOT* allow in source builds. Once you have obtained the
85+
source code, you must create a build directory. This may be a subdirectory of
86+
the top level source directory, or in a completely un-related location.
87+
88+
mkdir opencoarrays-build
89+
cd opencoarrays-build
90+
91+
Next tell CMake which C and Fortran compilers you want to use and configure
92+
the project with CMake. The Fortran compiler must be GFortran 6.1 or later.
93+
The OpenCoarrays build system uses system introspection and other means to
94+
ensure the version of the library built has interfaces matching the version
95+
of GFortran specified at compile time. No CMake configuration options should
96+
need tinkering with. A list of CMake variables that modify the OpenCoarrays
97+
build will be given at the end of this document.
98+
99+
export FC=/path/to/gfortran # You can use the version on your PATH
100+
export CC=/path/to/gcc
101+
102+
cmake /path/to/OpenCoarrays/source \
103+
-DCMAKE_INSTALL_PREFIX=/path/to/desired/install/location
104+
105+
Next build the library, wrapper scripts, and test programs, optionally run
106+
the tests and install OpenCoarrays:
107+
108+
make -j 8 # Parallel builds are supported
109+
make test # invoke ctest
110+
make install
111+
112+
113+
Configure options
114+
-----------------
115+
116+
The OpenCoarrays build system attempts to set the best possible defailt
117+
settings for your Fortran compiler and MPI implementation through intro-
118+
spection. However, some bugs or use cases may warrant tweaking the config-
119+
uration. Each of the following options may be set using the `-D` flag to
120+
cmake or using the CMake gui interfaces, ccmake or cmake-gui. e.g.,
121+
122+
cmake /path/to/source -DVAR=VALUE
123+
124+
Basic configure options:
125+
126+
CMAKE_INSTALL_PREFIX
127+
Tell cmake where to install OpenCoarrays. Default=/usr/local
128+
Example: cmake .. -DCMAKE_INSTALL_PREFIX=/opt/OpenCoarrays/1.9.1
129+
130+
CMAKE_BUILD_TYPE
131+
Specify the build type. Default value: Release
132+
Options to pick from are:
133+
* Debug
134+
* Release
135+
* MinSizeRel
136+
* RelWithDebInfo
137+
* CodeCoverage
138+
Example: cmake .. -DCMAKE_BUILD_TYPE=Debug
139+
140+
CAF_ENABLE_FAILED_IMAGES
141+
Enable failed image support. Defaults to TRUE if experimental fault
142+
tolerance features are detected to be present in the MPI
143+
implementation. FALSE/unavailable if no MPI support is present
144+
Example: cmake .. -DCAF_ENABLE_FAILED_IMAGES=FALSE
145+
146+
CAF_EXPOSE_INIT_FINALIZE
147+
Expose caf_init and caf_finalize in the OpenCoarrays extensions
148+
module. This helps facilitate hybrid MPI-CAF programming.
149+
Default=FALSE
150+
Example: cmake .. -DCAF_EXPOSE_INIT_FINALIZE=TRUE
151+
152+
CAF_RUN_DEVELOPER_TESTS
153+
Run tests intended for developers that trigger known failures due to
154+
bugs, regressions and other issues. Default=FALSE unless user sets
155+
the environment variable OPENCOARRAYS_DEVELOPER=TRUE
156+
Example: cmake .. -DCAF_RUN_DEVELOPER_TESTS=TRUE
157+
158+
For a look at all of the possible CMake settings, many/most of which are
159+
default CMake options, please run `ccmake /path/to/source` or
160+
`cmake-gui /path/to/source`.

0 commit comments

Comments
 (0)