1 2 This directory src/contrib/spai contains code to interface 3PETSc to the Sparse Approximate Inverse Preconditioner (SPAI) 4implemented by Steven Bernard and available at 5 6 http://www.sam.math.ethz.ch/~grote/spai/ 7 8 To use this, you must first get and install the SPAI package. 9Unfortunately, SPAI does not come ready to compile into a library 10and is not portable to most Unix machines; though it does say it 11compiles on both the IBM SP and Cray T3D, you may have to hack it 12slightly for other machines. 13 14 Once you have created the spai_3.0 directory from the tar file. 15 16 1) Compile all the .o files in the spai_3.0 directory. You will 17 probably have to edit the Makefile and then run make spai 18 2) Create a library with the command 19 ar cr libspai.a *.o 20 3) On machines that require it, run ranlib on the library 21 ranlib libspai.a 22 4) Edit the PETSc file bmake/$PETSC_ARCH/base.site and indicate 23 the location of the SPAI directory 24 5) Cd to src/contrib/pc/spai/src and do make BOPT=g and make BOPT=O 25 7) You are now ready to run an example, cd to src/contrib/pc/spai/examples/ 26 tutorials and make ex1 in the usual PETSc way. You can run it 27 using any of the test matrices in src/mat/examples/matrices 28 29 If you have problems compiling SPAI please contact Steven Bernard 30directly. If you have problems linking PETSc with SPAI or running the 31examples then after checking the docs/troubleshooting.html and 32docs/bugreporting.html file contact petsc-maint@mcs.anl.gov 33 34 This contribution has not been extensively tested or optimized for 35performance yet. 36