Skip to content

MCFC OP2 Fluidity tool chain

kynan edited this page Jun 1, 2012 · 7 revisions

This page gives a rough overview of how to run OP2 Fluidity tests.

Prerequisites

MCFC

Nothing to build, we'll use the generated code from tests/expected/op2

OP2-Common

On a recent Ubuntu system cd op2/c && ./cmake.local should "just work". Since currently only the OP2 sequential and CUDA backends are supported, only these are built, the MPI, OpenMP and HDF5 backends are disabled. For more detailed build instructions, refer to op2/c/README.

OP2_ROSE_Fortran

  1. Build the bundled version of the ROSE compiler: make sure the Boost libraries and libjvm are in your LD_LIBRARY_PATH and cd ROSE && python build.py -b. For more detailed build instructions, refer to ROSE/README.
  2. Build the OP2 source-to-source translator (translator subdirectory): Set ROSE_HOME to the base directory of your ROSE installation (normally ../ROSE/rose-0.9.5a-15165_inst) and BOOST_HOME to the base directory of your Boost installtion. Then run scons. For more detailed build instructions, refer to translator/README.

Fluidity

The following environment variables need to be set:

  • IMPERIAL_TRANSLATOR_HOME to the base directory of the OP2_ROSE_Fortran checkout
  • OP2_DIR to the op2 subdirectory of the OP2-Common checkout
  • MCFC_DIR to the base directory of the MCFC checkout
  • CUDA_TOOLKIT_DIR to the base directory of the CUDA toolkit (if other than /usr/local/cuda)
  • LD_LIBRARY_PATH to contain the paths to the Boost libraries, libjvm.so, librose.so and the OP2 libraries (normally the op2/c/lib subdirectory of the OP2-Common checkout)

Configure and build using the following script (save as build.sh and call with ./build.sh -c to configure and build and ./build.sh to build without configuring):

if [[ $1 == '-c' ]]; then
  ./configure --enable-debugging --with-op2=${OP2_DIR} --enable-shared
  make clean
fi
make -j4 && \\
make -j4 libfemtools && \\
make -j4 fluidity_library && \\
make -C op2
Clone this wiki locally