10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-19 04:22:32 +01:00

Fix oom killer on MacOS

This commit is contained in:
Anthony Scemama 2023-04-18 12:33:27 +02:00
parent 0db547ab4b
commit 7a6598f6dd

View File

@ -31,6 +31,8 @@ BEGIN_PROVIDER [ character*(1024), ezfio_filename ]
call ezfio_set_file(ezfio_filename) call ezfio_set_file(ezfio_filename)
IRP_IF MACOS
IRP_ELSE
! Adjust out-of-memory killer flag such that the current process will be ! Adjust out-of-memory killer flag such that the current process will be
! killed first by the OOM killer, allowing compute nodes to survive ! killed first by the OOM killer, allowing compute nodes to survive
integer :: getpid integer :: getpid
@ -38,6 +40,7 @@ BEGIN_PROVIDER [ character*(1024), ezfio_filename ]
write(pidc,*) getpid() write(pidc,*) getpid()
write(command,*) 'echo 15 > /proc//'//trim(adjustl(pidc))//'/oom_adj' write(command,*) 'echo 15 > /proc//'//trim(adjustl(pidc))//'/oom_adj'
call system(command) call system(command)
IRP_ENDIF
PROVIDE file_lock PROVIDE file_lock