Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Io 在fortran(gfortran)中使用超大数组_Io_Segmentation Fault_Fortran_Gfortran - Fatal编程技术网

Io 在fortran(gfortran)中使用超大数组

Io 在fortran(gfortran)中使用超大数组,io,segmentation-fault,fortran,gfortran,Io,Segmentation Fault,Fortran,Gfortran,我使用的是非常大的数组,所以在开始尝试编译时,由于堆栈大小,我会收到一条警告 警告是: 4 | integer, dimension(n,5) :: temp1 1 Warning: Array ‘temp1’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when call

我使用的是非常大的数组,所以在开始尝试编译时,由于堆栈大小,我会收到一条警告

警告是:

    4 | integer, dimension(n,5) :: temp1 
 1 Warning: Array ‘temp1’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage.
 This makes the procedure unsafe when called recursively, or concurrently from multiple threads.
 Consider using ‘-frecursive’, or increase the ‘-fmax-stack-var-size=’ limit, or c – ...

这就是代码(它可能有一些小错误,但我认为这不是问题所在,因为当我使用小数组时,它会正确运行):

这是txt的一部分:

dia mes ano hora min abs370 

 3  6 2016  0  5  30.4570   
 3  6 2016  0 10  27.5388   
 3  6 2016  0 15  23.1983   
 3  6 2016  0 20  22.3339   
 3  6 2016  0 25  22.0864   
 3  6 2016  0 30  20.9339   
 3  6 2016  0 35  21.8094   
 3  6 2016  0 40  21.3255   
 3  6 2016  0 45  22.1972   
 3  6 2016  0 50  21.2331   
 3  6 2016  0 55  21.6099   
 3  6 2016  1  0  20.4057 

TL;博士;:忽略或沉默警告,这是毫无意义的

此警告是gfortran 10的一项新功能。我发现这只是噪音。您的代码中没有任何一个Fortran过程。因此,不存在递归运行过程的风险,也不需要对堆栈执行任何操作(使用
ulimit
或其他任何工具)

基本上,它说阵列被放置到静态存储器中。那是记忆的固定部分。但是它是完全好的!主程序数据、模块数据、公共块数据或类似数据的静态存储没有问题

将数据放在静态存储器中可以使数据有效地
保存
。但是主程序数据是Fortran标准自动保存的


我认为主程序的警告是编译器缺陷。因此,我提交了一份bug报告:(在报告之前,我先检查了重复项,但没有发现任何重复项。)

我在代码中没有看到任何特别大的数组。此外,您不“附加”一个.txt在这里,您复制和粘贴的内容。至少有一部分。@VladimirF我如何在这里附加txt?“我是个乞丐,”弗拉基米尔说。谢谢,我编辑了。文件真的包含那些空行吗?
dia mes ano hora min abs370 

 3  6 2016  0  5  30.4570   
 3  6 2016  0 10  27.5388   
 3  6 2016  0 15  23.1983   
 3  6 2016  0 20  22.3339   
 3  6 2016  0 25  22.0864   
 3  6 2016  0 30  20.9339   
 3  6 2016  0 35  21.8094   
 3  6 2016  0 40  21.3255   
 3  6 2016  0 45  22.1972   
 3  6 2016  0 50  21.2331   
 3  6 2016  0 55  21.6099   
 3  6 2016  1  0  20.4057