Home

Awesome

PETSc

This package provides thin wrappers for PETSc, as well as a few convenience functions that take advantage of multiple dispatch.

This package requires the MPI.jl package be installed. Once it is installed you should be able to run both Julia and Petsc in parallel using MPI for all communication. The testing verifies that PETSc can be used both serially and in parallel.

To run PETSC in parallel, do:

mpirun -np 4 julia ./name_of_file

for a 4 processor run. Note that this launches 4 independent Julia processes. They are not aware of each other using Julia's built-in parallelism, and MPI is used for all communications.

To run in serial, do:

julia ./name_of_file

Even when running serially, the MPI.jl package must be installed.

Notes on wrapping functions

Wrappers generated by Clang.jl are in the src/auto directory. Although not quite usable, the functions can be made useable with a few simple modifications:

Directory Structure

/src : source files. PETSc.jl is the main file containing initialization, with the functions for each type of Petsc object in its own file. All constants are declared in petsc_constants.jl.

/src/auto: auto generated wrappers from Clang.jl. Not directly useful, but easy to modify to make useful

/test : contains runtest.jl, which does some setup and runs all tests on the current PETSc installation. Tests for each type of Petsc object (mirroring the files in /src) are contained in separate files. The file runtests.sh builds PETSc and runs the tests on combinations of integer size, floating point precision, and type of scalar (real or complex).

/deps : builds Petsc if needed. See description below /docs: documentation (using Documenter.jl)

Versions

Build Status