File: README.Debian

package info (click to toggle)
petsc 3.23.1%2Bdfsg1-1exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 515,576 kB
  • sloc: ansic: 751,607; cpp: 51,542; python: 38,598; f90: 17,352; javascript: 3,493; makefile: 3,157; sh: 1,502; xml: 619; objc: 445; java: 13; csh: 1
file content (190 lines) | stat: -rw-r--r-- 7,947 bytes parent folder | download
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

                      PETSc Debian Package Description
                      --------------------------------

INTRODUCTION

This source package is distributed in five binary packages: the shared
libraries are in libpetsc-real3.23; header files, static libraries and important
files for building examples are in libpetsc-real3.23-dev, this also sets up
various alternatives links; debugging libraries are in libpetsc-real3.23-dbg;
extensive documentation and source code from "tests" and "tutorials"
directories are in petsc3.23-doc.

Standard packages are configured for real numbers.  Complex numbers are
configured in the libpetsc-complex* packages. The preferred default
configuration may be set using alternatives (petsc and libpetsc.so.3.23).

The preferred PETSc installation is located at /usr/lib/petsc. This is a symlink
to the actual installation, managed by Debian alternatives (see below). The
standard installation is located at
  /usr/lib/petscdir/petsc<PETSC_VERSION>/<arch>-real
e.g.
  /usr/lib/petscdir/petsc3.23/x86_64-linux-gnu-real

Preferred minor patch versions of each major version (e.g. 3.23)
are linked via
  /usr/lib/petscdir/3.23
(also, preferred versions of 3.23-real and 3.23-complex). These links are
controlled by alternatives.

libpetsc.so is also controlled by alternatives (libpetsc.so.3.23)


With libpetsc3.23-dev installed, you can build programs against it two ways:

     1. Standard build convention: use -I/usr/include/petsc for headers and
	link to optimized libraries in /usr/lib, so your resulting binaries
	will only depend on libpetsc3.23.0.
     2. PETSc build convention: adapt a makefile from one of their tests or
	tutorial directories and build with make PETSC_DIR=/usr/lib/petsc
     3. Use pkg-config (via /usr/lib/<arch>/pkgconfig/PETSC.pc).

Of these, the latter two are probably easier, as they automatically set up
all of the include paths and library linkages for PETSc and its various
dependencies.

EXAMPLES

For your testing convenience, petsc3.23-doc comes with the source code of
the full PETSc test and tutorial suite.  Just do:

	tar xzf /usr/share/doc/petsc3.23-doc/src.tar.gz

then cd src, and use the PETSc build convention make command above with target
testexamples or testfortran (add _uni to the target name for single-processor
operation).  This will build and run the entire suite.  Then choose an
appropriate example to modify for your own purposes, and you're off.

NOTE: not all of the examples work!  If one fails for you, please try to patch
it to make it work; you can often use a similar example in the same directory
to do this.  You may be able to get some help from the upstream maintainers for
this, see the homepage for details, but the examples do not seem to be
consistently maintained.  If you file a bug report because of a failed example,
I will forward it upstream and leave it open until it's fixed, but can't
promise I'll try to fix it.

DEBUGGING LIBRARY

With libpetsc-real3.23-dbg installed, a debug version is available at
  /usr/lib/petscdir/petsc3.23/x86_64-linux-gnu-real-debug

This library includes unstripped symbols and also has internal PETSc debugging
switched on. It may be accessed
1) by setting PETSC_DIR
2) via the pkg-config file in
  /usr/lib/petscdir/petsc3.23/x86_64-linux-gnu-real-debug/lib/pkgconfig
3) or by configuring as preferred alternative with update-alternatives.

REPORTING BUGS and BUILDING FROM SOURCE

