Installation instructions:

First, follow the download instructions for CnC-Python.

Then, ensure you have python and numpy installed. Based on our experiences, Python 2.7+ is the preferred version to use with CnC-Python.  After that, you can perform the following steps:

1. Install the latest version of babel from its homepage

While installing these commands may be helpful:

../babel/configure --prefix=/Users/shamsimam/softwares \
 --enable-maintainer-mode --enable-python \
 LDFLAGS=-L/Users/shamsimam/softwares/lib \
 JAVAPREFIX=/System/Library/Frameworks/JavaVM.framework/Home \
make -j4
sudo make install
make check

make check is optional and may take a long while to complete.

2. After installing babel run the following command:

babel-config --dump | grep SUPPORT

you should get output as follows:

BABEL_SUPPORTED_LANGUAGES="c cxx f77 f90 f03 java python"

ensure that Java and Python are supported.

3. Once babel is installed, you now need to install cnc-babel.
[For Developers] If you have access to the source, run "ant clean && ant" on the directory to have cnc-babel installed.
[For Developers] Remember to set HJ_HOME to point to the local installation of HJ and the CNC_HOME environment variable to the cnc_distrib directory.
[For end-users using the distribution] Remember to set HJ_HOME and CNC_HOME environment variables to the distribution directory, this will be used by some later scripts.

4. Running examples, e.g. cholesky

Examples also have associated makefiles. The following commands should run the translator, compiler and execution steps:

make translate
make build
make run
  • No labels