Compare commits

...

4 Commits
1.7.2 ... 1.7.3

Author SHA1 Message Date
43a6f0d41d release: 1.7.3: fix missing fput executable
Change-Id: Ib369a7803d5ef944fec4c42c5e9b20f8655e47f3
2021-03-05 15:20:16 +09:00
c80ea0ed23 mcexec_open_exec: make fput and add to mckernel_exec_files atomic
Change-Id: Iff4ac8bb9b4ebfcb9c77e84ed3f0a40e6b9efb6a
2021-03-05 14:14:30 +09:00
73d028de77 docs: move uti installation / usage into install.rst / users.rst
Change-Id: Ie1fe1593bb957e5c5fb6085543ab647ec43fd8f6
2021-03-05 11:52:38 +09:00
d812e4dedb cmake: fix POSTK_DEBUG definitions (third trial)
Change-Id: I60341362b1e17acdb7c7f9ac8c036604aec89885
2021-03-05 11:16:43 +09:00
7 changed files with 100 additions and 113 deletions

View File

@ -7,7 +7,7 @@ endif (NOT CMAKE_BUILD_TYPE)
enable_language(C ASM)
project(mckernel C ASM)
set(MCKERNEL_VERSION "1.7.2")
set(MCKERNEL_VERSION "1.7.3")
# See "Fedora Packaging Guidelines -- Versioning"
set(MCKERNEL_RELEASE "")
@ -137,8 +137,7 @@ if (ENABLE_LINUX_WORK_IRQ_FOR_IKC)
endif()
if (BUILD_TARGET STREQUAL "smp-arm64")
execute_process(COMMAND bash -c "find -L ${CMAKE_CURRENT_SOURCE_DIR} -name \"*.[chS]\"|xargs -r grep -oE \"^#if.*def.*POSTK_DEBUG[^ ]*\" | cut -d':' -f2 | cut -d' ' -f2 | sort | uniq | awk '{print \"-D\"\$0 }' | xargs"
OUTPUT_VARIABLE POSTK_DEBUG_DEFINES OUTPUT_STRIP_TRAILING_WHITESPACE)
set(POSTK_DEBUG_DEFINES "-DPOSTK_DEBUG_ARCH_DEP_100 -DPOSTK_DEBUG_ARCH_DEP_42 -DPOSTK_DEBUG_TEMP_FIX_29 -DPOSTK_DEBUG_TEMP_FIX_49")
add_definitions("${POSTK_DEBUG_DEFINES}")
set(KBUILD_C_FLAGS "${KBUILD_C_FLAGS} ${POSTK_DEBUG_DEFINES}")

View File

@ -29,7 +29,7 @@ Install the following packages to the build machine:
::
cmake kernel-devel binutils-devel systemd-devel numactl-devel gcc make nasm git libdwarf-devel
cmake kernel-devel binutils-devel systemd-devel numactl-devel gcc make nasm git libdwarf-devel capstone-devel
When having access to repositories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -46,17 +46,48 @@ On CentOS 8, enable the PowerTools repository:
sudo dnf config-manager --set-enabled PowerTools
Enable EPEL repository:
::
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Install with yum:
::
sudo yum install cmake kernel-devel binutils-devel systemd-devel numactl-devel gcc make nasm git libdwarf-devel
sudo yum install cmake kernel-devel binutils-devel systemd-devel numactl-devel gcc make nasm git libdwarf-devel capstone-devel
When not having access to repositories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``libdwarf-devel``
""""""""""""""""""
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.
``capstone-devel``
""""""""""""""""""
A. Ask the system administrator to install ``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-devel
And then install it to your home directory:
::
cd $HOME/$(uname -p)
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
Clone, compile, install
--------------------------
@ -93,7 +124,12 @@ When not cross-compiling:
::
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ihk+mckernel ../mckernel
CMAKE_PREFIX_PATH=${HOME}/$(uname -p)/usr \
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ihk+mckernel \
-DENABLE_UTI=ON \
../mckernel
Note that ``CMAKE_PREFIX_PATH=${HOME}/$(uname -p)/usr`` is required only when ``capstone-devel`` is installed to your home directory.
When cross-compiling:
~~~~~~~~~~~~~~~~~~~~~
@ -105,10 +141,11 @@ When cross-compiling:
-DKERNEL_DIR=<kernnel_dir> \
-DBUILD_TARGET=smp-arm64 \
-DCMAKE_TOOLCHAIN_FILE=../mckernel/cmake/cross-aarch64.cmake \
-DENABLE_UTI=ON \
../mckernel
Install with cmake
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
Install with make:
@ -191,10 +228,10 @@ Install the following packages to the compute nodes:
::
systemd-libs numactl-libs libdwarf
systemd-libs numactl-libs libdwarf capstone
When having access to repositories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On RHEL 8, enable the CodeReady Linux Builder (CLB) repository:
@ -208,13 +245,42 @@ On CentOS 8, enable the PowerTools repository:
sudo dnf config-manager --set-enabled PowerTools
Enable EPEL repository:
::
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Install with yum:
::
sudo yum install systemd-libs numactl-libs libdwarf
sudo yum install systemd-libs numactl-libs libdwarf capstone
When not having access to repositories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``libdwarf``
""""""""""""
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.
``capstone``
""""""""""""
A. Ask the system administrator to install ``capstone``. 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
and then install it to your home directory:
::
cd $HOME/$(uname -p)
rpm2cpio capstone-4.0.1-9.el8.aarch64.rpm | cpio -idv

