207
210
<p><a name="reduce-disk-space"><strong><font color="#FF0000">The PETSc distribution is SO
208
211
large. How can I reduce my disk space usage?</font> </strong></a></p>
209
212
<p>a) The directory ${PETSC_DIR}/docs contains a set of HTML manual pages in for use with
210
a browser. You can delete these pages to save about .8 Mbyte of space.
211
(This is not recommended with the Debian package, as it messes up the dpkg
212
database. Instead, install only the Debian packages which you need,
213
e.g. leave out the -dbg and -doc packages.) </p>
213
a browser. You can delete these pages to save about .8 Mbyte of space. </p>
214
214
<p>b) The PETSc users manual is provided in PostScript and HTML formats in
215
<a href="manual.ps.gz">${PETSC_DIR}/docs/manual.ps</a> and
216
<a href="manual/manual.html">${PETSC_DIR}/docs/manual.html</a>, respectively. Each requires
215
${PETSC_DIR}/docs/manual.ps and ${PETSC_DIR}/docs/manual.html, respectively. Each requires
217
216
several hundred kilobytes of space. You can delete either version that you do not need. </p>
218
217
<p>c) The PETSc test suite contains sample output for many of the examples. These are
219
218
contained in the PETSc directories ${PETSC_DIR}/src/*/examples/tutorials/output and
220
219
${PETSC_DIR}/src/*/examples/tests/output. Once you have run the test examples, you may
221
remove all of these directories to save about 300 Kbytes of disk space.
222
(All of these are in a compressed tarball in the -doc Debian package,
223
simply removing this package saves about 11 MB of disk space!)</p>
220
remove all of these directories to save about 300 Kbytes of disk space. </p>
224
221
<p>d) The debugging versions (BOPT=g) of the libraries are larger than the optimized
225
222
versions (BOPT=O). In a pinch you can work with BOPT=O, although we do not recommend it
226
generally because finding bugs is much easier with the BOPT=g version.
227
(All of these are in the -dbg Debian package, simply removing this saves
228
about 23 MB on i386 and powerpc, much more on alpha!) </p>
229
<p>e) you can delete bin/demos and bin/bitmaps (not included in the Debian packages)</p>
223
generally because finding bugs is much easier with the BOPT=g version. </p>
224
<p>e) you can delete bin/demos and bin/bitmaps </p>
230
225
<p><strong><font color="#FF0000"><a name="petsc-uni">I want to use PETSc only for
231
226
uniprocessor programs. Must I still install and use a version of MPI</a>?</font> </strong></p>
232
227
<p>For those using PETSc as a sequential library, the software can be compiled and run
233
228
without using an implementation of MPI. To do this, edit the file ${PETSC_DIR}/bmake/${PETSC_ARCH}/packages and change the lines that define the location
235
230
<p>MPI_LIB = ${PETSC_DIR}/lib/lib${BOPT}/${PETSC_ARCH}/libmpiuni.a <br>
236
MPI_INCLUDE = -I${PETSC_DIR}/src/sys/src/mpiuni <br>
237
MPIRUN = ${PETSC_DIR}/src/sys/src/mpiuni/mpirun </p>
231
MPI_INCLUDE = -I${PETSC_DIR}/include/mpiuni <br>
232
MPIRUN = ${PETSC_DIR}/bin/mpirun.uni </p>
238
233
<p>If you compile PETSc as such, you will be able to run PETSc ONLY on one processor.
239
234
Also, you will be able to run the program directly, without using the mpirun command. </p>
240
235
<p><strong><a name="no-x"><font color="#FF0000">Can I install PETSc to not use X windows
356
351
<p>- Run with a command such as: run -p4pg dummy </p>
357
352
<p>With MPICH using shmem as the underlying communication layer, the procedure is: </p>
358
353
<p>- dbx ex1 - run -np 3 (other petsc options) . </p>
354
<p><a name="debug-hang"><font color="#FF0000"><strong>How do I see where my code is hanging?</strong>
356
<p>You can use the -start_in_debugger option to start all processes in the debugger (each
357
will come up in its own xterm). Then use cont (for continue) in each xterm. Once you are sure
358
that the program is hanging, hit control-c in each xterm and then use 'where' to print a stack
359
trace for each process.</p>
360
361
<h3><a name="Shared Libraries">Shared Libraries</a></h3>
361
362
<p><font color="#FF0000"><strong><a name="install-shared">Can I install PETSc libraries as
417
418
my executable to a different machine?</strong></font></a></p>
418
419
<p>You would also need to have access to the shared libraries on this new machine. The
419
420
other alternative is to build the exeutable without shared libraries by first deleting the
420
shared libraries, and then creating the executable.
421
shared libraries, and then creating the executable. <p><a name="dynamic-shared"><font color="#FF0000"><strong>What
422
is the deal with dynamic libraries (and difference between shared libraries)</strong></font></a></p>
423
<p>PETSc libraries are installed as dynamic libraries when the flag PETSC_USE_DYNAMIC_LIBRARIES
424
is defined in bmake/${PETSC_ARCH}/petscconf.h. The difference with this -
425
from shared libraries - is the way the libraries are used. From the program
426
the library is loaded using dlopen() - and the functions are searched using
427
dlsymm(). This separates the resolution of function names from link-time to
428
run-time - i.e when dlopen()/dlsymm() are called.<p>When using Dynamic
429
libraries - PETSc libraries cannot be moved to a different location after