免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123
最近访问板块 发新帖
楼主: titansword2000
打印 上一主题 下一主题

[系统管理] 求助:运行程序时出现内存不够,ulimit后仍然显示内存不够,该如何办 [复制链接]

论坛徽章:
0
21 [报告]
发表于 2013-03-02 19:45 |只看该作者
chenyx 发表于 2013-03-02 19:39
问题是你的内存使用量不大,应该是程序或者系统的限制.你们以前遇到过类似的问题没有


以前没遇到过的

论坛徽章:
34
亥猪
日期:2015-03-20 13:55:11戌狗
日期:2015-03-20 13:57:01酉鸡
日期:2015-03-20 14:03:56未羊
日期:2015-03-20 14:18:30子鼠
日期:2015-03-20 14:20:14丑牛
日期:2015-03-20 14:20:31辰龙
日期:2015-03-20 14:35:34巳蛇
日期:2015-03-20 14:35:56操作系统版块每日发帖之星
日期:2015-11-06 06:20:00操作系统版块每日发帖之星
日期:2015-11-08 06:20:00操作系统版块每日发帖之星
日期:2015-11-19 06:20:00黄金圣斗士
日期:2015-11-24 10:43:13
22 [报告]
发表于 2013-03-02 20:24 |只看该作者
used 这么点,哪提示不够了?先看看耗费到哪了吧

论坛徽章:
0
23 [报告]
发表于 2013-03-02 20:40 |只看该作者
vermouth 发表于 2013-03-02 20:24
used 这么点,哪提示不够了?先看看耗费到哪了吧


就是因为系统显示内存足够,但程序却不能成功分配足够的内存才感到疑惑啊。具体错误提示来自程序运行的日志文件,程序本身非正常退出。

论坛徽章:
0
24 [报告]
发表于 2013-03-04 11:47 |只看该作者
继续等待中...

论坛徽章:
0
25 [报告]
发表于 2013-03-04 11:48 |只看该作者
当使用ltrace进行跟踪时,在程序运行结束前出现如下的记录:


