加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

Linux下fortran程序Segmentation fault错误

(2012-03-01 16:32:07)
标签:

杂谈

分类: 计算科学
今天在Linux下运行某个程序,总是遇到Segmentation fault错误。同样程序在自己的PC windows下运行正常,查看Linux机器,内存足够。Intel 官网上给的解决方案是:

On Linux*, the stack space can be increased using:
ulimit -s unlimited     for bash shell, or 
limit stacksize unlimited     for csh shell.

原因是初始分配的stack空间不足,将其设置为 unlimited即可。 

Linux: The size of "unlimited" varies by Linux configuration, so you may need to specify a larger, specific number to ulimit (for example, 999999999). On Linux also note that many 32bit Linux distributions ship with a pthread static library (libpthread.a) that at runtime will fix the stacksize to 2093056 bytes regardless of the ulimit setting. To avoid this problem do not link with the -static option or the -fast option. Instead of -fast, use options: -ipo -O3 -no-prec-div -xP . This only affects the 32bit Linux distributions and does not apply to the 64bit Linux distributions.

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有