整数和内存容量的块或变量定义
有谁知道这个问题, 我有一个可以很好地运行 3000 个元素网格的代码 但是当我想为 17000 个元素网格运行它时,它向我显示以下错误: 公共块或变量不得超过 2147483647 字节
这是代码的某些部分:
PARAMETER(NDIM=398316702)
integer IA(NDF+1),LPIVTC(NDF),JA(NDIM)
DIMENSION AA(NDIM)
它显示了错误
DIMENSION AA(NDIM)
Why is it in that way?
Does anyone have idea about this problem ,
I have a code that runs nicely for 3000 element mesh
But when I want to run it for 17000 element mesh it shows me this error:
A common block or variable may not exceed 2147483647 bytes
This is some parts of code:
PARAMETER(NDIM=398316702)
integer IA(NDF+1),LPIVTC(NDF),JA(NDIM)
DIMENSION AA(NDIM)
And it shows the error for
DIMENSION AA(NDIM)
Why is it in that way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是 Fortran 本身的特性,而是您特定的编译器或操作系统的特性。请注意,2147483647 = 2^31 - 1 或 2 千兆位。也许您有一个 32 位操作系统,它无法分配更大的内存。至于为什么不能得到完整的 2^32,可能是使用有符号整数而不是无符号整数来存储地址,并且有一位不可用。
This isn't a characteristic of Fortran per se, but rather your particular compiler or operating system. Note that 2147483647 = 2^31 - 1 or 2 gigabits. Probably you have a 32-bit OS and it is unable to allocate larger amounts of memory. As to why you can't get a full 2^32, perhaps something is using a signed rather than unsigned integer to store addresses and one bit is unavailable.