求助。linux系統 編譯器openmpi 語言fortran。
在子程式subroutine中,如下代碼
subroutine mpi_sum_z(f,i_root,myid,nsend,iall)
include 'mpif.h'
real recv_b(nsend), f(nsend) !nsend=256
因為出現double free or corruption的錯誤,并顯示這里有錯誤
利用gdb除錯,print陣列內容,f是256大小的陣列,recv_b卻好像無限大。步驟如下
(gdb) print f
$1 = (2.83542365e-14, 2.84252873e-14, 2.84072133e-14, 2.85789696e-14, 2.84969666e-14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...)
(gdb) print recv_b
$3 = ()
希望高人給予解答,謝謝!!!
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/90916.html
標籤:其他開發語言
上一篇:關于爬取雪球資料
下一篇:python求教
