Pages

Thursday, April 2, 2015

Install Go Programming Language in Ubuntu

Download the latest stable source code goX.X.X.src.tar.gz from https://golang.org/doc/install/source .
Extract "go" folder from the goX.X.X.src.tar.gz to home directory.


Edit file .bashrc and add:
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
Based on my OS (Ubuntu 14.04 64 bit), also add:
export GOARCH=amd64
export GOOS=linux

First make sure gcc and libc6-dev already installed. From terminal:
sudo apt-get install gcc libc6-dev

Now build from ~/go/src by executing all.bash


When done building, it shows:


And 3 new folder showed after installation


Then create folder named "gocode" in home directory, and write file hello.go to test the installation by running command "go run hello.go".


Wednesday, May 7, 2014

Building Numpy and Scipy with icc, ifort and Intel MKL

My rig .
OS : Ubuntu 12.04 64 bit
Numpy : 1.8.1
Scipy: 0.14
gcc: 4.6.3
icc/ifort: 14.0.2
Intel MKL: 11.1 update 2

Modified from https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl to get passed all test in Numpy and Scipy, using https://github.com/scipy/scipy/issues/1205

Edit intel.py from numpy/distutils/fcompiler/ to change optimization to O1
Compile and install Numpy using gcc:
python setup.py config build_clib build_ext -lstdc++ install

Compile and install Scipy using icc and ifort:
python setup.py config --compiler=intelem --fcompiler=intelem build_clib --compiler=intelem --fcompiler=intelem build_ext --compiler=intelem --fcompiler=intelem -lstdc++ install