Compiling MPI.jl with Intel MPI

MPI.jl provides Julia interface to the Message Passing Interface (MPI).

Step 1: Download the MPI.jl

% git clone https://github.com/JuliaParallel/MPI.jl.git

Step 2: Update .bashrc and remember to source your .bashrc again

export CC=`which mpicc`
export FC=`which mpif90`

Step 3: Building MPI.jl

I’m using Intel MPI compiled at /usr/local/ . My Build is something like that

% julia --project -e 'ENV["JULIA_MPI_PATH"]="/usr/local/intel/2018u3/impi/2018.3.222/bin64"; using Pkg; Pkg.build("MPI"; verbose=true)'
Installing known registries into `~/.julia`
######################################################################## 100.0%
Added registry `General` to `~/.julia/registries/General`
Updating registry at `~/.julia/registries/General`
Installed Artifacts ──────────────────── v1.3.0
Installed MPICH_jll ──────────────────── v3.3.2+10
Installed OpenMPI_jll ────────────────── v4.0.2+2
Installed MicrosoftMPI_jll ───────────── v10.1.3+0
Installed CompilerSupportLibraries_jll ─ v0.3.4+0
Installed Requires ───────────────────── v1.1.2
Installed DocStringExtensions ────────── v0.8.3
Installed JLLWrappers ────────────────── v1.2.0
Downloading artifact: MPICH
Downloading artifact: OpenMPI
Downloading artifact: CompilerSupportLibraries
Updating `~/Downloads/MPI.jl/Project.toml`
[ffbed154] + DocStringExtensions v0.8.3
[7cb0a576] + MPICH_jll v3.3.2+10
[9237b28f] + MicrosoftMPI_jll v10.1.3+0
[fe0851c0] + OpenMPI_jll v4.0.2+2
[ae029012] + Requires v1.1.2
Updating `~/Downloads/MPI.jl/Manifest.toml`
[56f22d72] + Artifacts v1.3.0
[e66e0078] + CompilerSupportLibraries_jll v0.3.4+0
[ffbed154] + DocStringExtensions v0.8.3
[692b3bcd] + JLLWrappers v1.2.0
[7cb0a576] + MPICH_jll v3.3.2+10
[9237b28f] + MicrosoftMPI_jll v10.1.3+0
[fe0851c0] + OpenMPI_jll v4.0.2+2
[ae029012] + Requires v1.1.2
[2a0f44e3] + Base64
[ade2ca70] + Dates
[8ba89e20] + Distributed
[b77e0a4c] + InteractiveUtils
[76f85450] + LibGit2
[8f399da3] + Libdl
[56ddb016] + Logging
[d6f4376e] + Markdown
[44cfe95a] + Pkg
[de0858da] + Printf
[3fa0cd96] + REPL
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[6462fe0b] + Sockets
[8dfed614] + Test
[cf7118a7] + UUIDs
[4ec0a83e] + Unicode
Building MPI → `~/Downloads/MPI.jl/deps/build.log`
[ Info: using system MPI
┌ Info: Using implementation
│ libmpi = "libmpi"
│ mpiexec_cmd = `/usr/local/intel/2018u3/impi/2018.3.222/bin64/bin/mpiexec`
└ MPI_LIBRARY_VERSION_STRING = "Intel(R) MPI Library 2018 Update 3 for Linux* OS\n"
┌ Info: MPI implementation detected
│ impl = IntelMPI::MPIImpl = 4
│ version = v"2018.3.0"
└ abi = "MPICH"

Step 4: Verify that the binary “mpiexecjl” in the bin directory

Step 5: Usages

% mpiexecjl -n 20 julia script.jl

(mpiexecjl has the same syntax as the mpiexec binary that will be called, but it takes in addition a –project option to call the specific binary associated to the MPI.jl version in the given project. If no –project flag is used, the MPI.jl in the global Julia environment will be used instead.)

References:

  1. [solved] Can’t install MPI.jl in julia 1.0.1/0.7.0 on a CENTOS 7.4

Compiling airss-0.9.1 with GNU

Ab initio random structure searching (AIRSS) is a very simple, yet powerful and highly parallel, approach to structure prediction. For more information, Do take a look at https://airss-docs.github.io/

Installation Guide can be found at https://airss-docs.github.io/getting-started/installation/

 

Installation is quite a breeze. But there are a few additional steps if you have issues.

Step 1: Download airss package

% wget https://www.mtg.msm.cam.ac.uk/files/airss-0.9.1.tgz

Step 2: Load the GNU Compilers (Must be greater than version 5 and above)

Step 3: Compiling the application

% tar -xvf airss-0.9.1.tgz
% cd airss-0.9.1
% make

If you have error such as

% wget -c --timeout=1 --tries=2 -nv https://www.mtg.msm.cam.ac.uk/files/symmol.zip
Read error (Connection timed out) in headers
.....
.....

You may want to download manually and placed the symmol.zip at airss-0.9.1/external/symmol. Run the make again.

% make ; make install ; make neat
% make check
.....
.....
--------------------
Tests run in .check:
--------------------

Running example 1.1 (Crystals):

Al-44343-3411-1 -0.00 7.564 -6.654 8 Al Fm-3m 1
Al-44343-3411-2 -0.00 8.465 0.797 8 Al C2/m 1

Running example 1.2 (Clusters):

Al-44735-1896-1 0.00 615.385 -3.410 13 Al Ih 1
Al-44735-1896-2 0.00 615.385 0.362 13 Al C1 1
.....
.....

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.

Tools to Show your System Configuration

Tool 1: Display Information about CPU Architecture

[user1@node1 ~]$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 85
Model name: Intel(R) Xeon(R) Gold 6134 CPU @ 3.20GHz
Stepping: 4
CPU MHz: 3200.000
BogoMIPS: 6400.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 1024K
L3 cache: 25344K
NUMA node0 CPU(s): 0-7,16-23
NUMA node1 CPU(s): 8-15,24-31
.....
.....

Tool 2: List all PCI devices

[user1@node1 ~]# lspci -t -vv
-+-[0000:d7]-+-00.0-[d8]--
| +-01.0-[d9]--
| +-02.0-[da]--
| +-03.0-[db]--
| +-05.0 Intel Corporation Device 2034
| +-05.2 Intel Corporation Sky Lake-E RAS Configuration Registers
| +-05.4 Intel Corporation Device 2036
| +-0e.0 Intel Corporation Device 2058
| +-0e.1 Intel Corporation Device 2059
| +-0f.0 Intel Corporation Device 2058
| +-0f.1 Intel Corporation Device 2059
| +-10.0 Intel Corporation Device 2058
| +-10.1 Intel Corporation Device 2059
| +-12.0 Intel Corporation Sky Lake-E M3KTI Registers
| +-12.1 Intel Corporation Sky Lake-E M3KTI Registers
| +-12.2 Intel Corporation Sky Lake-E M3KTI Registers
| +-12.4 Intel Corporation Sky Lake-E M3KTI Registers
| +-12.5 Intel Corporation Sky Lake-E M3KTI Registers
| +-15.0 Intel Corporation Sky Lake-E M2PCI Registers
| +-16.0 Intel Corporation Sky Lake-E M2PCI Registers
| +-16.4 Intel Corporation Sky Lake-E M2PCI Registers
| \-17.0 Intel Corporation Sky Lake-E M2PCI Registers
.....
.....

Tool 3: List all PCI devices

[user@node1 ~]# lsblk
sda 8:0 0 1.1T 0 disk
├─sda1 8:1 0 200M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 1.1T 0 part
├─centos-root 253:0 0 50G 0 lvm /
├─centos-swap 253:1 0 4G 0 lvm [SWAP]
└─centos-home 253:2 0 1T 0 lvm

Tool 4: See flags kernel booted with

[user@node1 ~]
BOOT_IMAGE=/vmlinuz-3.10.0-693.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet LANG=en_US.UTF-8

Tool 5: Display available network interfaces

[root@hpc-gekko1 ~]# ifconfig -a
eno1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether XX:XX:XX:XX:XX:XX txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
.....
.....
.....

Tool 6 Using dmidecode to find hardware information
See Using dmidecode to find hardware information