-
Notifications
You must be signed in to change notification settings - Fork 35
[guide] Build the Fluidity PyOP2 branch
Florian Rathgeber edited this page Jul 26, 2013
·
3 revisions
The following assumes you have the fluidity-dev package from the fluidity-core PPA installed, which contains all dependencies for building fluidity:
sudo add-apt-repository ppa:fluidity-core/ppa
sudo apt-get update
sudo apt-get install fluidity-dev
Build the floppy_bn branch of fluidity:
bzr branch lp:~fluidity-core/fluidity/firedrake
cd firedrake
# This MUST be the same PETSc you've used to build PyOP2
export PETSC_DIR=/path/to/petsc
./configure --without-adjoint --enable-sam --enable-shared --enable-2d-adaptivity --enable-debugging
make -j12 &&
make -j12 fltools &&
make -j12 shared &&
make -j12 python_build
There is an flml to dump decomposed meshes in tests/ufl_common/dump.flml.template
. Use it from the tests/ufl_dump
folder as follows:
To generate the decomposed mesh for the adv_diff_mpi
run
make run
To generate custom decomposed meshes run
make custom
which accepts the following parameters:
-
NPROCS
to set the number of MPI processes -
X
to set the number of layers in the x-direction -
Y
to set the number of layers in the y-direction -
NAME
for the output mesh file name
The output files are gzipped pickle dumps named NAME_PROC.pickle.gz
, which can be loaded in PyOP2 with
import gzip
from cPickle import load
with gzip.open(opt['mesh'] + '.' + str(op2.MPI.comm.rank) + '.pickle.gz') as f:
elements, nodes, elem_node, coords = load(f)