From dffb0918a21b5279beeeb600a65541181b3c5d69 Mon Sep 17 00:00:00 2001 From: Masamichi Takagi Date: Thu, 4 Feb 2021 10:30:45 +0900 Subject: [PATCH] docs: add capstone installation options Change-Id: I96aa9a6405c17f8d9653f3d3894f0e71a57ab460 --- docs/uti.rst | 61 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/docs/uti.rst b/docs/uti.rst index 146c0d7f..c019d0ff 100644 --- a/docs/uti.rst +++ b/docs/uti.rst @@ -4,24 +4,41 @@ 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. -Install capstone -~~~~~~~~~~~~~~~~~~~~ +Install ``capstone`` and ``capstone-devel`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When compute nodes don't have access to repositories -"""""""""""""""""""""""""""""""""""""""""""""""""""" +When compute nodes don't have access to EPEL repository +""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Install EPEL capstone-devel: +Install EPEL ``capstone`` and ``capstone-devel``: :: sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm - sudo yum install capstone-devel + sudo yum install capstone capstone-devel -When compute nodes don't have access to repositories -"""""""""""""""""""""""""""""""""""""""""""""""""""" +When compute nodes don't have access to EPEL repository +""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Ask the system administrator to install ``capstone-devel``. Note that it is in the EPEL repository. +A. Ask the system administrator to install ``capstone`` and ``capstone-devel``. Note that it is in the EPEL repository. + +B. Download the rpm with the machine in which you are the administrator: + +:: + + sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + sudo yum install yum-utils + yumdownloader capstone capstone-devel + +and then install it to your home directory of the login node: + +:: + + cd $HOME/$(uname -p) + rpm2cpio capstone-4.0.1-9.el8.aarch64.rpm | cpio -idv + rpm2cpio capstone-devel-4.0.1-9.el8.aarch64.rpm | cpio -idv + sed -i 's#/usr/#'"$HOME"'/'"$(uname -p)"'/usr/#' $HOME/$(uname -p)/usr/lib64/pkgconfig/capstone.pc Install syscall_intercept @@ -31,7 +48,24 @@ Install syscall_intercept git clone https://github.com/RIKEN-SysSoft/syscall_intercept.git mkdir build && cd build - cmake /arch/aarch64 -DCMAKE_INSTALL_PREFIX= -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DTREAT_WARNINGS_AS_ERRORS=OFF + +When ``capstone`` and ``capstone-devel`` are installed into the system directory: + +:: + + cmake ../syscall_intercept/arch/aarch64 -DCMAKE_INSTALL_PREFIX=${HOME}/$(uname -p)/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DTREAT_WARNINGS_AS_ERRORS=OFF + +When ``capstone`` and ``capstone-devel`` are installed into your home directory: + +:: + + CMAKE_PREFIX_PATH=${HOME}/$(uname -p)/usr cmake ../syscall_intercept/arch/aarch64 -DCMAKE_INSTALL_PREFIX=${HOME}/$(uname -p)/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DTREAT_WARNINGS_AS_ERRORS=OFF + +Install: + +:: + + make && make install && make test Install UTI for McKernel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -48,16 +82,17 @@ Install: Install McKernel ~~~~~~~~~~~~~~~~~~~~ -Add ``-DENABLE_UTI=ON`` option to ``cmake``: +``cmake`` with the additional options: :: - CMAKE_PREFIX_PATH= cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ihk+mckernel -DENABLE_UTI=ON $HOME/src/ihk+mckernel/mckernel + CMAKE_PREFIX_PATH=${HOME}/$(uname -p)/usr cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ihk+mckernel -DENABLE_UTI=ON $HOME/src/ihk+mckernel/mckernel + make -j install Run programs ~~~~~~~~~~~~~~~~ -Add ``--enable-uti`` option to ``mcexec``: +``mcexec`` with ``--enable-uti`` option: ::