-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathINSTALL
176 lines (117 loc) · 5.28 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
### This file is a quick installation for Solaris, Linux, and Mac OS X.
### See `INSTALL.win.src' for a source installation for Windows system.
### See `INSTALL.win.bin' for a binary installation for Windows system.
--- 'OpenMPI' Installation:
Obtain 'OpenMPI' from 'http://www.open-mpi.org/'
> tar zxvf openmpi-1.5.4.tar.gz
> cd openmpi-1.5.4
> ./configure
> ./make
> ./make install
These install files to '/usr/local/bin', '/usr/local/lib', and
'/usr/local/include' etc. i.e. ${MPI_ROOT} is '/usr/local'.
--- Set environment variables:
For 'csh' or 'tcsh', I would set
> setenv PATH /usr/local/bin:$PATH
> setenv LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH
For 'sh', 'bash', or 'ksh', I would set
> export PATH=/usr/local/bin:$PATH
> export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
- 'PATH' is to make sure I can run 'mpiexec', 'mpirun', or 'orterun'.
- 'LD_LIBRARY_PATH' is to make sure I can reach 'libmpi.so'.
*** The other way is to modify '/etc/ld.so.conf' and to use the command
'ldconfig' to update the system searhing path for 'libmpi.so'.
--- Test 'OpenMPI':
In order to test if 'OpenMPI' works correctly, I simply run
> mpiexec -np 2 hostname
and this should show host name twice if environment variables are correct.
--- 'pbdPROF' Installation:
0. Download and extract 'pbdPROF'
> tar zxvf pbdPROF_0.2-3.tar.gz
1. Default Installation:
This should work with most platforms with 'OpenMPI' installed. The
configuration is based on 'Rmpi' but detect the flags and libraries from
'mpicc --showme:*' which is more portable.
> R CMD INSTALL pbdPROF
2. Non-default Installation:
> R CMD INSTALL pbdPROF \
+ --configure-args="--with-mpi-type=OPENMPI \
+ --with-mpi=/usr/local"
3. Unusual Installation:
Suppose 'PATH' and 'LD_LIBRARY_ATH' are set, but I don't use default paths
to header files and libraries, then I can install 'pbdPROF' by
> R CMD INSTALL pbdPROF \
+ --configure-args="--with-mpi-type=OPENMPI \
+ --with-mpi-include=/usr/local/ompi/include \
+ --with-mpi-libpath=/usr/local/ompi/lib" \
Note that I still need 'PATH' and 'LD_LIBRARY_PATH' to be set correctly in
this case.
### `INSTALL.win.src'.
--- 'Rtools' Installation:
Download 'Rtools216.exe' from 'http://cran.r-project.org/bin/windows/Rtools/'
and click it to install to
'C:\Rtools'
--- 'MS-MPI' Installation:
Download 'HPC Pack 2012 R2 MS-MPI Redistributable Package' from
'http://http://www.microsoft.com/en-us/download/'.
File 'MSMPISetup.exe' is for both 32 and 64 bits system.
Click on it and install them to the default directory
'C:\Program Files\Microsoft MPI'.
--- Set environment variables:
Suppose 'R', 'Rtools', and 'MS-MPI' are all installed by default. I have
a batch file 'set_mpisrc.bat' as the following to set the environment
variables. In short, 'MPI_HOME' should be set to 'MS-MPI' root directory,
and added '%MPI_HOME%/bin' to 'PATH'.
@ECHO OFF
SET R_HOME=C:\Program Files\R\R-3.0.1\
SET RTOOLS=C:\Rtools\bin\
SET MINGW=C:\Rtools\gcc-4.6.3\bin\
SET MPI_ROOT=C:\Program Files\Microsoft MPI\
SET PATH=%R_HOME%;%R_HOME%BIN\;%RTOOLS%;%MINGW%;%MPI_ROOT%BIN\;%PATH_ORG%
--- Test 'MS-MPI':
In order to test if 'MS-MPI' works correctly, I run
C:/> set_mpisrc
C:/> mpiexec -np 2 hostname.exe
and this should list two host names twice if environment variables are
correct. User's id and password may be required to launch MS-MPI.
--- 'pbdPROF' Installation:
Default Installation:
C:/> set_mpisrc
C:/> tar zxvf pbdPROF_0.2-3.tar.gz
C:/> R CMD INSTALL --build pbdPROF
C:/> R CMD INSTALL pbdPROF_0.2-3.zip
--- Test 'pbdPROF':
Suppose all environments are set correctly, I can run test examples by
C:/> set_mpisrc
C:/> cd pbdPROF\examples\test_spmd\
C:/> sh 00_test_all.win
### `INSTALL.win.bin'.
--- 'MS-MPI' Installation:
Download 'HPC Pack 2012 R2 MS-MPI Redistributable Package' from
'http://http://www.microsoft.com/en-us/download/'.
File 'MSMPISetup.exe' is for both 32 and 64 bits system.
Click on it and install them to the default directory
'C:\Program Files\Microsoft MPI'.
--- Set environment variables:
Suppose 'R', 'Rtools', and 'MS-MPI' are all installed by default. I have
a batch file 'set_mpi.bat' as the following to set the environment
variables. In short, 'MPI_ROOT' should be set to 'MS-MPI' root directory,
and added '%MPI_ROOT%/bin' to 'PATH'.
@ECHO OFF
SET R_HOME=C:\Program Files\R\R-3.0.1\
SET MPI_ROOT=C:\Program Files\Microsoft MPI\
SET PATH=%R_HOME%;%R_HOME%BIN\;%RTOOLS%;%MINGW%;%MPI_ROOT%BIN\;%PATH_ORG%
--- Test 'MS-MPI':
In order to test if 'MS-MPI' works correctly, I run
C:/> set_mpi
C:/> mpiexec -np 2 hostname.exe
and this should list two host names twice if environment variables are
correct. User's id and password may be required to launch MS-MPI.
--- 'pbdPROF' Installation:
Default Installation:
C:/> set_mpi
C:/> R CMD INSTALL pbdPROF_0.2-3.zip
--- Test 'pbdPROF':
Suppose all environments are set correctly, I can run test examples by
C:/> set_mpi
C:/> mpiexec -np 2 Rscript.exe -e "library(pbdPROF);init();finalize()"