_mp_v(0x230d5924, 0xa1d5b43, 0, 12, 0x7192eeb0)  = 337
memcpy(0x5cddd3e0, "]", 1)                       = 0x5cddd3e0
memcpy(0x21850258, "]", 1)                       = 0x21850258
_mp_p(0x230d5924, 0xa12f92a, 0xbffe4678, 0x43f768, 56) = 352
malloc(352)                                      = 0x68da0a20
_mp_v(0x230d5924, 0xa12f92a, 0xbffe4678, 0x43f768, 56) = 0x68da0a20
_mp_p(0x230d5924, 0xa12f92a, 0xbffe4678, 0x43f768, 56) = 352
_mp_v(0x230d5924, 0xa12f92a, 0xbffe4678, 0x43f768, 56) = 0x68da0a20
_mp_p(0xaed1a60, 32768, 512, 512000, 0xbffe46a0) = 0xbffe49dc
__mth_i_kcmp(0x1819688, 0, 4, 0, 0xbffe46a0)     = 1
_mp_v(0xaed1a60, 0, 4, 0, 0xbffe46a0)            = 0x63d06fc8
_mp_p(0x230d5924, 0, 0, 0, 0)                    = 0x63d06fc8
free(0x63d06fc0)                                 = <void>
_mp_v(0x230d5924, 0, 0, 0, 0)                    = 0x44a84c
_mp_p(0x230d5924, 0x43f78c, 352, 0x218b1f60, 0xbffe466 = 0x18196a0
malloc(25292624)                                 = NULL
_mp_v(0x230d5924, 0x43f78c, 352, 0x218b1f60, 0xbffe466 = 0
_mp_bcs_stdio(0x230d5924, 0x43f78c, 352, 0x218b1f60, 0xbffe466 = 0
sprintf("ALLOCATE: 25269896 bytes request"..., "ALLOCATE: %lu bytes requested; n"..., 25269896) = 53
_mp_ecs_stdio(0xbffe45d4, 0xaed196e, 0x1819688, 0x218b1f60, 0xbffe466 = 53
sprintf("0: ALLOCATE: 25269896 bytes requ"..., "%d: %s\n", 0, "ALLOCATE: 25269896 bytes request"...) = 57
strlen("0: ALLOCATE: 25269896 bytes requ"...)    = 57
write(2, "0: ALLOCATE: 25269896 bytes requ"..., 570: ALLOCATE: 25269896 bytes requested; not enough memory
) = 57
__pgi_abort(1, 0, 0xbffe4578, 0xa1b1f39, 2 <unfinished ...>
+++ exited (status 127) +++
[liuc@127 4dvar]$
[liuc@127 4dvar]$

论坛徽章:
0
26 [报告]
发表于 2013-03-05 09:18 |只看该作者
这个程序本身有log么?我不是说ltrace的log!

论坛徽章:
0
27 [报告]
发表于 2013-03-05 12:09 |只看该作者
xuhainanjing 发表于 2013-03-05 09:18
这个程序本身有log么?我不是说ltrace的log!


程序本身也有log。我贴程序本身log的最后部分吧,如下:


====================================
.....................................
In dolph: TIME, W =  28.000000      0.2051719E-05
In dolph: TIME, W =  29.000000      0.5513138E-06
In dolph: TIME, W =  30.000000      0.9622389E-07
In dolph: SUM OF WEIGHTS W2 =     1.0000
INPUT LandUse = "USGS"
  LANDUSE TYPE = "USGS" FOUND           33  CATEGORIES            2  SEASONS WATER CATEGORY =            16  SNOW CATEGORY =            24
Timing for processing lateral boundary for domain        1:    0.03873 elapsed seconds
d01 2008-02-05_12:00:00 Push xtraj time_stamp:2008-02-05_12:00:00
WRF TILE   1 IS      1 IE     90 JS      1 JE     60
WRF NUMBER OF TILES =   1
Timing for main: time 2008-02-05_12:06:00 on domain   1:   16.59303 elapsed seconds
d01 2008-02-05_12:06:00 Push xtraj time_stamp:2008-02-05_12:06:00
Timing for main: time 2008-02-05_12:12:00 on domain   1:   12.43550 elapsed seconds
d01 2008-02-05_12:12:00 Push xtraj time_stamp:2008-02-05_12:12:00
Timing for main: time 2008-02-05_12:18:00 on domain   1:   12.57382 elapsed seconds
d01 2008-02-05_12:18:00 Push xtraj time_stamp:2008-02-05_12:18:00
Timing for main: time 2008-02-05_12:24:00 on domain   1:   12.62680 elapsed seconds
d01 2008-02-05_12:24:00 Push xtraj time_stamp:2008-02-05_12:24:00
Timing for main: time 2008-02-05_12:30:00 on domain   1:   12.53811 elapsed seconds
d01 2008-02-05_12:30:00 Push xtraj time_stamp:2008-02-05_12:30:00
Timing for main: time 2008-02-05_12:36:00 on domain   1:   16.96066 elapsed seconds
d01 2008-02-05_12:36:00 Push xtraj time_stamp:2008-02-05_12:36:00
Timing for main: time 2008-02-05_12:42:00 on domain   1:   12.55948 elapsed seconds
d01 2008-02-05_12:42:00 Push xtraj time_stamp:2008-02-05_12:42:00: ALLOCATE: 25269896 bytes requested; not enough memory
[liuc@127 4dvar]$


由其log可见,分配内存失败导致程序退出。

论坛徽章:
0
28 [报告]
发表于 2013-03-11 12:31 |只看该作者
有知道解决这问题的大拿吗

论坛徽章:
2
数据库技术版块每日发帖之星
日期:2015-08-03 06:20:00IT运维版块每日发帖之星
日期:2015-08-07 06:20:00
29 [报告]
发表于 2013-03-12 10:11 |只看该作者
我同意三楼
网上搜一下如何将一个文件作为swap使用
下面的命令可能有记不清的了 最好自己网上确认一下
ddif =/dev/zero of=xxx bs=1M count=自己定
mkswap xxx
swapon xxx
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP