openmpi: fix shmem patch
This commit is contained in:
parent
aaceda4c49
commit
12f131bb64
@ -1,8 +1,8 @@
|
|||||||
--- ./opal/mca/memory/patcher/memory_patcher_component.c 2017-05-10 17:41:36.000000000 +0200
|
--- ../openmpi-4.0.2/opal/mca/memory/patcher/memory_patcher_component.c 2019-10-07 20:20:48.000000000 +0200
|
||||||
+++ ../memory_patcher_component.c 2017-08-21 17:18:25.778728017 +0200
|
+++ ./opal/mca/memory/patcher/memory_patcher_component.c 2019-10-25 20:55:18.860358143 +0200
|
||||||
@@ -254,9 +254,9 @@
|
@@ -250,9 +250,9 @@
|
||||||
|
advice == MADV_FREE ||
|
||||||
if (advice == MADV_DONTNEED ||
|
#endif
|
||||||
#ifdef MADV_REMOVE
|
#ifdef MADV_REMOVE
|
||||||
- advice == MADV_REMOVE ||
|
- advice == MADV_REMOVE ||
|
||||||
+ advice == MADV_REMOVE
|
+ advice == MADV_REMOVE
|
||||||
@ -12,12 +12,14 @@
|
|||||||
{
|
{
|
||||||
opal_mem_hooks_release_hook (start, length, false);
|
opal_mem_hooks_release_hook (start, length, false);
|
||||||
}
|
}
|
||||||
@@ -342,7 +342,7 @@
|
@@ -432,8 +432,8 @@
|
||||||
|
uintptr_t attach_addr = (uintptr_t)shmaddr;
|
||||||
|
|
||||||
#include <stdio.h>
|
if (shmflg & SHM_RND) {
|
||||||
#include <fcntl.h>
|
- attach_addr -= ((uintptr_t)shmaddr) % SHMLBA;
|
||||||
-#include <sys/shm.h>
|
- size += ((uintptr_t)shmaddr) % SHMLBA;
|
||||||
+#include <linux/shm.h>
|
+ attach_addr -= ((uintptr_t)shmaddr) % sysconf(_SC_PAGESIZE);
|
||||||
|
+ size += ((uintptr_t)shmaddr) % sysconf(_SC_PAGESIZE);
|
||||||
static size_t memory_patcher_get_shm_seg_size (const void *shmaddr)
|
}
|
||||||
{
|
opal_mem_hooks_release_hook ((void*)attach_addr, size, false);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user