9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-10-04 07:05:58 +02: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)
IRP_IF MACOS
IRP_ELSE
! 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 :: getpid
@ -38,6 +40,7 @@ BEGIN_PROVIDER [ character*(1024), ezfio_filename ]
write(pidc,*) getpid()
write(command,*) 'echo 15 > /proc//'//trim(adjustl(pidc))//'/oom_adj'
call system(command)
IRP_ENDIF
PROVIDE file_lock