kusano 2b45e8
OpenBLAS Readme
kusano 2b45e8
kusano 2b45e8
1.Introduction
kusano 2b45e8
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. OpenBLAS is an open source project supported by Lab of Parallel Software and Computational Science, ISCAS.(http://www.rdcps.ac.cn)
kusano 2b45e8
Please read the documents on OpenBLAS wiki pages(http://github.com/xianyi/OpenBLAS/wiki).
kusano 2b45e8
kusano 2b45e8
2.Intallation
kusano 2b45e8
Download from project homepage. http://xianyi.github.com/OpenBLAS/
kusano 2b45e8
Or,
kusano 2b45e8
check out codes from git://github.com/xianyi/OpenBLAS.git
kusano 2b45e8
1)Normal compile
kusano 2b45e8
  (a) type "make" to detect the CPU automatically.
kusano 2b45e8
  or
kusano 2b45e8
  (b) type "make TARGET=xxx" to set target CPU, e.g. "make TARGET=NEHALEM". The full target list is in file TargetList.txt.
kusano 2b45e8
kusano 2b45e8
2)Cross compile
kusano 2b45e8
Please set CC and FC with the cross toolchains. Then, set HOSTCC with your host C compiler. At last, set TARGET explicitly.
kusano 2b45e8
kusano 2b45e8
examples:
kusano 2b45e8
On X86 box, compile this library for loongson3a CPU.
kusano 2b45e8
make BINARY=64 CC=mips64el-unknown-linux-gnu-gcc FC=mips64el-unknown-linux-gnu-gfortran HOSTCC=gcc TARGET=LOONGSON3A
kusano 2b45e8
kusano 2b45e8
3)Debug version
kusano 2b45e8
make DEBUG=1
kusano 2b45e8
kusano 2b45e8
4)Intall to the directory (Optional)
kusano 2b45e8
e.g.
kusano 2b45e8
make install PREFIX=your_installation_directory
kusano 2b45e8
The default directory is /opt/OpenBLAS
kusano 2b45e8
kusano 2b45e8
3.Support CPU & OS
kusano 2b45e8
Please read GotoBLAS_01Readme.txt
kusano 2b45e8
kusano 2b45e8
Additional support CPU:
kusano 2b45e8
x86_64:
kusano 2b45e8
	Intel Xeon 56xx (Westmere) //Used GotoBLAS2 Nehalem codes.
kusano 2b45e8
MIPS64:
kusano 2b45e8
	ICT Loongson 3A //Level 3 BLAS subroutines are optimized.
kusano 2b45e8
kusano 2b45e8
4.Usages
kusano 2b45e8
Link with libopenblas.a or -lopenblas for shared library.
kusano 2b45e8
kusano 2b45e8
4.1 Set the number of threads with environment variables. for example,
kusano 2b45e8
export OPENBLAS_NUM_THREADS=4
kusano 2b45e8
 or
kusano 2b45e8
export GOTO_NUM_THREADS=4
kusano 2b45e8
 or 
kusano 2b45e8
export OMP_NUM_THREADS=4
kusano 2b45e8
kusano 2b45e8
The priorities are OPENBLAS_NUM_THREADS > GOTO_NUM_THREADS > OMP_NUM_THREADS.
kusano 2b45e8
kusano 2b45e8
If you compile this lib with USE_OPENMP=1, you should set OMP_NUM_THREADS environment variable. OpenBLAS ignores OPENBLAS_NUM_THREADS and GOTO_NUM_THREADS with USE_OPENMP=1.
kusano 2b45e8
kusano 2b45e8
4.2 Set the number of threads with calling functions. for example,
kusano 2b45e8
void goto_set_num_threads(int num_threads);
kusano 2b45e8
or
kusano 2b45e8
void openblas_set_num_threads(int num_threads);
kusano 2b45e8
kusano 2b45e8
If you compile this lib with USE_OPENMP=1, you should use the above functions, too.
kusano 2b45e8
kusano 2b45e8
5.Report Bugs
kusano 2b45e8
Please add a issue in https://github.com/xianyi/OpenBLAS/issues
kusano 2b45e8
kusano 2b45e8
6.To-Do List:
kusano 2b45e8
Optimization on ICT Loongson 3A CPU
kusano 2b45e8
kusano 2b45e8
7.Contact
kusano 2b45e8
OpenBLAS users mailing list: http://list.rdcps.ac.cn/mailman/listinfo/openblas
kusano 2b45e8
kusano 2b45e8
8.ChangeLog
kusano 2b45e8
Please see Changelog.txt to obtain the differences between GotoBLAS2 1.13 BSD version.
kusano 2b45e8
kusano 2b45e8
9.Known Issues
kusano 2b45e8
* The number of CPUs/Cores should less than or equal to 8*sizeof(unsigned long). On 64 bits, the limit 
kusano 2b45e8
  is 64. On 32 bits, it is 32.
kusano 2b45e8
* On Loongson 3A. make test would be failed because of pthread_create error. The error code is EAGAIN. However, it will be OK when you run the same testcase on shell. I don't think this is a bug in OpenBLAS. 
kusano 2b45e8
kusano 2b45e8
10. Specification of Git Branches
kusano 2b45e8
We used the git branching model in this article (http://nvie.com/posts/a-successful-git-branching-model/). 
kusano 2b45e8
Now, there are 4 branches in github.com.
kusano 2b45e8
  * The master branch. This a main branch to reflect a production-ready state.
kusano 2b45e8
  * The develop branch. This a main branch to reflect a state with the latest delivered development changes for the next release.
kusano 2b45e8
  * The loongson3a branch. This is a feature branch. We develop Loongson3A codes on this branch. We will merge this feature to develop branch in future.
kusano 2b45e8
  * The gh-pages branch. This is for web pages