-
Notifications
You must be signed in to change notification settings - Fork 3
/
README_Pspline
355 lines (260 loc) · 9.68 KB
/
README_Pspline
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
README file for Pspline Module
Prepared by C.Ludescher-Furth -- [email protected] 10/23/00
****************
REVISION HISTORY
****************
date Description
May 15, 1999 -- Created
Apr 12, 2000 -- Houlberg/Pletzer enhancements
----------------------------------------------------------------
SINGLE/DOUBLE PRECISION VERSION
Standard Single Precision and REAL*8 versions are distributed
in pspline.{tar.gz,zip}".
NOTE, REAL*8 soubroutines are prefixed with "r8".
Index:
1. CONTENTS
2. UNPACKING INSTRUCTIONS
3. DESTINATIONS
4. BUILDING INSTRUCTIONS
5. RUNNING INSTRUCTIONS
6. TESTING INSTRUCTIONS
7. DOCUMENTATION
8. FINAL INSTALLATION
************
1. CONTENTS:
************
This directory should contain the following files:
README_Pspline: This file. Brief descriptions of the other files, and
instructions for compiling, testing and installing the
pspline library libpspline.a and its test drivers
pspltes{t,8}, qk_pspline, ezspline_* and czspline_test.cxx.
EzSpline_HowTo: FAQ for EzSpline.
EzSpline_README: User Guide for EzSpline
CzSpline_README: User Guide for CzSpline
Makefile: NOTE, "GNU make" must be used
(usually in /usr/gnu/bin or /usr/local/bin).
You also need "gcc" for pre-processing
(exept on CRAY).
Main Makefile to invoke Makefiles in all subdirectories.
./ezcdf
Makefile -- to build libezcdf.a
Sources to build libezcdf.a, an internally used library
./include/fpreproc:
*.h files for source pre-processing.
./pspline:
README -- A copy of README_Pspline from above.
Makefile -- to build libpspline and test programs
Sources to build the library libpspline.a
NOTE, REAL*8 sources are prefixed with "r8".
pspltes{t,8}.for -- source for basic test driver
pspltes{t,8}.output -- sample output file for respective test case
{r8}lookup_test -- source to study performance
{r8}lookup_test.output -- sample output file for respective test case
ezspline_test_{r4,r8} -- source to test ezspline
ezspline_perf_{r4,r8} -- source to test ezspline
ezspline_test_*.ref -- sample output file for respective test case
ezspline_test.m -- matlab program to display the test output
qk_pspline.f90 -- source for derivative test driver
qk_pspline.output -- sample output file for respective test case
./share/Make.flags: Include file for Makefile, to setup Flags, etc.
**************************
2. UNPACKING INSTRUCTIONS:
**************************
for tarfiles:
> gunzip pspline.tar.gz
> tar xvf pspline.tar
or, for zip archives:
> unzip pspline.zip
****************
3. DESTINATIONS:
****************
Or where do the files go?
(this refers to building and testing; see FINAL INSTALLATION for end result)
When you extract the tar file you get sub directories:
./pspline -- Spline and Hermite Cubic Interpolation
./ezcdf -- Easy Interface for netCDF Routines
./share -- include file Make.flags
./portlib -- portability routines
./include/fpreproc -- *.h files for cpp
The makefile will create more sub directories,
lib: for the library, libpspline.a
mod: for the f90 modules
obj/<libname>: for compiled objects
test: for the test programs and the sample output files.
By default these directories are created in
./<MACHINE>, which is determined by Make.flags.
e.g.: if you are running Linux, and the tar file resides in $HOME/foo,
the directories would be in
$HOME/foo/LINUX/{lib,mod,obj,test}.
You can overwrite the destination by defining OBJ, as an environment
variable (e.g. export OBJ=/dir1/dir2), or with make (e.g. "gmake OBJ=.").
If OBJ is defined, the destinations will be
$OBJ/{lib,mod,obj,test}.
If OBJ is defined as "." then, in the example above, the destination
would be $HOME/foo/{lib,mod,obj,test}.
The rationale behind <MACHINE> is to facilitate building for various platforms.
Note: If you define OBJ as option to gmake, you have to consistently do so;
e.g: gmake clean OBJ=., gmake install OBJ=.
Alternatively you can modify share/Make.local.sample
and rename it to share/Make.local.
*************************
4. BUILDING INSTRUCTIONS:
*************************
Required Compilers:
===================
gcc -- for pre-processing (exept on CRAY)
Fortran 90
C
Required Libraries:
===================
netCDF
The library is assumed to be in /usr/local/{lib,include}
If your site has it somwhere else, define NETCDF_DIR
e.g. gmake NETCDF_DIR=/my/nonstandard
(on CRAY, the Makefile knows where it is)
Alternatively you can modify share/Make.local.sample
and rename it to share/Make.local.
>>>>Note: If you don't have netCDF installed, do this:
> cp cdf_dummy/netcdf.inc include/
> gmake NETCDF_DIR=
> gmake -- to compile library and link all test programs
> gmake checklibs -- tells you what the makefile will do
(without any action);
it says which libraries it will make and
which ones it already found and where.
It also tells you how to rebuild an existing library.
> gmake clean -- to remove objects
> gmake realclean -- to remove objects and library
> gmake show_makeflags -- to see what flags, definitions Make will use
COMPILING FLAGS:
----------------
By default all routines are compiled with the automatic flag.
If you want static, say:
> gmake DYNAMIC=
On IRIX64:
> gmake DYNAMIC=-static
On CRAY:
> gmake DYNAMIC=-ev
On HP
> gmake DYNAMIC=-K
Compiling on Linux:
-------------------
By default the Makefile will select Lahey Fujitsu f95.
To select a different compiler define
FORTRAN_VARIANT to "Portland" "PathScale" " GCC" "NagWare" "Fujitsu" "Intel" or "Absoft"
e.g.:
setenv FORTRAN_VARIANT Portland (csh)
FORTRAN_VARIANT=Portland; export FORTRAN_VARIANT (sh)
Alternatively, FORTRAN_VARIANT can be passed directly to the gmake
command, as in:
gmake FORTRAN_VARIANT=Portland
Note: some test programs are linked with g++; to find the Fortran libraries,
you need to define FLIBROOT
e.g. export FLIBROOT=/usr/pppl/lf64x/lf6480
To use vastf90:
> gmake VAST90=y
To use NAG90:
> gmake NAG90=y
Compiling on Alpha Linux:
-------------------------
The Makefile assumes the Compaq compiler and specifies the
" -assume no2underscores " option.
Therefore the calling user software must also be compiled with this
option, or you should edit share/Make.flags to remove the option.
Compiling on SUN:
-----------------
The Makefile specifies the " -fast " option which includes -dalign.
Therefore the calling user software must also be compiled with this
option, or you should edit share/Make.flags to remove the option.
************************
5. RUNNING INSTRUCTIONS:
************************
Be sure your "stack size" is adequate ~ 32000 (100000 on alpha), otherwise
you might get segmentation faults.
To check yor stack size:
> ulimit -a
To increase it:
> ulimit -Ss 131072
************************
6. TESTING INSTRUCTIONS:
************************
To verify functioning of the software:
--------------------------------------
There is no input required.
Run pspltes{t,8} and compare it's output
with pspltes{t,8}.output:
e.g.:
> cd <MACHINE>/test or > cd $OBJ/test
> ./pspltes{t,8} > foo
> diff foo pspltes{t,8}.output
To study performance of pspline software:
-----------------------------------------
e.g.:
> ./{r8}lookup_test > {r8}foo
> diff {r8}foo {r8}lookup_test.output
To test derivatives:
---------------------
e.g.:
> ./qk_pspline > qk_foo
> diff qk_foo qk_pspline.output
To test ezspline:
-----------------
e.g.:
> ./ezspline_test_{r4,r8}
then look at it with matlab:
> matlab
>> ezspline_test
To test c interface:
-----------------
e.g.:
> ./czspline_test
************************
7. DOCUMENTATION:
************************
PSPLINE Home Page:
http://w3.pppl.gov/NTCC/PSPLINE
PSPLINE HELP
http://w3.pppl.gov/~pshare/help/pspline.htm
NTCC Home Page:
http://w3.pppl.gov/NTCC
**********************
8. FINAL INSTALLATION:
**********************
Choose or create the root directory in which you wish to install the software.
A common location would be /usr/ntcc, but installation can occur in any
directory where you have appropriate permissions.
You define your choice of root directory via PREFIX.
The default for PREFIX is /usr/ntcc.
The assumptions are:
libraries in: $PREFIX/lib = $LIBDIR
f90 modules in: $PREFIX/mod = $MODDIR
man pages in: $PREFIX/man/man3 = $MANDIR/man3
To install the software, return to the top directory (the directory,
where you downloaded the tar files) and type
> gmake install PREFIX=/dir1/dir2/
to install into /dir1/dir2/...
> gmake install
to install into /usr/ntcc/...
or, if PREFIX is defined in share/Make.local
If you want things elsewhere, you can overwrite the default with
> gmake install LIBDIR=/xxx MODDIR=yyy MANDIR=/zzz
NOTE:
-----
The library is installed as libpspline.a
Users should link with
-L<PREFIX>/lib -lpspline
Make sure users know what <PREFIX> is.
After you have installed the software, you can delete the entire tree
with
> cd ..
> rm -r foo
assuming the previous example.
----------------------------------------------------------------------------
IF YOU HAVE ANY PROBLEMS, PLEASE CONTACT EITHER:
Doug McCune, Princeton University
or
Christiane Ludescher-Furth, Princeton University
or