10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-09-27 03:51:01 +02:00

Adjust /proc/*/oom_adj

This commit is contained in:
Anthony Scemama 2018-11-20 14:38:13 +01:00
parent 8f89e3d239
commit 8da4aeefa1
2 changed files with 18 additions and 5 deletions

View File

@ -22,8 +22,8 @@ This script will create the :file:`quantum_package.rc` bash script, which
sets all the environment variables required for the normal operation of the
*Quantum Package*.
Running this script will also tell you which external dependencies need to be
installed.
Running this script will also tell you which external dependencies are missing
and need to be installed.
Then, source the :file:`quantum_package.rc` file in your current shell before
installing the dependencies.
@ -50,9 +50,10 @@ Requirements
- |Ninja| : a parallel build system
When all the dependencies have been installed, go into the config directory,
and copy the configuration file that corresponds to your architecture. Modify
it if needed, and run :command:`configure` with :option:`configure -c`.
When all the dependencies have been installed, go into the :file:`config`
directory, and copy the configuration file that corresponds to your
architecture. Modify it if needed, and run :command:`configure` with
:option:`configure -c`.
.. code:: bash

View File

@ -31,6 +31,18 @@ BEGIN_PROVIDER [ character*(128), ezfio_filename ]
call ezfio_set_file(ezfio_filename)
! Adjust out-of-memory killer flag such that the current process will be
! killed first by the OOM killer, allowing compute nodes to survive
integer, external :: getpid
integer :: pid
character*(64) :: command, pidc
pid = getpid()
write(pidc,*) pid
write(command,*) 'echo 15 > /proc//'//trim(adjustl(pidc))//'/oom_adj'
print '(A)', command
call system(command)
END_PROVIDER
BEGIN_PROVIDER [ character*(128), ezfio_work_dir ]