~ubuntu-branches/ubuntu/vivid/psicode/vivid

« back to all changes in this revision

Viewing changes to INSTALL

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-06-07 16:49:57 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080607164957-8pifvb133yjlkagn
Tags: 3.3.0-3
* debian/rules (DEB_MAKE_CHECK_TARGET): Do not abort test suite on
  failures.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Set ${bindir} to /usr/lib/psi.
* debian/rules (install/psi3): Move psi3 file to /usr/bin.
* debian/patches/07_464867_move_executables.dpatch: New patch, add
  /usr/lib/psi to the $PATH, so that the moved executables are found.
  (closes: #464867)
* debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Installation Instructions for PSI3
2
2
----------------------------------
3
3
 
 
4
  I. Compilation Prerequisites
 
5
  II. Brief Summary of Configruation, Compilation, and Installation
 
6
  III. Detailed Installation Instructions
 
7
  IV. Recommendations for BLAS and LAPACK libraries
 
8
  V. Miscellaneous architecture-specific notes
 
9
 
 
10
----------------------------------
 
11
 
4
12
I. Compilation Prerequisites:
5
13
 
6
14
   * ANSI C compiler
7
15
   * C++ Compiler
8
 
   * F77 Compiler
9
 
   * Optimized BLAS library (try http://math-atlas.sourceforge.net)
10
 
   * Optimized LAPACK library (try http://www.netlib.org/netlib)
11
 
   * POSIX threads (Pthreads) library
12
 
   * Perl interpreter (version 5.005 or higher)
 
16
   * F77 Compiler (the F95 compiler, gfortran, with gcc-4.X will work)
 
17
     --> Note: The F77 compiler is only used to determine the symbol-naming
 
18
     convention of and some system routines for the BLAS and LAPACK libraries
 
19
     on a few architectures.  It is optional in a few cases (e.g. Mac OS X
 
20
     systems).
 
21
   * Optimized BLAS library (see recommendations below)
 
22
   * Optimized LAPACK library (see recommendations below)
 
23
   * POSIX threads (Pthreads) library (optional)
 
24
   * Perl interpreter (5.005 or higher; needed for running test cases)
13
25
   * GNU utilities: (see http://www.gnu.org)
14
26
      ** make
15
27
      ** flex
18
30
      ** fileutils (esp. install)
19
31
   * For documentation:
20
32
      ** latex
21
 
      ** latex2html (either v0.99_1 or 1.62 but you must apply the patch 
22
 
                     supplied in psi3/misc)
 
33
      ** latex2html 
 
34
           (for generating web-based documentation only; either v0.99_1 or 
 
35
            1.62, but you must apply the patch supplied in psi3/misc)
23
36
 
24
 
II. Basic Code Configuration, Compilation, and Installation
 
37
II. Brief Summary of Configruation, Compilation, and Installation
25
38
 
26
39
A good directory for the PSI3 source code is /usr/local/src/psi3.
27
40
The directory should NOT be named /usr/local/psi, as that is the default
30
43
because of a bug in dvips which will cause the compilation of documentation
31
44
to fail.
32
45
 
33
 
The following series of steps will configure and build the PSI3
34
 
package and install the executables in /usr/local/psi/bin:
 
46
The following series of steps will configure and build the PSI3 package
 
47
and install the executables in /usr/local/psi/bin:
35
48
 
36
49
   * cd $PSI3 (the top-level PSI3 source directory -- probably THIS directory)
37
 
   * autoconf
38
50
   * mkdir objdir
39
51
   * cd objdir
40
52
   * ../configure
43
55
   * make install
44
56
   * make doc (optional)
45
57
 
46
 
There is also a perl script, INSTALL.pl, in the top-level PSI3 source
47
 
directory which provides an interactive interface for installation.
48
 
 
49
58
You may need to make use of one or more of the following options to
50
59
the configure script:
51
60
 
53
62
   PSI3 package somewhere other than the default directory, /usr/local/psi.
54
63
 
55
64
   * --with-cc=compiler --- Use this option to specify a C compiler.
56
 
   The default search order for compilers is: gcc, cc, ccc.  (NB: On AIX
57
 
   systems, the search order is cc_r,  gcc.)
 
65
   One should use compilers that generate reentrant code, if possible. The
 
66
   default search order for compilers is: cc_r (AIX only), gcc, icc, cc.
58
67
 
59
68
   * --with-cxx=compiler --- Use this option to specify a C++ compiler.
60
 
   The default search order for compilers is: g++, c++, cxx.  (NB: On AIX
61
 
   systems, the search order is xlC_r,  c++,  g++.)
62
 
 
63
 
   * --with-fc=compiler --- Use this option to specify a Fortran-77 compiler.
64
 
   The default search order for compilers is: g77, f77, fc, f2c.  (NB:
65
 
   On AIX systems, the search order is xlf_r, g77, f77, fc, f2c.)
 
69
   One should use compilers that generate reentrant code, if possible.
 
70
   The default search order for compilers is: xlC_r (AIX only), g++, c++,
 
71
   icpc, cxx.
 
72
 
 
73
   * --with-fc=compiler --- Use this option to specify a Fortran-77 compiler,
 
74
   which is used to determine linking coventions for BLAS and LAPACK libraries
 
75
   and to provide system routines for those libraries.  Note that no fortran
 
76
   compiler is necessary on Mac OS X systems (see below).  The default search
 
77
   order for compilers is: xlf_r (AIX only), gfortran, g77, ifort, f77, f2c.
 
78
 
 
79
   * --with-f77symbol=value --- This option allows manual assignment of the 
 
80
   FORTRAN77 symbol convention, which is necessary for C programs to link
 
81
   Fortran-interface libraries such as BLAS and LAPACK. This option should
 
82
   only be used by experts and even then should almost never be necessary. 
 
83
   Allowed values are:
 
84
                            lc  : lower-case
 
85
                            lcu : lower-case with underscore (default)
 
86
                            uc  : upper-case
 
87
                            ucu : upper-case with underscore
66
88
 
67
89
   * --with-ld=linker --- Use this option to specify a linker.  The
68
90
   default is 'ld'.
69
91
 
70
 
   * --with-ranlib=ranlib --- Use this option to specify the ranlib program.  
71
 
   The default is to look for 'ranlib' automatically.
72
 
 
73
92
   * --with-ar=archiver --- Use this option to specify an archiver.  The
74
93
   default is to look for 'ar' automatically.
75
94
 
76
95
   * --with-ar-flags=flags --- Use this option to specify additional archiver 
77
96
   flags. The default is 'r'.
78
97
 
79
 
   * --with-perl=perl --- Use this option to specify a Perl interpreter.  The
80
 
   default is to look for 'perl' automatically.
81
 
 
82
98
   * --with-incdirs=directories --- Use this option to specify extra
83
99
   directories where to look for header files. Directories should be specified
84
100
   prepended by '-I', i.e. '-Idir1 -Idir2', etc. If several directories are 
100
116
 
101
117
   * --with-blas=library --- Use this option to specify a BLAS library.
102
118
   If your BLAS library has multiple components, enclose the file list
103
 
   with single right-quotes, e.g., --with-blas='-lf77blas -latlas'.
 
119
   with single right-quotes, e.g., --with-blas='-lf77blas -latlas'.  Note
 
120
   that many BLAS libraries can be detected automatically.
104
121
 
105
122
   * --with-lapack=library --- Use this option to specify a LAPACK library.
106
123
   If your LAPACK library has multiple components, enclose the file list
107
124
   with single right-quotes, e.g., --with-lapack='-llapack -lcblas -latlas'.
 
125
   Note that many LAPACK libraries can be detected automatically.
108
126
 
109
127
   * --with-max-am-eri=integer --- Specifies the maximum angular momentum
110
128
   level for the primitive Gaussian basis functions when computing
123
141
   level for primitive Gaussian basis functions used in r_12 explicitly
124
142
   correlated methods.  This is set to f-type functions (AM=3) by default.
125
143
 
126
 
   * --with-debug=option --- This option turns on debugging options.
127
 
   If the argument is omitted, `` -g'' will be used by default.
128
 
 
129
 
   * --with-opt=options --- This option may be used to select special
130
 
   optimization flags, overriding defaults.
 
144
   * --with-debug=yes/no --- Turns on debugging flags (-g) if yes.  This is
 
145
   set to no by default.
 
146
 
 
147
   * --with-opt=yes/no --- Turns off compiler optimizations (-OX) if no.
 
148
   This is set to yes by default.
 
149
 
 
150
   * --with-strict=yes -- Turns on strict compiler warnings.
131
151
 
132
152
III. Detailed Installation Instructions
133
153
 
140
160
directory something other than /usr/local/psi; your $HOME directory or
141
161
/usr/local/src/psi3 are convenient choices.  Next, in the top-level $PSI3
142
162
source directory you've chosen, first run autoconf to generate the configure
143
 
script from configure.in.  It is best to keep the source code separate
 
163
script from configure.ac.  It is best to keep the source code separate
144
164
from the compilation area, so you must first choose a subdirectory for
145
165
compilation of the codes.  A simple option is $PSI3/objdir, which should
146
166
work for most environments.  However, if you need executables for several
147
 
architectures, choose more meaningful subdirectory names.
 
167
architectures, you should choose more meaningful subdirectory names.
148
168
 
149
169
   * The compilation directory will be referred to as $objdir for the
150
170
   remainder of these instructions.
167
187
 
168
188
III.C. Step 3: Testing
169
189
 
170
 
To automatically execute the ever-growing number of test cases after
171
 
compilation, simply execute "make tests" in the $objdir directory.  This will
172
 
run each (relatively small) test case and report the results.  Failure of any
173
 
of the test cases should be reported to the developers at psi3@psicode.org.
 
190
To execute automatically the ever-growing number of test cases after
 
191
compilation, simply execute "make tests" in the $objdir directory.
 
192
This will run each (relatively small) test case and report the results.
 
193
Failure of any of the test cases should be reported to the developers.
174
194
By default, any such failure will stop the testing process.  If you desire
175
195
to run the entire testing suit without interruption, execute "make tests
176
196
TESTFLAGS='-u -q'". Note that you must do a "make testsclean" in $objdir
177
197
to run the test suite again.
178
198
 
179
 
Testing PSI3 from the source directory, which was possible in prerelease
180
 
version of PSI3.2 (rc1 and rc2), is no longer recommended.
181
 
 
182
199
III.D. Step 4: Installation
183
200
 
184
201
Once testing is complete, installation into $prefix is accomplished by
200
217
III.G. Step 7: User Configuration
201
218
 
202
219
After the PSI3 package has been successfullly installed, the user will need
203
 
to add the installation directory into their path.  If the package has
 
220
to add the installation directory into his/her path.  If the package has
204
221
been installed in the default location /usr/local/psi, then in C shell,
205
222
the user should add something like the following to their .cshrc file:
206
223
 
210
227
 
211
228
The final line will enable the use of the PSI3 man pages.
212
229
 
213
 
IV. Miscellaneous architecture-specific notes
 
230
IV. Recommendations for BLAS and LAPACK libraries
 
231
 
 
232
Much of the speed and efficiency of the PSI3 programs depends on the
 
233
corresponding speed and efficiency of the available BLAS and LAPACK libraries
 
234
(especially the former).  In addition, the most common compilation problems
 
235
involve these libraries.  Users may therefore wish to consider the following
 
236
BLAS and LAPACK recommendations when building PSI3:
 
237
 
 
238
  (1) It is NOT wise to use the stock BLAS library provided with many
 
239
  Linux distributions like RedHat.  This library is usually just the
 
240
  netlib distribution and is completely unoptimized.  PSI3's performance
 
241
  will suffer if you choose this route.  The choice of LAPACK is less
 
242
  critical, and so the unoptimized netlib distribution is acceptable.
 
243
  If you do choose to use the RedHat/Fedora stock BLAS and LAPACK, be
 
244
  aware that some RPM's do not make the correct symbolic links.  
 
245
  For example, you may have /usr/lib/libblas.so.3.1.0 but not
 
246
  /usr/lib/libblas.so.  If this happens, create the link as, e.g.,
 
247
  ln -s /usr/lib/libblas.so.3.1.0 /usr/lib/libblas.so.  You
 
248
  may need to do similarly for lapack.
 
249
 
 
250
  (2) Perhaps the best choices for BLAS are Kazushige Goto's hand-optimized
 
251
  BLAS (http://www.tacc.utexas.edu/resources/software/) and ATLAS
 
252
  (http://math-atlas.sourceforge.net/).  These work well on nearly every
 
253
  achitecture to which the PSI3 developers have access.  On Mac OS X systems,
 
254
  however, the vecLib package that comes with Xcode works well.
 
255
 
 
256
  (3) PSI3 does not require a Fortran compiler, unless the resident BLAS
 
257
  and LAPACK libraries require Fortran-based system libraries.  If you see
 
258
  compiler complaints about missing symbols like "do_fio" or "e_wsfe", then
 
259
  your libraries were most likely compiled with g77 or gfortran, which
 
260
  require -lg2c to resolve the Fortran I/O calls.  Use of the same gcc
 
261
  package for PSI3 should normally resolve this problem.
 
262
 
 
263
  (4) The PSI3 configure script can conveniently identify and use
 
264
  several different BLAS and LAPACK libraries, but its ability to do this
 
265
  automatically depends on a number of factors, including correspondence
 
266
  between the compiler used for PSI3 and the compiler used to build
 
267
  BLAS/LAPACK, and placement of the libraries in commonly searched
 
268
  directories, among others.  PSI3's configure script will find your BLAS
 
269
  and LAPACK if any of the the following are installed in standard
 
270
  locations (e.g. /usr/local/lib):
 
271
 
 
272
    (a) ATLAS: libf77blas.a and libatlas.a, plus netlib's liblapack.a
 
273
    (b) MKL: libmkl.so and libmkl_lapack64.a (with the Intel compilers)
 
274
    (c) Goto: libgoto.a and netlib's liblapack.a
 
275
    (d) Cray SCSL (e.g. on SGI Altix): libscs.so (NB: No Fortran compiler
 
276
      is necessary in this case, so --with-fc=no should work.)
 
277
    (e) ESSL (e.g. on AIX systems): libessl.a
 
278
 
 
279
  (5) If configure cannot identify your BLAS and LAPACK libraries
 
280
  automatically, you can specify them on the command-line using the
 
281
  --with-blas and --with-lapack arguments described above.  Here are a few
 
282
  examples that work on the PSI3 developers' systems:
 
283
 
 
284
    (a) Linux with ATLAS:
 
285
 
 
286
    --with-blas='-lf77blas -latlas' --with-lapack='-llapack -lcblas'
 
287
 
 
288
    (b) Mac OS X with vecLib:
 
289
 
 
290
    --with-blas='-altivec -framework vecLib' --with-lapack=' '
 
291
 
 
292
    (c) Linux with MKL and icc/icpc/ifort:
 
293
 
 
294
    --with-libdirs=-L/usr/local/opt/intel/mkl/8.0.2/lib/32 --with-blas=-lmkl --with-lapack=-lmkl_lapack32
 
295
 
 
296
 
 
297
V. Miscellaneous architecture-specific notes
 
298
 
 
299
  * Linux on x86 and x86_64:
 
300
   (1) gcc compiler: versions 3.2, 3.3, 3.4, 4.0, and 4.1 have been tested.
 
301
   (2) Intel compilers: version 9.0 has been tested. We do not recommend
 
302
   using version 8.1.
 
303
   (3) Portland Group compilers: version 6.0-5 has been tested.
 
304
   (4) Some versions of RedHat/Fedora Core RPM packages for the 
 
305
   BLAS and LAPACK libraries fail to make all the required symlinks.  
 
306
   For example, you may have /usr/lib/libblas.so.3.1.0 but not
 
307
   /usr/lib/libblas.so.  If this happens, create the link as, e.g.,
 
308
   ln -s /usr/lib/libblas.so.3.1.0 /usr/lib/libblas.so.  You
 
309
   may need to do similarly for LAPACK.
 
310
 
 
311
  * Linux on Itanium2 (IA64):
 
312
   (1) Intel compilers version 9.0 have been tested and work. Version 8.1
 
313
   does not work.
 
314
   (2) gcc compilers work.
 
315
  \end{itemize}
 
316
 
 
317
 * Mac OS 10.X:
 
318
 
 
319
   (1) The compilation requires a developer's toolkit (Xcode) from apple.com.
 
320
   Note that a fortran compiler is not needed for PSI 3.3 on Mac OS X systems.
 
321
 
 
322
   (2) The libcompat.a library is also needed, but it is not provided in the
 
323
   Xcode toolkit. If you see compiler complaints about missing symbols like
 
324
   "re_comp" or "re_exec", then your -lcompat is missing or PSI3 is not aware
 
325
   of it.  As of 6 April 2007, it can be obtained from Apple's website at:
 
326
 
 
327
http://www.opensource.apple.com/darwinsource/tarballs/apsl/Libcompat-14.1.tar.gz
 
328
 
 
329
   You must sign up for a free developer's account to access the
 
330
   above library.  You can identify the library to configure by adding
 
331
   "--with-libs=-lcompat" to the command line.
 
332
 
 
333
   (3) For apple systems, the latest configure script assumes that the vecLib
 
334
   will be used for the optimized BLAS and LAPACK libraries, unless the
 
335
   user indicates otherwise using the --with-blas and --with-lapack flags
 
336
   to configure.  If you encounter difficulty with configure, you may have
 
337
   success explicitly indicating the vecLib using:
 
338
 
 
339
      --with-blas='-altivec -framework vecLib' --with-lapack=' '
 
340
 
 
341
   (4) Pre Mac OS 10.4: Certain PSI3 codes require significant stackspace for
 
342
   compilation.  Increase your shell's stacksize limit before running "make".
 
343
   For csh, for example, this is done using "unlimit stacksize".  [NB: This
 
344
   limit appears to have been lifted in Mac OS 10.3.X (Panther).]
214
345
 
215
346
 * AIX 4.3/5.x in 64-bit environment:
216
347
 
224
355
    haven't had much luck using xlc_r because of its handling of functions
225
356
    with variable argument lists, use cc_r instead.
226
357
 
227
 
 * Compaq Alpha/OSF 5.1:
228
 
 
229
 
   Default Bourne shell under Tru64 (/bin/sh) is not POSIX-compliant which 
230
 
   causes some PSI3 makefiles to fail. Set environmental variable BIN_SH to 
231
 
   xpg4.
232
 
 
233
 
 * Mac OS 10.2.X and 10.3.X (recommended):
234
 
 
235
 
   For Apple systems, several issues arise that we hope to address with the 
236
 
   configure script in the near future:
237
 
 
238
 
   (1) The compilation requires a developer's toolkit (Xcode) from apple.com.  
239
 
   However, you should probably install the latest gcc package, because the 
240
 
   Xcode toolkit doesn't include a Fortran compiler (which is needed 
241
 
   for determining how to link BLAS and LAPACK codes into PSI3).
242
 
 
243
 
   (2) For OS 10.2.X, you'll also need the libcompat library. (As of 
244
 
   23 April 2004, it can be obtained from Apple's website at 
245
 
   http://www.opensource.apple.com/darwinsource/ under the 10.2.8 source 
246
 
   directory.)  Then add -lcompat to the configure flag --with-libs.
247
 
 
248
 
   (3) If you compiled compilers yourself from GNU source code (the most 
249
 
   likely scenario) you must specify explicitly the location of vecLib for 
250
 
   optimized BLAS and LAPACK:
251
 
 
252
 
      --with-blas='/System/Library/Frameworks/vecLib.framework/vecLib'
253
 
 
254
 
   If you are using compilers from the developer's kit, then you can instead 
255
 
   use the Apple-specific extensions:
256
 
 
257
 
      --with-blas='-altivec -framework vecLib'
258
 
 
259
 
   (4) The Fortran compiler in gcc version 3.3 and higher requires the latest
260
 
   assembler, as. It can be obtained as a part of cctools from 
261
 
   http://www.opensource.apple.com/.  Mac OS X 10.3 (Panther) should come 
262
 
   with cctools recent enough to compile PSI3.
263
 
 
264
 
   (5) Certain PSI3 codes require significant stackspace for compilation.
265
 
   Increase your shell's stacksize limit before running "make".  For csh,
266
 
   for example, this is done using "unlimit stacksize".  [NB: This limit 
267
 
   appears to have been lifted in Mac OS 10.3.X (Panther).]
268
 
 
269
358
 * SGI IRIX 6.x:
270
359
 
271
360
   (1) MIPSpro C++ compilers prior to version 7.4 require a command-line flag
279
368
 
280
369
   (3) Under IRIX, configure will attempt to detect automatically and use
281
370
   the optimized SGI Scientific Computing Software Library (SCSL).
 
371
 
 
372
 * Compaq Alpha/OSF 5.1:
 
373
 
 
374
   Default Bourne shell under Tru64 (/bin/sh) is not POSIX-compliant which 
 
375
   causes some PSI3 makefiles to fail. Set environmental variable BIN_SH to 
 
376
   xpg4.
 
377