Skip to content

Commit f652a7b

Browse files
author
Damian Rouson
authored
Merge pull request #328 from sourceryinstitute/edit-install-doc
Edit INSTALL.md to match current options
2 parents 86ad114 + 402dbfe commit f652a7b

File tree

1 file changed

+122
-88
lines changed

1 file changed

+122
-88
lines changed

INSTALL.md

Lines changed: 122 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -13,110 +13,129 @@ Download this file as a PDF document
1313
[here](http://md2pdf.herokuapp.com/sourceryinstitute/opencoarrays/blob/master/INSTALL.pdf).
1414

1515
* [End-User Installation]
16-
* [Installation Script]
17-
* [OS X]
16+
* [macOS]
1817
* [Windows]
1918
* [Linux]
19+
* [Virtual machine]
20+
* [Installation Script]
2021
* [Advanced Installation from Source]
2122
* [Prerequisites]
22-
* [CMake]
23+
* [CMake scripts]
2324
* [Make]
2425
* [Obtaining GCC, MPICH, and CMake]
2526

2627
End-User Installation
2728
---------------------
2829

29-
### Installation Script###
30+
Most users will find it easiest and fastest to use package management software to install OpenCoarrays.
31+
Package management options for macOS (formerly known as OS X), Windows, and Linux are described first
32+
below. Also described below are options for installing via the Sourcery Institute virtual machine or
33+
the OpenCoarrays installation script.
34+
35+
### macOS ###
3036

31-
As of release 1.2.0, users might consider installing by downloading and uncompressing
32-
a file from our [Releases] page and running the installation script in the top-level
33-
source directory:
37+
OS X users may use the [Homebrew] or [MacPorts] package management systems to install OpenCoarrays.
38+
We recommend [Homebrew].
3439

40+
Homebrew installation steps:
3541
```
36-
tar xvzf OpenCoarrays-x.y.z.tar.gz
37-
cd OpenCoarrays-x.y.z
38-
./install.sh
42+
brew update
43+
brew install opencoarrays
3944
```
4045

41-
where `x.y.z` should be replaced with the appropriate version numbers. For a scripted or unattended build, use
42-
`./install.sh -y` or equivalently `./install.sh --yes-to-all`, which will assume affirmative answers
43-
to all user prompts and will only prompt the user if an installation directory is chosen that requires
44-
`sudo` privelenges (by passing `-i` or equivalently `--install-prefix`).
45-
46-
Before installing OpenCoarrays, the above bash script will attempt to detect the presence
47-
of the default prerequisite packages: [GCC], [MPICH] , and [CMake]. For additional details, see the [Prerequisites] section. If any of the
48-
aforementioned packages appear to be absent from the user's PATH environment variable,
49-
the [install.sh] script will attempt to download, build, and install any missing packages
50-
after asking permission to do so. The script has been tested on Linux and OS X. Please
51-
submit any related problems or questions to our [Issues] page.
52-
53-
A complete installation should result in the creation of the following directories
54-
inside the installation path (.e.g, inside `build` in the above example):
55-
56-
* `bin`: contains the compiler wrapper (`caf`), program launcher (`cafun`), and prerequisites builder (`build`)
57-
* `mod`: contains the `opencoarrays.mod` module file for use with non-OpenCoarrays-aware compilers
58-
* `lib`: contains the `libcaf_mpi.a` static library to which codes link for CAF support
59-
60-
The remainder of this document explains other options that many end users will find
61-
simplest to obtain OpenCoarrays on OS X, Windows, or Linux without building OpenCoarrays
62-
from its source code.
63-
64-
### OS X ###
65-
66-
OS X users might find it easiest to install OpenCoarrays using the [MacPorts]
67-
package management system. After installing [MacPorts], type the following:
68-
46+
MacPorts installation steps:
6947
```
7048
sudo port selfupdate
7149
sudo port upgrade outdated
7250
sudo port install opencoarrays
7351
```
52+
where the `sudo` command requires administrator privileges. If you install using MacPorts, please
53+
also install the `mpstats` port as follows:
54+
```
55+
sudo port install mpstats
56+
```
57+
which supports future OpenCoarrays development by providing download data the OpenCoarrays team
58+
uses in proposals for research grants and development contracts.
59+
60+
### Windows ###
7461

75-
where the `sudo` command requires administrator privileges and where the first
76-
two steps above are required only if the [MacPorts] ports were last updated prior
77-
to 30 September 2015, when the OpenCoarrays port was incorporated into [MacPorts].
78-
Repeating the first two steps above will also update OpenCoarrays to the latest
79-
release.
62+
Windows users may run the windows-install.sh script inside the Windows Subsystem for Linux (WSL).
8063

81-
Please also install the `mpstats` port as follows:
64+
Requirements:
65+
* WSL release 14936 or later,
66+
* Windows Insider Preview, and
67+
* "Fast" updates option.
8268

69+
Steps:
8370
```
84-
sudo port install mpstats
71+
do-release-upgrade
72+
./windows-install.sh
8573
```
74+
where the first command above updates the default Ubuntu 14.04 to 16.04 and the second command must
75+
be executed with the present working directory set to the top level of the OpenCoarrays source tree.
8676

87-
which supports future OpenCoarrays development by providing download data the
88-
OpenCoarrays team can use in proposals for research grants and development
89-
contracts.
77+
The `windows-install.sh` installation script uses Ubuntu's `apt-get` package manager to build
78+
[GCC] 5.4.0, [CMake], and [MPICH]. Windows users who desire a newer version of GCC are welcome to
79+
submit a request via our [Issues] page and suggest a method for updating. Previously attempted
80+
upgrade methods are described in the discussion thread starting with [commit comment 20539810].
9081

91-
### Windows ###
82+
### Linux ###
83+
84+
The [Arch Linux] distribution provides an [aur package] for installing OpenCoarrays. Users of
85+
other Linux distributions may install the [Virtual machine] or use the [Installation Script].
86+
Alternatively, if you desire to install using other Linux package Linux package management
87+
software such as [dnf] or [apt-get], please submit a feature request via our [Issues] page.
88+
89+
## Virtual machine ##
9290

93-
Windows users will find it easiest to download the Lubuntu Linux virtual
94-
machine from the [Sourcery Institute Store]. The virtual machine boots inside
95-
the open-source [VirtualBox] virtualization package. In addition to containing
96-
GCC 4.9, 5.2, and 6.0, MPICH, OpenMPI, and OpenCoarrays, the virtual machine
97-
contains dozens of other open-source software packages that support software
98-
development in modern Fortran. See the [download and installation instructions]
91+
Users of macOS, Windows, or Linux have the option to use OpenCoarrays by installing the Lubuntu
92+
Linux virtual machine from the [Sourcery Institute Store]. The virtual machine boots inside
93+
the open-source [VirtualBox] virtualization package. In addition to containing [GCC], [MPICH],
94+
and OpenCoarrays, the virtual machine contains dozens of other open-source software packages
95+
that support modern Fortran software development. See the [download and installation instructions]
9996
for a partial list of the included packages.
10097

101-
Alternatively, if you desire to use OpenCoarrays under Cygwin, please submit a
102-
feature request via our [Issues] page.
98+
## Installation Script ##
10399

104-
### Linux ###
100+
If the above package management or virtualization options are infeasible or unavailable,
101+
Linux and macOS users may also install OpenCoarrays by downloading and uncompressing our
102+
[latest release] and running our installation script in the top-level OpenCoarrays source
103+
directory (see above for the corresponding [Windows] script):
104+
```
105+
tar xvzf OpenCoarrays-x.y.z.tar.gz
106+
cd OpenCoarrays-x.y.z
107+
./install.sh
108+
```
109+
where `x.y.z` should be replaced with the appropriate version numbers. For a scripted or unattended build, use
110+
`./install.sh -y` or equivalently `./install.sh --yes-to-all`, which will assume affirmative answers
111+
to all user prompts and will only prompt the user if an installation directory is chosen that requires
112+
`sudo` privelenges (by passing `-i` or equivalently `--install-prefix`).
113+
114+
Before installing OpenCoarrays, the above bash script will attempt to detect the presence of the
115+
default prerequisite packages: [GCC], [MPICH] , and [CMake]. For additional details, see the
116+
[Prerequisites] section. If any of the installation script cannot find the prerequisite packages,
117+
the [install.sh] script will attempt to download, build, and install any missing packages
118+
after asking permission to do so. The script has been tested on Linux and OS X. Please
119+
submit any related problems or questions to our [Issues] page.
120+
121+
A complete installation should result in the creation of the following directories
122+
inside the installation path (.e.g, inside `build` in the above example):
123+
124+
* `bin`: contains the compiler wrapper (`caf`) and program launcher (`cafun`).
125+
* `mod`: contains the `opencoarrays.mod` module file for use with non-OpenCoarrays-aware compilers
126+
* `lib`: contains the `libcaf_mpi.a` static library to which codes link for CAF support
105127

106-
The [Arch Linux] distribution provides an [aur package] for installing OpenCoarrays.
107-
Users of other Linux distributions who prefer not to build OpenCoarrays from source might
108-
access OpenCoarrays via the the Lubuntu Linux virtual machine from the
109-
[Sourcery Institute Store] after installing the version of [VirtualBox] that is suitable
110-
for the relevant Linux distribution. Alternatively, if you desire to install using other
111-
Linux package management software such as [yum] or [apt-get], please submit a feature
112-
request via our [Issues] page.
113128

114129
Advanced Installation from Source
115-
--------------------
130+
---------------------------------
116131

117132
### Prerequisites: ###
118133

119-
The prerequisites below and their dependencies are recommended for the broadest coverage of CAF features. If a prerequisite is missing or outdated, the [install.sh] script will prompt the user for permission to download, compile, and install it. Before doing so, [install.sh] will verify whether that prerequisite's prerequisites are present and will recursively traverse the dependency tree until reaching an acceptable prerequisite or reaching the end of a branch.
134+
The prerequisites below and their dependencies are recommended for the broadest coverage of CAF features.
135+
If a prerequisite is missing or outdated, the [install.sh] script will prompt the user for permission to
136+
download, compile, and install it. Before doing so, [install.sh] will verify whether that prerequisite's
137+
prerequisites are present and will recursively traverse the dependency tree until reaching an acceptable
138+
prerequisite or reaching the end of a branch.
120139

121140
```
122141
opencoarrays
@@ -133,15 +152,15 @@ opencoarrays
133152

134153
If using the advanced [CMake] or [Make] builds detailed below, please ensure that these dependencies are met before attempting to build and install OpenCoarrays.
135154

136-
### CMake ###
155+
### CMake scripts ###
137156

138157
#### N.B.: ####
139158

140159
__As of OpenCoarrays 1.7.6, passing `FC=mpi_fortran_wrapper` and
141160
`CC=mpi_c_wrapper` is *DEPRECATED*. Please pass `FC=/path/to/gfortran`
142161
and `CC=/path/to/gcc`. If you are experimenting with the source to
143162
source translation capabilities, then please point `FC` and `CC` to
144-
your Fortran and C compilers of choice. In the case of CRAY, or a
163+
your Fortran and C compilers of choice. In the case of Cray, or a
145164
compiler in which MPI is *built-in* to the compiler, you still pass
146165
the `FC` and `CC` as the Fortran and C compiler, even though MPI is
147166
built-in.__
@@ -221,39 +240,51 @@ transfer support, uncomment the `-DSTRIDED` flag inside the [make.inc] file.
221240
Obtaining GCC, MPICH, and CMake
222241
-------------------------------
223242

224-
[GFortran Binaries] 5 binary builds are available at <https://gcc.gnu.org/wiki/GFortranBinaries>. Also,
225-
the Lubuntu Linux virtual machine available for download in the [Sourcery Store] includes
226-
builds of GCC 4.9, 5.2, and 6.0.
243+
[GFortran Binaries] binary builds are available at <https://gcc.gnu.org/wiki/GFortranBinaries>.
227244

228245
To build all prerequisites from source, including the current development branch of GCC,
229246
you might first try the running the provided [install.sh] script as described above in
230-
the [Installation Script] section. Or try building each prerequisite from source as
231-
follows:
247+
the [Installation Script] section or try building each prerequisite from source inside
248+
a bash shell as follows:
232249

233250
```
234-
cd prerequisites
235-
CC=gcc FC=gfortran CXX=g++ ./build flex
236-
./build gcc
237-
CC=gcc FC=gfortran CXX=g++ ./build mpich
238-
./build cmake
251+
export gcc_install_path=/desired/installation/destination
252+
./install.sh --package gcc --install-prefix "${gcc_install_path}"
253+
./install.sh --package mpich \
254+
--with-fortran "${gcc_install_path}"/bin/gfortran \
255+
--with-c "${gcc_install_path}"/bin/gcc \
256+
--with-cxx "${gcc_install_path}"/bin/g++
257+
./install.sh --pacakge cmake \
258+
--with-fortran "${gcc_install_path}"/bin/gfortran \
259+
--with-c "${gcc_install_path}"/bin/gcc \
260+
--with-cxx "${gcc_install_path}"/bin/g++
239261
```
240262

241-
where the second line builds the flex package that is required for building gcc from source.
242-
243-
[Links]: #
263+
[Internal document links]: #
244264

245265
[End-User Installation]: #end-user-installation
246-
[Installation Script]: #installation-script
247-
[install.sh]: ./install.sh
248-
[OS X]: #os-x
249-
[ticket]: https://trac.macports.org/ticket/47806
266+
[macOS]: #macos
250267
[Windows]: #windows
251268
[Linux]: #linux
269+
[Virtual machine]: #virtual-machine
270+
[Installation Script]: #installation-script
271+
252272
[Advanced Installation from Source]: #advanced-installation-from-source
253273
[Prerequisites]: #prerequisites
254-
[CMake]: #cmake
274+
[CMake scripts]: #cmake-scripts
255275
[Make]: #make
276+
256277
[Obtaining GCC, MPICH, and CMake]: #obtaining-gcc-mpich-and-cmake
278+
279+
280+
[Links to source]: #
281+
282+
[install.sh]: ./install.sh
283+
284+
285+
[URLs]: #
286+
287+
[CMake]: http://www.cmake.org
257288
[Sourcery Store]: http://www.sourceryinstitute.org/store
258289
[Sourcery Institute Store]: http://www.sourceryinstitute.org/store
259290
[VirtualBox]: http://www.virtualbox.org
@@ -273,5 +304,8 @@ where the second line builds the flex package that is required for building gcc
273304
[Installing GCC]: https://gcc.gnu.org/install/
274305
[Arch Linux]: https://www.archlinux.org
275306
[aur package]: https://aur.archlinux.org/packages/opencoarrays/
276-
[Releases]: https://github.com/sourceryinstitute/opencoarrays/releases
307+
[latest release]: https://github.com/sourceryinstitute/opencoarrays/releases/latest
277308
[pdf img]: https://img.shields.io/badge/PDF-INSTALL.md-6C2DC7.svg?style=flat-square "Download as PDF"
309+
[commit comment 20539810]: https://github.com/sourceryinstitute/opencoarrays/commit/26e99919fe732576f7277a0e1b83f43cc7c9d749#commitcomment-20539810
310+
[Homebrew]: http://brew.sh
311+
[dnf]: https://github.com/rpm-software-management/dnf

0 commit comments

Comments
 (0)