aboutsummaryrefslogtreecommitdiff
path: root/README.library
blob: 93f2d3c2a773f100be62255ddcb77f6ab7c9df04 (plain)
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
Library Configuration
=====================
$Header$

By default this thorn doesn't use any external libraries, and you
can ignore the instructions in this file.


Using the LAPACK and BLAS Libraries
===================================
However, if this thorn is configured to use the LAPACK and BLAS
libraries (see README for details), then you need to configure Cactus
to use these libraries; this file describes how to do this.

Basically, you just need to set
   LAPACK=yes
when configuring your Cactus configuration.

If all goes well, Cactus will find the LAPACK and BLAS libraries and give
during the configure process saying that it found them.  Otherwise, the
configure process will abort with a message saying that you need to set
the configure variable LAPACK_DIR to a directory (or blank-separated list
of directories) containing the LAPACK and BLAS libraries.

[If you don't have LAPACK/BLAS installed on your system already, you
can get Fortran 77 source code and/or binaries for various architectures,
from http://www.netlib.org/lapack/ and http://www.netlib.org/blas/
respectively.  But many systems have these installed already -- try
'locate liblapack' and 'locate libblas' on your system.]

If the LAPACK and/or BLAS libraries were compiled with a (Fortran)
compiler which is *not* used to compile any part of this Cactus'
configuration, then you may also need to set the configure variables
   LAPACK_EXTRA_LIBS = the name (or blank-separated list of names) of
                       that (Fortran) compiler's run-time support
                       library(ies)
   LAPACK_EXTRA_LIB_DIRS = the directory (or blank-separated list of
                           directories) containing that library(ies)

For example, if your LAPACK and/or BLAS were compiled with the GNU g77
compiler (as is common on GNU/Linux and *BSD systems), and you are *not*
using g77 to compile any part of your Cactus configuration (maybe because
you're using a different Fortran compiler), then you may need to set the
environment variables to point to the g77 support library g2c:
  LAPACK_EXTRA_LIBS = g2c
  LAPACK_EXTRA_LIBDIRS = `g77 --print-file-name=libg2c.a | xargs basename`

For example, on the AEI xeons the settings would be
   LAPACK_EXTRA_LIBS = g2c
   LAPACK_EXTRA_LIBDIRS = `g77 --print-file-name=libg2c.a | xargs dirname`

All of these settings are of configure variables, i.e. you set them either
on the command line when configuring,
   % gmake my-configuration LAPACK=yes
or as assignments in your ~/.cactus/config file,
   % cat ~/.cactus/config
   LAPACK=yes
   LAPACK_EXTRA_LIBS=g2c
   LAPACK_EXTRA_LIB_DIRS=/usr/lib/gcc-lib/i386-redhat-linux/2.96


Compiler Version Compatability
==============================
All of Cactus -- including any external libraries -- need not be
compiled with the same compilers, but the compilers must be link-compatible.
In practice this isn't usually a problem.  However, as an example of what
*not* to do, consider using libraries compiled with a gcc 2.* version
(e.g. the system default libraries on many GNU/Linux distributions as
of late 2002), combined with thorns compiled with a gcc 3.* version.
gcc 2.* and 3.* are *not* link-compatible, so if you're lucky this
combination will give all sorts of wierd errors in linking.  If you're
unlucky it will link ok but then crash (or even worse, just give wrong
results) at run-time.