如何解决UPC运行时错误:共享内存不足

古杜

我正在尝试Berkeley UPC在具有64核心和256 GBRAM的计算机上运行代码但是,代码无法运行,因为找不到足够的内存。因为51 x 5 = 255 GB <256 GB

upcrun -n 51 -shared-heap=5GB xcorupc_sac inputpgas_sac{$rc1}.txt
..
UPCR: UPC thread  3 of 51 on range (pshm node 0 of 1, process  3 of 51, pid=191914)
UPCR: UPC thread 16 of 51 on range (pshm node 0 of 1, process 16 of 51, pid=191927)
UPC Runtime warning: Requested shared memory (5120 MB) > available (2515 MB) on node 0 (range): using 2515 MB per thread instead

UPC Runtime error: out of shared memory
  Local shared memory in use:  1594 MB per-thread,  81340 MB total
  Global shared memory in use:    0 MB per-thread,     1 MB total
  Total shared memory limit:   2515 MB per-thread,  128281 MB total
upc_alloc unable to service request from thread 0 for 1672245248 more bytes

NOTICE: Before reporting bugs, run with GASNET_BACKTRACE=1 in the environment to generate a backtrace. 
NOTICE: We recommend linking the debug version of GASNet to assist you in resolving this application issue.

我不明白,为什么Total shared memory limit128 GB这是物理内存的一半存在的全部的。即使使用shared-heap我明确要求5 GB每个线程使用的标志,我也不能超越它有什么建议 ?

cat /proc/meminfo 
MemTotal:       263378836 kB

UPC构建是使用标志编译的--with-sptr-packed-bits=20,9,35,每个标志最多允许2 ^ 35 = 32 GB的共享内存。

EDIT1:以下是命令的输出 upcc --version

[avinash@range jointinvsurf5_cajoint_compile]$ upcc --version
This is upcc (the Berkeley Unified Parallel C compiler), v. 2019.4.4
  (getting remote translator settings...)
----------------------+---------------------------------------------------------
 UPC Runtime          | v. 2019.4.4, built on Feb 11 2020 at 23:31:40
----------------------+---------------------------------------------------------
 UPC-to-C translator  | v. 2.28.0, built on Jul 19 2018 at 20:29:47
                      | host aphid linux-x86_64/64
                      | gcc v4.2.4 (Ubuntu 4.2.4-1ubuntu4)
----------------------+---------------------------------------------------------
 Translator location  | http://upc-translator.lbl.gov/upcc-2019.4.0.cgi
----------------------+---------------------------------------------------------
 networks supported   | smp udp mpi ibv
----------------------+---------------------------------------------------------
 default network      | ibv
----------------------+---------------------------------------------------------
 pthreads support     | available (if used, default is 2 pthreads per process)
----------------------+---------------------------------------------------------
 Configured with      | '--with-translator=http://upc-translator.lbl.gov/upcc-2
                      | 019.4.0.cgi' '--with-sptr-packed-bits=20,9,35'
                      | '--prefix=/usr/local/berkeley_upc/opt'
                      | '--with-multiconf-magic=opt'
----------------------+---------------------------------------------------------
 Configure features   | trans_bupc,pragma_upc_code,driver_upcc,runtime_upcr,
                      | gasnet,upc_collective,upc_io,upc_memcpy_async,
                      | upc_memcpy_vis,upc_ptradd,upc_thread_distance,upc_tick,
                      | upc_sem,upc_dump_shared,upc_trace_printf,
                      | upc_trace_mask,upc_local_to_shared,upc_all_free,
                      | upc_atomics,pupc,upc_types,upc_castable,upc_nb,nodebug,
                      | notrace,nostats,nodebugmalloc,nogasp,nothrille,
                      | segment_fast,os_linux,cpu_x86_64,cpu_64,cc_gnu,
                      | packedsptr,upc_io_64
----------------------+---------------------------------------------------------
 Configure id         | range Tue Feb 11 23:18:39 PST 2020 gnome-initial-setup
----------------------+---------------------------------------------------------
 Binary interface     | 64-bit x86_64-unknown-linux-gnu
----------------------+---------------------------------------------------------
 Runtime interface #  | Runtime supports 3.0 -> 3.13: Translator uses 3.6
----------------------+---------------------------------------------------------
                      |  --- BACKEND SETTINGS (for ibv network) ---
----------------------+---------------------------------------------------------
 C compiler           | /usr/bin/gcc
                      |   GNU/4.8.5/4.8.5 20150623 (Red Hat 4.8.5-39)
                      |   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) Copyright
                      |   (C) 2015 Free Software Foundation, Inc.
