看板 Python 關於我們 聯絡資訊
我在用numpy做大型矩陣乘法運算時, 發生程式crash的情況. 問google後找到 https://waage.sr.unh.edu/~braswell/blog/index.php/2008/03/ "I found that both Octave and Python/Scipy crash when trying to compute correlation matrix of an array that has ~10M elements or more." 不知各位高手有沒有碰過這個問題? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.124.122.22
yungyuc:version? 09/11 01:05
rexrainbow:NumPy 1.1.1 for Python 2.5 09/11 09:55
yungyuc:1.2 is on the way. 09/11 18:45
yungyuc:in the mean time, could you provide traceback here? 09/11 18:46
彈出一個視窗- """ xxx.exe xxx.exe發生問題, 必須關閉, 僅此致歉. 若您方才的工作尚未完成, 所使用的資訊可能會遺失. 請回報此問題給Microsoft .... """ 關掉就結束了, 除此之外沒有任何trace. 我用print, 抓到程式執行到矩陣相乘就斷了. 後來把矩陣切小, 就沒這個問題了. ※ 編輯: rexrainbow 來自: 59.124.122.22 (09/11 19:18)
yungyuc:我會說都是 Windows 的錯 :p 09/12 00:17
rexrainbow:我猜測是記憶體存取出問題(segmentation fault之類) 09/12 00:45
※ 編輯: rexrainbow 來自: 59.121.4.8 (09/12 00:49)
DreamerC:要不要試試看 IronPython + NumPy 09/12 21:58
rexrainbow:沒試過IronPython + NumPy, 不過如果numpy底層的c code 09/12 23:24
rexrainbow:一樣的話, 可能結果也一樣, 或許換到linux 09/12 23:25
yungyuc:numpy heavily relies on C extension 09/13 04:39
rexrainbow:程式執行出python(進入dll)後, python就管不到啦, 換 09/13 10:55
rexrainbow:os管 (應該是這樣吧?) 09/13 10:55
lion0208:樓上讓我想到寫的很多程式在linux跑都沒問題,可是換到 09/13 23:01
lion0208:windows都會常常出現segmentation fault..到底是我的程式 09/13 23:01
lion0208:問題還是windows的問題呢+_+ 09/13 23:02
rexrainbow:入境隨俗嘛~ 09/13 23:55