A PyCUDA implementation of the Radio Interferometry Measurement Equation, and a foothill of Mount Exaflop.
Montblanc is licensed under the GNU GPL v2.0 License.
- PyCUDA 2016.1
- A Kepler NVIDIA GPU for more recent functionality.
Certain pre-requisites must be installed, prior to calling the setup.py
script.
libffi development files, required by cffi. On ubuntu 14.04, you can run:
$ sudo apt-get install libffi-dev
casacore and the measures found in casacore-data. Gijs Molenaar has kindly packaged this on Ubuntu/Debian style systems.
On Ubuntu 14.04, these packages can be added from the radio astronomy PPA :
$ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:radio-astro/main $ sudo apt-get update $ sudo apt-get install casacore21 casacore-data
On Ubuntu 16.04 these packages can be added from the kernsuite PPA:
$ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:kernsuite/kern-1 $ sudo apt-get update $ sudo apt-get install casacore-dev casacore-data
Otherwise, casacore and the measures tables will need to be manually installed.
It is strongly recommended that you perform the install within a Virtual Environment. If not, consider adding the --user
flag to the following pip and python commands to install within your home directory.
First install numpy due to this issue.
$ pip install numpy
Then, run
$ python setup.py build
to build the package and
$ python setup.py install
to install the package.
numexpr. When running
python setup.py install
, if you see an error message like this:Traceback (most recent call last): File "setup.py", line 154, in <module> setup_package() File "setup.py", line 146, in setup_package from numpy.distutils.core import setup ImportError: No module named numpy.distutils.core
Go back to Installing the package and install numpy.
PyCUDA 2016.1. setup.py will attempt to install this automatically, but this might not work if you have a non-standard CUDA install location. It's worth running
$ python -c 'import pycuda.autoinit'
to check if your pycuda can talk to the NVIDIA driver. If not, manually download and install PyCUDA.
cub 1.5.2. setup.py will attempt to download this from github and install to the correct directory during install. If this fails do the following:
$ wget -c https://codeload.github.com/NVlabs/cub/zip/1.5.2 $ mv 1.5.2 cub.zip $ python setup.py install
- python-casacore is specified as a dependency in setup.py. If install fails here, you will need to manually install it and point it at your casacore libraries.
Once the libraries have been compiled you should be able to run the
$ cd tests
$ python -c 'import montblanc; montblanc.test()'
$ python -m unittest test_rime_v4.TestRimeV4.test_sum_coherencies_double
which will run the entire test suite or only the specified test case, respectively. The reported times are for the entire test case with numpy code, and not just the CUDA kernels.
If you're running on an ubuntu laptop with optimus technology, you may have to install bumblebee and run
$ optirun python -c 'import montblanc; montblanc.test()'
You could also try run
$ cd examples
$ python MS_example.py /home/user/data/WSRT.MS -np 10 -ng 10 -c 100
which sets up things based on the supplied Measurement Set, with 10 point and 10 gaussian sources. It performs 100 iterations of the pipeline.
If you use Montblanc and find it useful, please consider citing the related paper. A arXiv preprint is available.
The BIRO paper is available at MNRAS, and a arXiv is also available.
Montblanc is an experimental package, undergoing rapid development. The plan for 2015 is to iterate on new versions of the BIRO pipeline.
In general, I will avoid making changes to BIRO v2 and v3, but everything beyond that may be changed, including the basic API residing in BaseSolver.py. In practice, this means that the interfaces in the base montblanc package will remain stable. For example:
import montblanc
montblanc.rime_solver(...)
Everything should be considered unstable and subject to change. I will make an effort to maintain the CHANGELOG.md, to record any breaking API changes.