1
1
Installation Instructions for PSI3
2
2
----------------------------------
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
10
----------------------------------
4
12
I. Compilation Prerequisites:
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
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)
53
62
PSI3 package somewhere other than the default directory, /usr/local/psi.
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.
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++.)
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++,
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.
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.
85
lcu : lower-case with underscore (default)
87
ucu : upper-case with underscore
67
89
* --with-ld=linker --- Use this option to specify a linker. The
70
* --with-ranlib=ranlib --- Use this option to specify the ranlib program.
71
The default is to look for 'ranlib' automatically.
73
92
* --with-ar=archiver --- Use this option to specify an archiver. The
74
93
default is to look for 'ar' automatically.
76
95
* --with-ar-flags=flags --- Use this option to specify additional archiver
77
96
flags. The default is 'r'.
79
* --with-perl=perl --- Use this option to specify a Perl interpreter. The
80
default is to look for 'perl' automatically.
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
168
188
III.C. Step 3: Testing
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.
179
Testing PSI3 from the source directory, which was possible in prerelease
180
version of PSI3.2 (rc1 and rc2), is no longer recommended.
182
199
III.D. Step 4: Installation
184
201
Once testing is complete, installation into $prefix is accomplished by
211
228
The final line will enable the use of the PSI3 man pages.
213
IV. Miscellaneous architecture-specific notes
230
IV. Recommendations for BLAS and LAPACK libraries
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:
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.
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.
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.
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):
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
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:
284
(a) Linux with ATLAS:
286
--with-blas='-lf77blas -latlas' --with-lapack='-llapack -lcblas'
288
(b) Mac OS X with vecLib:
290
--with-blas='-altivec -framework vecLib' --with-lapack=' '
292
(c) Linux with MKL and icc/icpc/ifort:
294
--with-libdirs=-L/usr/local/opt/intel/mkl/8.0.2/lib/32 --with-blas=-lmkl --with-lapack=-lmkl_lapack32
297
V. Miscellaneous architecture-specific notes
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
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.
311
* Linux on Itanium2 (IA64):
312
(1) Intel compilers version 9.0 have been tested and work. Version 8.1
314
(2) gcc compilers work.
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.
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:
327
http://www.opensource.apple.com/darwinsource/tarballs/apsl/Libcompat-14.1.tar.gz
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.
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:
339
--with-blas='-altivec -framework vecLib' --with-lapack=' '
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).]
215
346
* AIX 4.3/5.x in 64-bit environment:
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.
227
* Compaq Alpha/OSF 5.1:
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
233
* Mac OS 10.2.X and 10.3.X (recommended):
235
For Apple systems, several issues arise that we hope to address with the
236
configure script in the near future:
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).
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.
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:
252
--with-blas='/System/Library/Frameworks/vecLib.framework/vecLib'
254
If you are using compilers from the developer's kit, then you can instead
255
use the Apple-specific extensions:
257
--with-blas='-altivec -framework vecLib'
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.
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).]
271
360
(1) MIPSpro C++ compilers prior to version 7.4 require a command-line flag