[問題] mpi執行後的錯誤訊息

看板C_and_CPP作者 (羽嵐)時間15年前 (2010/12/10 00:33), 編輯推噓1(103)
留言4則, 3人參與, 最新討論串1/1
以下是我的程式碼 這是個程式是要用篩選的方式找出小於n的質數 我的程式一值執行到218行以前都是沒問題的 現在問題應該是在接收的地方 我要把1~p個processes找出來的質數傳到p0在存到檔案 可是每次一跑到這裡就會跳出錯誤訊息 如下 ----------------------------------------------------------------------------- One of the processes started by mpirun has exited with a nonzero exit code. This typically indicates that the process finished in error. If your process did not finish in error, be sure to include a "return 0" or "exit(0)" in your C code before exiting the application. PID 11714 failed on node n0 (192.168.0.101) due to signal 11. ----------------------------------------------------------------------------- 而且在n比較小的時候都不會發生 請教各位這事發生什麼事了? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.254.113.174

12/10 02:19, , 1F
signal 11 是 SIGSEGV = segmentation fault
12/10 02:19, 1F

12/10 02:19, , 2F
自己 trace 一下是哪裡出事吧
12/10 02:19, 2F

12/10 09:49, , 3F
建議先改成單機執行程式
12/10 09:49, 3F

12/10 10:30, , 4F
單機是完全沒有問題的 有問題的是傳送質數
12/10 10:30, 4F
※ 編輯: kuro44776 來自: 111.254.114.13 (12/10 15:45)
文章代碼(AID): #1D0GJZC3 (C_and_CPP)