forked from toastpp/toastpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCOMPILE.readme
executable file
·200 lines (119 loc) · 4.53 KB
/
COMPILE.readme
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
TOAST compilation and installation from source tree. 19.6.2009
====================================================
Contents
--------
1. Obtaining the toast sources
1.1 Toast sources from CVS
1.2 Toast sources from a tarball
2. Compiling the sources
2.1 Linux
2.2 Windows
1. Obtaining the toast sources
------------------------------
1.1 Toast sources from SVN
--------------------------
You can only check out the toast sources from the SVN repository, if
- you have an account at cs.ucl.ac.uk, and
- you are a member of the 'medim' group (type 'groups' at the shell
prompt to find out).
See SVN.readme for instructions on accessing the repository.
1.2 Toast sources from a tarball
--------------------------------
If you have obtained a tarball containing the toast sources (e.g.
toast-src.tar.gz), go to the directory where you want to install the toast
source tree and unpack the tarball:
tar xzvf toast-src.tar.gz
This will create the 'toast' directory containing the toast source tree.
You then have to unpack the numerics libraries:
cd toast
tar xzvf numerics.tar.gz
2. Compiling the sources
------------------------
2.1 Linux
---------
2.1.1 Preliminaries:
--------------------
You need the GNU g++ and g77 compilers (should work for 3.2 to 4.2, not
tested for later versions).
For compiling the source-level help documents you need doxygen
(http://www.stack.nl/~dimitri/doxygen/)
2.1.2 Configuration and compilation
-----------------------------------
Set the TOASTDIR environment variable:
cd toast
setenv TOASTDIR $PWD
Configure the makefiles:
./configure
(for additional configuration options, type: ./configure --help)
Set the toast environment:
source toast.env
(note that toast.env is set up for csh. You may have to edit the script to
run in other shells).
Make the numerics libraries:
make numerics
Make the toast libararies and applications:
make toast
The run-time libraries are installed in $TOASTDIR/lib. Make sure that your
LD_LIBRARY_PATH variable points to this directory (this is done automatically
by the toast.env script).
The toast applications are installed in $TOASTDIR/bin. You may want to set
your path variable to include that directory.
To compile the html help files, type
make doc
This requires doxygen to be installed and on the search path. The html
help entry point is located in
doc/start.html
Note that the source-level documentation is not yet complete.
2.1.3 Compiling the mex files for the Matlab toolbox
----------------------------------------------------
If you want to compile the Matlab toolbox, you need to configure the mex
compiler:
From within matlab, type
mex -setup
and select the option relating to the gcc compiler.
This will write a file
$HOME/.matlab/<matlab-version>/mexopts.sh
Edit this file by appending the line
source $TOASTVER/mexopts.incl
to the end of it. This will tell the mex compiler about toast-specific
libararies and include paths.
Then, in the toast main directory, type
make matlab
Finally, you need to add the search paths for the mex files and matlab scripts.
Launch Matlab from the toast main directory, and type
mtoast_install
Check that all listed directories are ok (including the mex file path) and
save. This will write a file pathdef.m either to the Matlab system directory
if you have the permissions to do so, or to the local directory.
If pathdef.m is stored locally, the toast paths will only be loaded if you
launch matlab from this directory.
Type
doc toast
help toast
for toolbox documentation and a list of toast functions.
2.2 Windows
-----------
2.2.1 Preliminaries
-------------------
You will need Visual Studio 2005 or later to compile the toast libraries,
executables and mex files.
Compiled BLAS and Lapack libraries are required. The VS project files should
be configured to link them.
For compiling the source-level help documents you need doxygen
(http://www.stack.nl/~dimitri/doxygen/)
2.1.2 Compilation
-----------------
From the VS development environment, load the toast solution file located in
win32/VS2005/toast.sln
and compile.
For the matlab mex files, load
toast_matlab.sln
and compile. Configuring the Matlab search path works as for the Linux version
(see 2.1.3).
Troubleshooting FAQ
-------------------
1. FORTRAN compiler problems
Where available, use gfortran instead of g77 to compile the Fortran
libraries (BLAS, LaPACK, etc.). If configure insists on g77, you can
change the preferences by setting environment variable F77 to gfortran.
g77 appears to cause problems on 64-bit architectures.