Compiling KALDI with OpenMPI and MKL

KALDI (Kaldi Speech Recognition Toolkit)

Step 1: Git Clone kaldi packages

% git clone https://github.com/kaldi-asr/kaldi.git

Step 2: Check Dependencies.

Do run the following steps in the blog entry Fixing zlib Dependencies Issues for kaldi

Step 3: Load OpenMPI-3.1.4 with GNU-6.5

You may wish to compile OpenMPI with GNU-6.5 according to Compiling OpenMPI-3.1.6 with GCC-6.5

Step 4: Compile kaldi tools

% cd /usr/local/kaldi/tools
% make
.....
.....
All done OK.

(This make take a long well)

Step 5: Compile src of the main kaldi

% source /usr/local/intel/2018u3/mkl/bin/mklvars.sh intel64
% export CXXFLAGS="-I/usr/local/zlib-1.2.11/include"
% ./configure --use-cuda=no
% make -j clean depend
% make -j 4

Fixing zlib Dependencies Issues for kaldi

What is Kaldi?

Kaldi is a toolkit for speech recognition, intended for use by speech recognition researchers and professionals. Find the code repository at http://github.com/kaldi-asr/kaldi.

Downloading Kaldi

% git clone https://github.com/kaldi-asr/kaldi.git

Checking Dependencies

Before you can compile, you may want to check the required dependencies

% cd kaldi/tools
% vim INSTALL

Running the Dependencies Test

% cd kaldi/tools/extras

Load Intel Compilers and MLK

export MKLROOT=/usr/local/intel_2018/mkl/lib

Run the Check_Dependencies Test

% ./check_dependencies.sh
./check_dependencies.sh: zlib is not installed.
./check_dependencies.sh: Some prerequisites are missing; install them using the command:
sudo yum install zlib-devel

(This error is strange because becuase zlib and zlib-devel has already been installed)

I used instead a compiled zlib. For more information how to compile zlib, see Compile zlib-1.2.8 with Intel-15.0.6

Next CXXFLAGS on your .bashrc.

CXXFLAGS="-I/usr/local/zlib-1.2.11/include"

Source ~/.bashrc once again.

% source ~/.bashrc
[user1@node1 extras]$ ./check_dependencies.sh
./check_dependencies.sh: all OK.