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:
parent
0db547ab4b
commit
7a6598f6dd
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user