----------------------+---------------------------------------------------------
 C compiler flags     | -O3 --param max-inline-insns-single=35000 --param
                      | inline-unit-growth=10000 --param
                      | large-function-growth=200000 -Wno-unused
                      | -Wunused-result -Wno-unused-parameter -Wno-address
                      | -std=gnu99
----------------------+---------------------------------------------------------
 linker               | /data/seismo82/avinash/Programs/openmpiinstall/bin/mpic
                      | c
                      |   GNU/4.8.5/4.8.5 20150623 (Red Hat 4.8.5-39)
                      |   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) Copyright
                      |   (C) 2015 Free Software Foundation, Inc.
----------------------+---------------------------------------------------------
 linker flags         | -D_GNU_SOURCE=1 -O3 --param
                      | max-inline-insns-single=35000 --param
                      | inline-unit-growth=10000 --param
                      | large-function-growth=200000 -Wno-unused
                      | -Wunused-result -Wno-unused-parameter -Wno-address
                      | -std=gnu99 -L/data/seismo82/avinash/Programs/myupc/opt
                      | -L/data/seismo82/avinash/Programs/myupc/opt/umalloc
                      | -lupcr-ibv-seq -lumalloc
                      | -L/data/seismo82/avinash/Programs/myupc/opt/gasnet/ibv-
                      | conduit -lgasnet-ibv-seq -libverbs -lpthread -lrt
                      | -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -lgcc -lm
----------------------+---------------------------------------------------------

EDIT2:以下是df -h /dev/shm命令的输出

[avinash@range jointinvsurf5_cajoint_compile]$ df -h /dev/shm
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           126G   21M  126G   1% /dev/shm
和Bonachea

默认情况下,Berkeley UPC使用内核共享内存服务来交叉映射位于同一位置的进程之间的UPC共享段。对于smp-conduit,这是唯一的操作模式。

假设这是一个具有配置默认值的Linux系统,最可能的解释是内核提供的POSIX共享内存空间已用尽。您可以通过查看驻留的虚拟文件系统来确认这一点。这是来自配置为最多20G共享内存的系统的示例:

$df -h /dev/shm /var/shm /run/shm
df: '/var/shm': No such file or directory
df: '/run/shm': No such file or directory
Filesystem      Size  Used Avail Use% Mounted on
tmpfs            20G  504K   20G   1% /dev/shm

此值限制了每个节点共享内存段的总空间。该限制通常可以由管理员调整内核设置来提高,尽管详细信息随发行版而有所不同。

有关更多信息,请参阅https://gasnet.lbl.gov/dist-ex/README中的“ POSIX共享内存的系统设置”部分。

最后,请注意,即使解决了上述问题,在具有256 GB物理DRAM(99.6%)的系统上要求255 GB的共享内存堆也是不可取的。这为应用程序内存的非共享部分(堆栈,静态数据,malloc堆)以及内核和守护进程的内存开销留出了很少的空间。根据您的内核设置,这可能会触发内存不足的恐慌以开始终止进程​​。我们通常建议将物理内存的安全阈值限制为85%(假设系统否则处于空闲状态),并在此之后“谨慎行事”。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

新问题-运行时错误-内存不足

运行时错误7:内存不足并加速代码

如何修复 PyTorch 运行时错误:CUDA 错误:内存不足?

如何解决内存不足异常错误?

运行时:内存不足,还有静态内存

Perl:在运行时构建二维数组时出现内存不足错误

为什么以下golang程序会抛出运行时内存不足错误?

PyTorch 运行时错误:CUDA 内存不足。尝试分配 14.12 GiB

Eclipse 中 Java 运行时环境的内存不足

如何解决 codechef 中的 SIGEMT 运行时错误?

如何解决for循环中的Java运行时错误

如何解决 OJ 上的“运行时错误”

如何解决运行时错误:找不到graphframes

如何解决android studio运行时错误?

如何解决 Visual Studio 中的运行时错误

运行时出现错误,如何解决?

如何解决 GDI+ 中的通用错误和内存不足

如何解决内存不足(OOM)错误而不降低Android中的图像质量

训练基于BERT的模型会导致内存不足错误。我该如何解决?

我如何解决TensorFlow中的``gpu内存不足''

如何修复运行时错误'7'的内存不足,即使保存,关闭和重新启动计算机后,该错误仍然存在

Excel VBA Selenium打开本地网页运行时错误以及内存不足错误

没有分页文件运行时,如何抑制Vista Home Premium中的“内存不足”警告?

如何解决 J2ME 中的“应用程序因内存不足而意外退出”错误

内存不足错误未解决

内存不足错误需要解决

作为服务运行时内存不足的永久性空间

如何解决运行时错误“您必须提供layout_width属性。” 在android中?

如何解决Saving Princess Peach - Kattis Problem中的运行时错误?