Also, upstream does not maintain old versions of PETSc.  If you have trouble
with the version in stable, you should file a bug report (see
http://bugs.debian.org/ for directions), then try building the version in
unstable, by adding an unstable source code line to /etc/apt/sources.list, then
typing (as a normal user):

	fakeroot apt-get --compile source petsc

This will download and build everything for you.

If the unstable version does not solve your problem, or the customizations
below don't meet your needs, file a bug report, and if your problem is not
specific to the Debian package then I'll forward it upstream.

CUSTOMIZING THE DEBIAN PETSC PACKAGE

There are several ways to customize this package:

1) To use a different PETSC_ARCH variable (e.g. linux_alpha_dec to use the
   Compaq compilers on an Alpha), do:

	apt-get source petsc
	cd petsc-3.23.0.dsfg1
	fakeroot debian/rules PETSC_ARCH=linux_alpha_dec binary

   Note that this will only build architecture-dependent packages, and with
   different package names, different directory names (still linked from
   /usr/lib/petsc), and different shared library sonames.

2) You can also build the libraries to use the lam or mpich MPI implementation
   instead of the default openmpi by setting PETSC_MPI=lam (or mpich) and
   PETSC_MPI_DIR=/usr/lib/lam (or mpich, or mpich-mpd or mpich-shmem) and build
   as with the Compaq compilers above.  This will also result in only
   architecture-dependent packages with different package names, directory
   names, and shared library sonames.

If needed, you can change the soname of your custom library by using the configure
flag --shared-library-extension=<ext>, which changes the library and soname to
libpetsc<ext>.so

Note that individual users can build against non-default installed versions of
PETSc simply by setting the PETSC_DIR environment variable to the target
directory instead of /usr/lib/petsc, for example to build against the lam
version a user might set PETSC_DIR=/usr/lib/petscdir/petsc3.23/x86_64-linux-gnu-lam-real .

NOTE ON SYMBOLIC LINKS THROUGH /etc/alternatives

Because it is possible and often desirable to have multiple versions of PETSc
installed at the same time, this package facilitates the process by setting up
multiple symbolic links through /etc/alternatives.  To switch the default
symbolic links from one installed version to another, you should use the
update-alternatives Debian script (in /usr/sbin).  For example:

	update-alternatives --display petsc

will show you the current symlink from /usr/lib/petsc, and all of its
accompanying "slave" links, as well as all of the other possible values of
links if you have multiple versions of PETSc installed.  The command:

	update-alternatives --config petsc

(as root) will present you with a list of possible values to choose from, if
there is more than one.

When setting your preference for /usr/lib/petsc via "update-alternatives --config petsc",
it is important for consistency to also update your preference for the
main shared library files provided by libpetsc-real3.23 or libpetsc-complex3.23.
These alternative links are controlled by libpetsc.so.3.23:

	update-alternatives --config libpetsc.so.3.23

The preferred alternative for the major petsc version (e.g. 3.23) is linked in
/usr/lib/petscdir/3.23 and set by

	update-alternatives --config petsc3.23

To maintain the consistency of the master and slave symlinks, it is very
important that you use the Debian update-alternatives command, and do NOT
hand-edit the symbolic links yourself.

The full set of PETSc alternatives is:

petsc	- set the default version (real or complex) of PETSc (/usr/lib/petsc)

libpetsc_real.so
	- set the default PETSc shared library with real number support

libpetsc_complex.so
	- set the default PETSc shared library with complex number support

petsc3.23
	- set the preferred version (real or complex, or debug) of PETSc 3.23
	  (/usr/lib/petscdir/3.23)

libpetsc.so.3.23
	- set the preferred version (real or complex) for the shared library
	  of PETSc 3.23


===== 64-bit indexing =====

Support for 64-bit indexing is provided in libpetsc64* packages.
These enables PETSc to be used on larger systems with more than 2 billion elements.

Suitesparse does not support 64-bit indexing on 32-bit platforms
(armel armhf i386 powerpc x32) and Suitesparse support has therefore been
dropped from the 64-bit builds on these architectures.


 -- Drew Parsons <dparsons@debian.org>, Sat, 20 June 2020 10:00:00 +0800