uti: integrate syscall_intercept
Change-Id: Ide14341acdca1450b0ad4f8a16cc078d0743afc8
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -4,3 +4,6 @@
|
||||
[submodule "executer/user/lib/libdwarf/libdwarf"]
|
||||
path = executer/user/lib/libdwarf/libdwarf
|
||||
url = https://github.com/bgerofi/libdwarf.git
|
||||
[submodule "executer/user/lib/syscall_intercept"]
|
||||
path = executer/user/lib/syscall_intercept
|
||||
url = https://github.com/RIKEN-SysSoft/syscall_intercept.git
|
||||
|
||||
@ -218,11 +218,6 @@ if (ENABLE_QLMPI)
|
||||
find_package(MPI REQUIRED)
|
||||
endif()
|
||||
|
||||
if (ENABLE_UTI)
|
||||
pkg_check_modules(LIBSYSCALL_INTERCEPT REQUIRED libsyscall_intercept)
|
||||
link_directories(${LIBSYSCALL_INTERCEPT_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-([0-9]+)(.*))?" "\\1;\\2;\\3;\\5;\\6" LINUX_VERSION ${UNAME_R})
|
||||
list(GET LINUX_VERSION 0 LINUX_VERSION_MAJOR)
|
||||
list(GET LINUX_VERSION 1 LINUX_VERSION_MINOR)
|
||||
|
||||
36
docs/uti.rst
36
docs/uti.rst
@ -41,32 +41,6 @@ and then install it to your home directory of the login node:
|
||||
sed -i 's#/usr/#'"$HOME"'/'"$(uname -p)"'/usr/#' $HOME/$(uname -p)/usr/lib64/pkgconfig/capstone.pc
|
||||
|
||||
|
||||
Install syscall_intercept
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
::
|
||||
|
||||
git clone https://github.com/RIKEN-SysSoft/syscall_intercept.git
|
||||
mkdir build && cd build
|
||||
|
||||
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
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -79,6 +53,7 @@ Install:
|
||||
../uti/configure --prefix=<mckernel-install> --with-rm=mckernel
|
||||
make && make install
|
||||
|
||||
|
||||
Install McKernel
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -86,11 +61,11 @@ Install McKernel
|
||||
|
||||
::
|
||||
|
||||
CMAKE_PREFIX_PATH=${HOME}/$(uname -p)/usr cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ihk+mckernel -DENABLE_UTI=ON $HOME/src/ihk+mckernel/mckernel
|
||||
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ihk+mckernel -DENABLE_UTI=ON $HOME/src/ihk+mckernel/mckernel
|
||||
make -j install
|
||||
|
||||
Run programs
|
||||
~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~
|
||||
|
||||
``mcexec`` with ``--enable-uti`` option:
|
||||
|
||||
@ -99,9 +74,9 @@ Run programs
|
||||
mcexec --enable-uti <command>
|
||||
|
||||
Install UTI for Linux
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You should skip this step if it's already installed as with, for example, Fujitsu Technical Computing Suite.
|
||||
You can skip this step if you don't want to develop a run-time using UTI, or if it's already installed with, for example, Fujitsu Technical Computing Suite.
|
||||
|
||||
Install by make
|
||||
"""""""""""""""
|
||||
@ -124,3 +99,4 @@ Install by rpm
|
||||
rm -f ~/rpmbuild/SOURCES/<version>.tar.gz
|
||||
rpmbuild -ba ./scripts/uti.spec
|
||||
rpm -Uvh uti-<version>-<release>-<arch>.rpm
|
||||
|
||||
|
||||
@ -69,13 +69,18 @@ if (ENABLE_QLMPI)
|
||||
endif()
|
||||
|
||||
if (ENABLE_UTI)
|
||||
link_directories("${CMAKE_CURRENT_BINARY_DIR}/lib/syscall_intercept")
|
||||
|
||||
add_library(mck_syscall_intercept SHARED syscall_intercept.c arch/${ARCH}/archdep_c.c)
|
||||
|
||||
# target name is defined by add_library(), not project() or add_subdirectory()
|
||||
add_dependencies(mck_syscall_intercept syscall_intercept_shared)
|
||||
if (${ARCH} STREQUAL "arm64")
|
||||
set_source_files_properties(syscall_intercept.c PROPERTIES COMPILE_FLAGS -mgeneral-regs-only)
|
||||
endif()
|
||||
target_link_libraries(mck_syscall_intercept ${LIBSYSCALL_INTERCEPT_LIBRARIES})
|
||||
target_include_directories(mck_syscall_intercept PRIVATE ${LIBSYSCALL_INTERCEPT_INCLUDE_DIRS})
|
||||
set_target_properties(mck_syscall_intercept PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
target_link_libraries(mck_syscall_intercept syscall_intercept)
|
||||
target_include_directories(mck_syscall_intercept PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib/syscall_intercept/include)
|
||||
set_target_properties(mck_syscall_intercept PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)
|
||||
|
||||
install(TARGETS mck_syscall_intercept
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
if (NOT LIBDWARF)
|
||||
add_subdirectory(libdwarf)
|
||||
endif()
|
||||
|
||||
if (ENABLE_UTI)
|
||||
if (${ARCH} STREQUAL "arm64")
|
||||
set(SYSCALL_INTERCEPT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/syscall_intercept/arch/aarch64" CACHE STRINGS "relative path to syscalL_intercept source directory")
|
||||
elseif (${ARCH} STREQUAL "x86_64")
|
||||
set(SYSCALL_INTERCEPT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/syscall_intercept" CACHE STRINGS "relative path to syscalL_intercept source directory")
|
||||
endif()
|
||||
|
||||
# change cmake options only in this directory
|
||||
SET(CMAKE_BUILD_TYPE Release CACHE STRING "release build" FORCE)
|
||||
SET(TREAT_WARNINGS_AS_ERRORS OFF CACHE BOOL "ignore warnings" FORCE)
|
||||
add_subdirectory(${SYSCALL_INTERCEPT_SOURCE_DIR} syscall_intercept)
|
||||
endif()
|
||||
|
||||
1
executer/user/lib/syscall_intercept
Submodule
1
executer/user/lib/syscall_intercept
Submodule
Submodule executer/user/lib/syscall_intercept added at 13e8ed10a0
@ -23,13 +23,13 @@ Summary: IHK/McKernel
|
||||
License: GPLv2
|
||||
Source0: mckernel-%{version}.tar.gz
|
||||
|
||||
Requires: systemd-libs numactl-libs libdwarf
|
||||
Requires: systemd-libs numactl-libs libdwarf capstone
|
||||
|
||||
# don't use kernel_module_package so that one rpm including .ko and binaries are created
|
||||
%if "%{?_host_cpu}" == "x86_64" && "%{?_target_cpu}" == "aarch64"
|
||||
%define cross_compile 1
|
||||
%else
|
||||
BuildRequires: systemd-devel numactl-devel binutils-devel kernel-devel libdwarf-devel
|
||||
BuildRequires: systemd-devel numactl-devel binutils-devel kernel-devel libdwarf-devel capstone-devel
|
||||
# Friendly reminder of the fact that kernel-rpm-macros is no longer included in kernel-devel
|
||||
%if 0%{?rhel} >= 8
|
||||
BuildRequires: redhat-rpm-config kernel-rpm-macros elfutils-libelf-devel
|
||||
@ -107,6 +107,10 @@ This package contains headers and libraries required for build apps using IHK/Mc
|
||||
%{_libdir}/libsched_yield.so.1.0.0
|
||||
%{_libdir}/libsched_yield.so
|
||||
%{_libdir}/libldump2mcdump.so
|
||||
%{_libdir}/libmck_syscall_intercept.so
|
||||
%{_libdir}/libsyscall_intercept.so.0.1.0
|
||||
%{_libdir}/libsyscall_intercept.so.0
|
||||
%{_libdir}/libsyscall_intercept.so
|
||||
%{_sysconfdir}/irqbalance_mck.in
|
||||
%{_mandir}/man1/mcreboot.1.gz
|
||||
%{_mandir}/man1/ihkconfig.1.gz
|
||||
@ -131,6 +135,9 @@ This package contains headers and libraries required for build apps using IHK/Mc
|
||||
%{_includedir}/ihk/ihk_monitor.h
|
||||
%{_includedir}/ihk/ihk_debug.h
|
||||
%{_includedir}/ihk/ihk_host_driver.h
|
||||
%{_includedir}/libsyscall_intercept_hook_point.h
|
||||
%{_libdir}/pkgconfig/libsyscall_intercept.pc
|
||||
%{_mandir}/man3/libsyscall_intercept.3
|
||||
/lib/modules/%{kernel_version}/extra/mckernel/ihk/linux/core/Module.symvers
|
||||
|
||||
# taken from /usr/lib/rpm/redhat/kmodtool (kernel_module_package)
|
||||
|
||||
Reference in New Issue
Block a user