sagecal/INSTALL.md

90 lines
2.5 KiB
Markdown
Raw Normal View History

vr 2 dec 2016 23:07:19 CET
2017-11-16 23:13:07 +08:00
# SAGECal Installation
2017-11-16 23:13:07 +08:00
## Cmake Build
### Ubuntu
- Add KERN repository: http://kernsuite.info/
```
apt-get install -y git cmake g++ pkg-config libcfitsio-dev libcfitsio-bin libopenblas-dev libopenblas-base wcslib-dev wcslib-tools libglib2.0-dev
```
2018-02-28 17:00:24 +08:00
- Clone the repository
```
git clone -b sprint_cmake https://git@github.com/nlesc-dirac/sagecal.git
```
- Build SageCal
```
mkdir build && cd build
cmake .. -DCASACORE_ROOT_DIR=/opt/soft/casacore/ -DENABLE_CUDA=OFF
```
### Via Anaconda (not complete)
```
conda install -c conda-forge casacore==2.4.1
```
2017-11-16 23:13:07 +08:00
## 1 Prerequsites:
2014-01-07 06:07:07 +08:00
- CASACORE http://casacore.googlecode.com/
- glib http://developer.gnome.org/glib
- BLAS/LAPACK
Highly recommended is OpenBLAS http://www.openblas.net/
2015-08-20 19:51:34 +08:00
Also, to avoid any linking issues (and to get best performance), build OpenBLAS from source and link SAGECal with the static library (libopenblas***.a) and NOT libopenblas***.so
2014-01-07 06:07:07 +08:00
- Compilers gcc/g++ or Intel icc/icpc
- If you have NVIDIA GPUs,
-- CUDA/CUBLAS/CUSOLVER and nvcc
-- NVML Nvidia management library
2014-01-07 06:07:07 +08:00
- If you are using Intel Xeon Phi MICs.
-- Intel MKL and other libraries
2015-08-20 19:53:14 +08:00
- Get the source for SAGECal : git clone git://git.code.sf.net/p/sagecal/code sagecal-code
2014-01-07 06:07:07 +08:00
2018-02-26 22:22:26 +08:00
2017-11-16 23:13:07 +08:00
## 2 The basic way to build is
2014-01-07 06:07:07 +08:00
1.a) go to ./src/lib and run make (which will create libsagecal.a)
1.b) go to ./src/MS and run make (which will create the executable)
2017-11-16 23:13:07 +08:00
## 3 Build settings
In ./src/lib and ./src/MS you MUST edit the Makefiles to suit your system. Some common items to edit are:
2014-01-07 06:07:07 +08:00
- LAPACK: directory where LAPACK/OpenBLAS is installed
- GLIBI/GLIBL: include/lib files for glib
2015-11-05 04:15:35 +08:00
- CASA_LIBDIR/CASA_INCDIR/CASA_LIBS : casacore include/library location and files:
Note with new CASACORE might need two include paths, e.g.
-I/opt/casacore/include/ -I/opt/casacore/include/casacore
- CUDAINC/CUDALIB : where CUDA/CUBLAS/CUSOLVER is installed
- NVML_INC/NVML_LIB : NVML include/lib path
2014-01-07 06:07:07 +08:00
- NVCFLAGS : flags to pass to nvcc, especially -arch option to match your GPU
- MKLROOT : for Intel MKL
Example makefiles:
Makefile : plain build
Makefile.gpu: with GPU support
Note: Edit sagecal.h MAX_GPU_ID to match the number of available GPUs
2014-01-07 06:07:07 +08:00
Makefile.MIC : with Intel Xeon Phi support
2017-11-16 23:13:07 +08:00
# SAGECAL-MPI Installation
## 1 Prerequsites:
- Same as above
- MPI (e.g. OpenMPI)
2017-11-16 23:13:07 +08:00
## 2 Build ./src/lib as above (using mpicc -DMPI_BUILD)
## 3 Build ./src/MPI using mpicc++
2017-11-16 23:13:07 +08:00
## BUILDSKY Installation
2017-11-16 23:13:07 +08:00
- See INSTALL in ./src/buildsky
2017-11-16 23:13:07 +08:00
## RESTORE Installation
2017-11-16 23:13:07 +08:00
- See INSTALL in ./src/restore