-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathINSTALL
144 lines (113 loc) · 6.21 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Installing MPC {#installmpc}
Dependencies
------------
In order to be able to install MPC you will need the following dependencies:
- `patch`
- `tar` / `bzip2` / `gunzip`
- `basename` / `dirname`
- `which`
- `make`
- a base compiler (`gcc`, `icc`...)
- `hwloc 1.11.11`
- `python` (can be optional)`
- `libncurses-devel` (to have full GDB support)
- `libibverbs` (for Infiniband support)
- `libportals4` (for Portals4 support)
Most of them are available on every systems, but fresh new OS installations can
not provide them by default. Be sure to have the mandatory ones before
continuing. At least one compiler is required, the detection should be done by
the installation process, In case it fails, please consult the documentation for
expliciting the compiler through the dedicated option. Others dependencies
linked to provided packages are included and directly managed through the
install script.
Installation Process
--------------------
NOTE: MPC can also be used in a modular fashion (component by component)
if this is of interest please refer to section "Modular MPC" as the rest
of this section covers the "bundle install" of MPC using ./installmpc
Once you downloaded the archive from the website, you may proceed as follows.
Note that by default, if you run the `installmpc` script directly into the
source directory, a `build` directory will be automatically created to avoid
squashing source and build altogether.
$ tar xf MPC_$VERSION.tar.gz
$ cd MPC_$VERSION
$ mkdir BUILD && cd BUILD
$ ../installmpc --prefix=$PREFIX
The compiler will be detected by default a privatizing compiler is compiled. To
avoid any ambiguous detection, one can specify the specific compiler to use
through the `--compiler` option. For example, using such command with the Intel
compiler will avoid MPC to build the embedded patched GCC compiler.
MPC relies on a number of dependencies (openpa, hwloc...) and some may be
missing in the archive you downloaded (for archive size reasons). Considering
the current installation process can have an internet connection, on might
consider using the `--download-missing-deps` option. Any of the dependency can
be overriden with a custom, already installed version, anywhere on the system.
An option exist for each, similar to `--with-<dep>=/path`. In these cases, it is
up to the user to ensure the compatibility between the external dependency and
MPC's requirement. A complete list of dependency versions can be found in
`utils/config.txt`. On the contrary, to forward extra arguments when building embedded
dependencies, one can use `--<dep>-<arg>`. Here two examples for HWLOC support :
$ ./installmpc --with-hwloc=/app/hwloc/
$ ./installmpc --hwloc-disable-cuda #forwared to hwloc configure as
--disable-cuda
Beyond these basic options, some useful others are listed and detailed below :
* `--disable-autopriv` if you are not intending on running MPI processes inside
threads and therefore do not need the privatization support
* `--enable-debug` to enable full debugging for MPC purpose. Will build
MPC in debug mode *AND* will build the GDB support for MPC.
* `--disable-prefix-check` to confirm you want to erase any existing
installation specified by $PREFIX. Not used by default to prevent accidental
overrides.
* `--enable-color` if MPC should be build with terminal color support.
__WARNING__: if you intend to rely on SLURM you should build MPC as follows (by
default MPC is build with hydra support):
$ ../installmpc --prefix=$PREFIX -j8 --with-slurm
Any MPC option (which can be found by running `./mpcframework/configure --help`)
can be provided when invoking the `installmpc` script through the `--mpc-option`
argument. Ex:
$ ./installmpc --prefix=$PREFIX -j8 --mpcframework="--enable-cma"
Modular MPC
-----------
MPC can also be installed directly using the configure script (see ./configure --help) in this later
case loading and installing dependencies is to be done manually.
MPC can build with the following REQUIRED dependencies:
- OpenPA (spack install openpa or https://github.com/pmodels/openpa/)
- HWLOC 1.11.x (spack install hwloc or http://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-1.11.11.tar.gz)
- A launcher:
* Hydra (spack install hydra or http://www.mpich.org/static/downloads/3.2/hydra-3.2.tar.gz)
* PMI (requires libpmi.so --with-slurm / --with-pmi1)
* PMIx (required libpmix.so --with-pmix)
It is possible to choose between the followign "modules" with --enable/disable-X:
- *lowcomm*: the base networking engine for MPC can be manipulated using the mpc_lowcomm.h header
- *threads*: user-level thread support (provides posix thread interface pthread.h, semaphore.h, ..)
- *openmp*: requires *threads* provides OpenMP support (GOMP and Intel ABIs)
- *mpi*: requires *lowcomm* provides the MPI 3.1 interface
- *fortran*: requires *mpi* provides the fortran 77,90,08 bindings for MPC
- *mpiio*: requires *mpi* provides the MPI IO interface (both Fortran and C)
For example, a lowcomm only version of MPC can be compiled with `--disable-mpi --disable-threads`. The
configure (or the mpc_status command) should provide information relative to the enabled components.
NOTE: when the configure succeeds once a reconfigure script is provided for convenience it can be used
to pass new options to the configure. You may have to pass `--disable-prefix-check` to acknowledge that
you may be reinstalling MPC in a non-empty prefix (at your own risks).
Sourcing MPC
------------
In order to start using MPC you have to first source it into your environment.
If we consider *$PREFIX* as the prefix to your MPC installation, You can proceed
like :
# for any bash, zsh, dash shells
$ source $PREFIX/mpcvars.sh
It will load in your current environment the whole MPC setup, impling a
modification of the following :
* __PATH__
* __LD_LIBRARY_PATH__
* __MANPATH__
By setting the **PATH** variable, the following commands will then be accessible
from the shell :
* `mpc_cc`: the compiler for C
* `mpc_cxx`: the compiler for C++
* `mpc_f77`: the compiler for F77
* `mprcun` `mpirun` with MPC's extended semantic
* `mpc_status` will provide the configuration information of this mpc instance.
* `mpc_print_config` the configuration printer for MPC
* Any mpi\* derivative from the commands above (`mpicc`, `mpicxx`, `mpif*`,
`mpirun`...)