|
|
% clone
|
|
|
```
|
|
|
git clone https://bitbucket.org/petsc/petsc
|
|
|
cd petsc
|
|
|
git checkout next
|
|
|
```
|
|
|
|
|
|
% options to install dependency
|
|
|
|
|
|
`sudo DEBIAN_FRONTEND=noninteractive apt-get -qq install -fy build-essential cmake gfortran git python openmpi-bin libopenmpi-dev libopenblas-dev curl pkg-config`
|
|
|
|
|
|
% define variables
|
|
|
|
|
|
```
|
|
|
export FC=mpif90
|
|
|
export CC=mpicc
|
|
|
export CXX=mpicxx
|
|
|
misc/build_dependencies.sh
|
|
|
```
|
|
|
|
|
|
% export PETSC dir and arch (we should add these to .bashrc file)
|
|
|
|
|
|
```
|
|
|
export PETSC_DIR=/home/mohamed/tenstream/external/petsc
|
|
|
export PETSC_ARCH=default
|
|
|
```
|
|
|
|
|
|
% compile
|
|
|
|
|
|
```
|
|
|
cd build/
|
|
|
cmake ..
|
|
|
make -j4
|
|
|
```
|
|
|
|
|
|
% test the compiled version
|
|
|
|
|
|
`make check`
|
|
|
|
|
|
% show the library paths and copy the include path
|
|
|
|
|
|
`cmake -LA`
|
|
|
|
|
|
% adapt the palm config file accordingly |
|
|
\ No newline at end of file |