Commit a0775c04 authored by Dan Povey's avatar Dan Povey
Browse files

trunk: Improve Makefile w.r.t. OpenBLAS compilation. Also minor cosmetic change.

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4998 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent ecb7cbf9
......@@ -124,9 +124,7 @@ int main(int argc, char *argv[]) {
"in the file given to --ivector-extraction-config, and "
"--chunk-length=-1.");
po.Register("num-threads-startup", &g_num_threads,
"Number of threads used when initializing iVector extractor. "
"Set this to 1 if using multi-threaded OpenBLAS to avoid crash.");
"Number of threads used when initializing iVector extractor.");
feature_config.Register(&po);
nnet2_decoding_config.Register(&po);
......
......@@ -128,8 +128,7 @@ int main(int argc, char *argv[]) {
"data incrementally, calling sleep() until each piece is ready. "
"If false, don't sleep (so it will be faster).");
po.Register("num-threads-startup", &g_num_threads,
"Number of threads used when initializing iVector extractor. "
"Set this to 1 if using multi-threaded OpenBLAS to avoid crash.");
"Number of threads used when initializing iVector extractor. ");
feature_config.Register(&po);
nnet2_decoding_config.Register(&po);
......
......@@ -161,9 +161,16 @@ openblas: openblas_compiled
fortran_opt = $(shell gcc -v 2>&1 | perl -e '$$x = join(" ", <STDIN>); if($$x =~ m/target=\S+64\S+/) { print "BINARY=64"; }')
# note: you can remove the USE_THREAD=0 option below if you want OpenBLAS to use multiple threads.
# then you could set, for example, OPENBLAS_NUM_THREADS=2 in your path.sh so that the runtime knows
# how many threads to use.
# the option FCOMMON_OPT=-frecursive is required if you are using gcc so that
# the Lapack components of OpenBlas do not crash in multi-threaded code
# (otherwise it will not be thread safe).
openblas_compiled:
-git clone git://github.com/xianyi/OpenBLAS
$(MAKE) PREFIX=`pwd`/OpenBLAS/install FC=gfortran $(fortran_opt) DEBUG=1 USE_THREAD=0 -C OpenBLAS all install
$(MAKE) PREFIX=`pwd`/OpenBLAS/install FC=gfortran $(fortran_opt) FCOMMON_OPT=-frecursive DEBUG=1 USE_THREAD=0 -C OpenBLAS all install
beamformit: beamformit-3.51
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment