ROSE

From Autodiff
Jump to: navigation, search

There are nightly builds of of 32/64 bit Rose from their SVN trunk installed at

/home/derivs/software/$(whatami)/rose_inst

The official ROSE website is http://rosecompiler.org/.

Get the sources

from github clone the repository :

git clone https://github.com/rose-compiler/rose.git rose

NOTE: incremental builds do not always work - always do make clean or get clean copy

Build Rose

Note: some paths are taken from an install on octagon and you will need to change the green parts

  • make a build and a install directory and set
export ROSE_SOURCE_DIR=/disks/utke/Argonne/svn/CodeReps/anonymous/rose
export ROSE_BUILD_DIR=/disks/utke/Argonne/Apps/rose_build
export ROSE_INST_DIR=/home/derivs/software/$(whatami)/rose_inst

Follow the installation instructions with the following caveats:

  • for the following we assume boost is made and installed at BOOST_INSTALL, and we need to add the libraries to LD_LIBRARY_PATH e.g.
export BOOST_INSTALL=/home/derivs/software/$(whatami)/boost_1_45_0
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BOOST_INSTALL}/lib
  • if JAVA_HOME is set to some directory, then java and javac must be located in there, otherwise JAVA_HOME must not be set and both must be located in the PATH and libjvm.so must be in LD_LIBRARY_PATH, e.g.
export LIBJVM_DIR=/usr/lib/jvm/java-6-openjdk/jre/lib/i386/server
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIBJVM_DIR}
  • make the configure script (Note: if there is a message: macro `AM_PATH_XML2' not found in library this indicates that the libxml2 developer sources (e.g. libxml2-devel) are not installed on the system)
cd ${ROSE_SOURCE_DIR}
./build
  • configure in the build direcory
cd ${ROSE_BUILD_DIR}
  • complete build: ( we now configure --without-haskell which should circumvent problems with the haskell version; if it complains about the ghc version, edit ${ROSE_SOURCE_DIR}/config/support-haskell.m4 to fix up the numbers being checked and redo the previous step)
    ${ROSE_SOURCE_DIR}/configure --prefix=${ROSE_INST_DIR} --libdir=${ROSE_INST_DIR}/lib --with-boost=${BOOST_INSTALL} --without-haskell --enable-java --disable-binary-analysis-tests --disable-ltdl-install F77=gfortran FC=gfortran
    
  • quicker build / debuggable version:
    export CXXFLAGS="-g -O0"
    ${ROSE_SOURCE_DIR}/configure --prefix=${ROSE_INST_DIR} --libdir=${ROSE_INST_DIR}/lib --with-boost=${BOOST_INSTALL} --without-haskell --enable-java --disable-projects-directory --disable-binary-analysis-tests --disable-ltdl-install F77=gfortran FC=gfortran --with-CXX DEBUG="-g -D GLIBCXX DEBUG -D GLIBCXX DEBUG PEDANTIC"
    
  • Fortran only - no gcc version check + debuggable:
    export CXXFLAGS="-g -O0"
    ${ROSE_SOURCE_DIR}/configure --prefix=${ROSE_INST_DIR} --libdir=${ROSE_INST_DIR}/lib --with-boost=${BOOST_INSTALL} --enable-only-fortran --disable-gcc-version-check F77=gfortran FC=gfortran --with-CXX DEBUG="-g -O0 -D GLIBCXX DEBUG -D GLIBCXX DEBUG PEDANTIC" 
    
  • build it (use some reasonable number for j)
make -j 6 
  • install it with
make install

Test Rose

test binaries are in

${ROSE_INST_DIR}/bin

a simple set of tests can be done with testTranslator. Use --help to see the options.

ADIC connection

  • OA compiler issues:
    • OA doesn't build with gcc 4.5.0 see see OA bug
    • cannot build with gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4); claims it needs OA lib build with fPIC but when we build OA with CXXFLAGS=-fPIC we get an ICE in the OA build. see ADIC bug
  • sample build in
/homes/snarayan/sandbox/adic2
  • sample install in
/homes/snarayan/sandbox/adic2_install