1. Installation

The following OS distributions and platforms are recommended:

  • OS distribution

    • CentOS 7.3 or later

    • RHEL 7.3 or later

  • Platform

    • Intel Xeon

    • Intel Xeon Phi

    • Fujitsu A64FX

1.1. Prepare files for building McKernel

Grant read permission to the System.map file of your kernel version on the build machine:

sudo chmod a+r /boot/System.map-`uname -r`

Install the following packages to the build machine:

cmake kernel-devel binutils-devel systemd-devel numactl-devel gcc make nasm git libdwarf-devel

1.1.1. When having access to repositories

On RHEL 8, enable the CodeReady Linux Builder (CLB) repository:

sudo subscription-manager repos --enable codeready-builder-for-rhel-8-$(/bin/arch)-rpms

On CentOS 8, enable the PowerTools repository:

sudo dnf config-manager --set-enabled PowerTools

Install with yum:

sudo yum install cmake kernel-devel binutils-devel systemd-devel numactl-devel gcc make nasm git libdwarf-devel

1.1.2. When not having access to repositories

Ask the system administrator to install them. Note that libdwarf-devel is in the CodeReady Linux Builder repository on RHEL 8 or in the PowerTools repository on CentOS 8.

1.2. Clone, compile, install

Clone the source code:

mkdir -p ~/src/ihk+mckernel/
cd ~/src/ihk+mckernel/
git clone --recursive -b development https://github.com/RIKEN-SysSoft/mckernel.git

(Optional) Checkout to the specific branch or version:

cd mckernel
git checkout <pathspec>
git submodule update

Foe example, if you want to try the development branch, use “development” as the pathspec. If you want to try the prerelease version 1.7.0-0.2, use “1.7.0-0.2”.

Move to build directory:

mkdir -p ~/src/ihk+mckernel/build && cd ~/src/ihk+mckernel/build

Run cmake:

1.2.1. When not cross-compiling:

cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ihk+mckernel ../mckernel

1.2.2. When cross-compiling:

cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ihk+mckernel \
  -DUNAME_R=<target_uname_r> \
  -DKERNEL_DIR=<kernnel_dir> \
  -DBUILD_TARGET=smp-arm64 \
  -DCMAKE_TOOLCHAIN_FILE=../mckernel/cmake/cross-aarch64.cmake \
  ../mckernel

1.2.3. Install with cmake

Install with make:

make -j install

The kernel modules and McKernel kernel image should be installed under the ihk+mckernel folder in your home directory.

1.2.4. Install with rpm

Create the tarball and the spec file:

make dist
cp mckernel-<version>.tar.gz <rpmbuild>/SOURCES

Create the rpm package:

When not cross-compiling:

rpmbuild -ba scripts/mckernel.spec

When cross-compiling:

rpmbuild -ba scripts/mckernel.spec --target <target_uname_m> -D 'kernel_version <target_uname_r>' -D 'kernel_dir <kernel_source>'

Install the rpm package:

sudo rpm -ivh <rpmbuild>/RPMS/<arch>/mckernel-<version>-<release>_<linux_kernel_ver>_<dist>.<arch>.rpm

The kernel modules and McKernel kernel image are installed under the standard system directories.

1.3. Prepare files and change settings for installing McKernel

Disable SELinux of the compute nodes:

sudo vim /etc/selinux/config

Change the file to SELINUX=disabled. And then reboot the compute nodes:

sudo reboot

Install the following packages to the compute nodes:

systemd-libs numactl-libs libdwarf

1.3.1. When having access to repositories

On RHEL 8, enable the CodeReady Linux Builder (CLB) repository:

sudo subscription-manager repos --enable codeready-builder-for-rhel-8-$(/bin/arch)-rpms

On CentOS 8, enable the PowerTools repository:

sudo dnf config-manager --set-enabled PowerTools

Install with yum:

sudo yum install systemd-libs numactl-libs libdwarf

1.3.2. When not having access to repositories

Ask the system administrator to install them. Note that libdwarf is in the CodeReady Linux Builder repository on RHEL 8 or in the PowerTools repository on CentOS 8.

1.4. Advanced: Enable Utility Thread offloading Interface (UTI)

UTI enables a runtime such as MPI runtime to spawn utility threads such as MPI asynchronous progress threads to Linux cores.

1.4.1. Install capstone

When compute nodes don't have access to repositories

Install EPEL capstone-devel:

sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo yum install capstone-devel

When compute nodes don't have access to repositories

Ask the system administrator to install capstone-devel. Note that it is in the EPEL repository.

1.4.2. Install syscall_intercept

git clone https://github.com/RIKEN-SysSoft/syscall_intercept.git
mkdir build && cd build
cmake <syscall_intercept>/arch/aarch64 -DCMAKE_INSTALL_PREFIX=<syscall-intercept-install> -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DTREAT_WARNINGS_AS_ERRORS=OFF

1.4.3. Install UTI for McKernel

Install:

git clone https://github.com/RIKEN-SysSoft/uti.git
mkdir build && cd build
../uti/configure --prefix=<mckernel-install> --with-rm=mckernel
make && make install

1.4.4. Install McKernel

Add -DENABLE_UTI=ON option to cmake:

CMAKE_PREFIX_PATH=<syscall-intercept-install> cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ihk+mckernel -DENABLE_UTI=ON $HOME/src/ihk+mckernel/mckernel

1.4.5. Run programs

Add --enable-uti option to mcexec:

mcexec --enable-uti <command>

1.4.6. Install UTI for Linux

You should skip this step if it's already installed as with, for example, Fujitsu Technical Computing Suite.

Install by make

git clone https://github.com/RIKEN-SysSoft/uti.git
mkdir build && cd build
../uti/configure --prefix=<uti-install> --with-rm=linux
make && make install

Install by rpm

git clone https://github.com/RIKEN-SysSoft/uti.git
mkdir build && cd build
../uti/configure --prefix=<uti-install> --with-rm=linux
rm -f ~/rpmbuild/SOURCES/<version>.tar.gz
rpmbuild -ba ./scripts/uti.spec
rpm -Uvh uti-<version>-<release>-<arch>.rpm

2. Interface

3. Boot

4. Shutdown