View File

@ -7,12 +7,10 @@ This document will explain how to operate system with McKernel.
Installation
============
See `Quick Guide -- Installation <quick.html#installation>`__.
.. include:: uti.rst
Follow `Quick Guide -- Installation <quick.html#installation>`__.
Boot and Shut-down
=========================
==================
Related files
-------------

View File

@ -55,11 +55,11 @@ You need to insert ``mcexec`` into the command lines invoking the programs that
Non-MPI programs
~~~~~~~~~~~~~~~~
Insert ``mcexec`` before an executable:
Insert ``mcexec`` before the command:
::
mcexec ./a.out
mcexec <command>
MPI programs
~~~~~~~~~~~~
@ -96,6 +96,19 @@ Fujitsu Technical Computing Suite.
#PJM --mpi "proc=32"
#PJM -L "node=8"
(Advanced) When using 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.
Add ``--enable-uti`` option to ``mcexec``:
::
mcexec --enable-uti <command>
Limitations
===========

View File

@ -1,94 +0,0 @@
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`` and ``capstone-devel``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When compute nodes don't have access to EPEL repository
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
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 capstone-devel
When compute nodes don't have access to 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 McKernel
~~~~~~~~~~~~~~~~~~~~
``cmake`` with the additional options:
::
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:
::
mcexec --enable-uti <command>
(Optional) Install UTI for Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
"""""""""""""""
.. code-block:: none
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
""""""""""""""
.. code-block:: none
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
(Optional) Install UTI for McKernel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can skip this step if you don't want to develop a run-time using UTI.
Execute the commands above for installing UTI for Linux, with ``--with-rm=linux`` replaced with ``--with-rm=mckernel``.

View File

@ -2001,26 +2001,31 @@ int mcexec_open_exec(ihk_os_t os, char * __user filename)
goto out_free;
}
/* fget and list_add should be atomic */
down(&mckernel_exec_file_lock);
file = open_exec(kfilename);
retval = PTR_ERR(file);
if (IS_ERR(file)) {
up(&mckernel_exec_file_lock);
goto out_free;
}
fullpath = d_path(&file->f_path, pathbuf, PATH_MAX);
if (IS_ERR(fullpath)) {
up(&mckernel_exec_file_lock);
retval = PTR_ERR(fullpath);
goto out_free;
goto out_put_file;
}
mcef = kmalloc(sizeof(*mcef), GFP_KERNEL);
if (!mcef) {
up(&mckernel_exec_file_lock);
retval = -ENOMEM;
goto out_put_file;
}
memset(mcef, 0, sizeof(struct mckernel_exec_file)); /* debug */
down(&mckernel_exec_file_lock);
/* Find previous file (if exists) and drop it */
list_for_each_entry(mcef_iter, &mckernel_exec_files, list) {
if (mcef_iter->os == os && mcef_iter->pid == task_tgid_vnr(current)) {

2
ihk

Submodule ihk updated: 1bc915de4e...17cd4c9656