-
Notifications
You must be signed in to change notification settings - Fork 47
MCFC OP2 Fluidity tool chain
This page gives a rough overview of how to run OP2 Fluidity tests.
- https://github.com/OP2/OP2-Common (temporary-dats branch)
- https://github.com/OP2/OP2_ROSE_Fortran (cpp-matrices branch)
- https://github.com/gmarkall/manycore_form_compiler (op2-assembly branch)
- https://code.launchpad.net/~fluidity-core/fluidity/op2-testing
Nothing to build, we'll use the generated code from tests/expected/op2
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
.
- Build the bundled version of the ROSE compiler: make sure the Boost libraries and libjvm are in your
LD_LIBRARY_PATH
andcd ROSE && python build.py -b
. For more detailed build instructions, refer toROSE/README
. - Build the OP2 source-to-source translator (
translator
subdirectory): SetROSE_HOME
to the base directory of your ROSE installation (normally../ROSE/rose-0.9.5a-15165_inst
) andBOOST_HOME
to the base directory of your Boost installtion. Then runscons
. For more detailed build instructions, refer totranslator/README
.
The following environment variables need to be set:
-
IMPERIAL_TRANSLATOR_HOME
to the base directory of the OP2_ROSE_Fortran checkout -
OP2_DIR
to theop2
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 theop2/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
The following OP2 tests are available (subdirectories of tests
):
- op2_advection
- op2_advection_diffusion
- op2_diffusion
- op2_helmholtz_mms
- op2_identity
- op2_noop
op2_common
contains resources shared among all the tests.
Run tools/testharness.py -f <test>.xml
, where <test>
is the name of the test you want to run (test names follow folder names).
- Navigate to the test folder
- Run
make clean
(optional) - Run
make input
ormake input SCALE=<float>
with<float>
a scaling factor if you want to run on a larger/smaller mesh. Note: For tests using cdisk scale < 1 means a larger mesh, whereas for tests using unitsquare scale > 1 means a larger mesh. MMS tests produce 4 meshes and input files (MMS_A is the coarsest and MMS_D the finest). - Run the test as
../../bin/op2_<bin> <test>.flml
, whereop2_<bin>
is the OP2 test binary and<test>.flml
the generated input file. - Evaluate the
.stat
or.vtu
files the test run produced