ROSE Compiler Framework/ShiftCalculus

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Overview[edit | edit source]

A March 2015 meeting used projects/ShiftCalculus2 and the testing code is test10 in the makefile.

Main source files

  • shiftCalculusCompiler.C and .h : the DSL compiler
  • dslCodeGeneration.C and .h : the code generator generateStencilCode()

build[edit | edit source]

The EDG 4.9 and GNU 4.8 are required to support the C++11 that is present in the Shift Calculus DSL.

  • C++11 is required for this project. GCC 4.8.1 is recommended to accept "-std=c++11" .
  • EDG 4.9 frontend is needed: --enable-edg_version=4.9

Setup environment

  • GCC_VERSION=4.8.1 BOOST_VERSION=1_50_0 source /nfs/casc/overture/ROSE/opt/rhel6/x86_64/

An example configuration line:

../sourcetree/configure --prefix=/path/to/install --with-boost=/nfs/casc/overture/ROSE/opt/rhel6/x86_64/boost/1_50_0/gcc/4.8.1/ --with-C_OPTIMIZE=-O0 --with-CXX_OPTIMIZE=-O0 --with-ROSE_LONG_MAKE_CHECK_RULE=yes --enable-boost-version-check=false --enable-gcc-version-check=false --enable-edg_version=4.9

tests[edit | edit source]

  • "make test10" will generate C++ output code with no additional optimization
  • "make" will generate CUDA output code with loop collapsing.