問題描述
mpiexec 拋出錯誤“mkstemp 失敗,沒有這樣的文件或目錄” (mpiexec throws error "mkstemp failed No such file or directory")
我已經為 Android 交叉編譯了 MPICH 並對其進行了配置。當我按如下方式生成單個進程時,它工作正常
$./mpiexec ‑n 1 ‑launcher=fork ./mpi_hello_world
Hello world from processor zero, rank 0 out of 1 processors
但是,如果參數“n”大於1,Android系統會響應以下錯誤:
$./mpiexec ‑n 2 ‑launcher=fork ./mpi_hello_world
Fatal error in MPI_Init: Other MPI error, error stack:
MPIR_Init_thread(474).................:
MPID_Init(190)........................: channel initialization failed
MPIDI_CH3_Init(89)....................:
MPID_nem_init(272)....................:
MPIDI_CH3I_Seg_commit(327)............:
MPIU_SHMW_Seg_create_and_attach(897)..:
MPIU_SHMW_Seg_create_attach_templ(610): mkstemp failed No such file or directory
可能是與在 android 上創建的臨時文件的名稱有關嗎?請幫忙。
參考解法
方法 1:
The problem is that on Android file system you do not have /tmp and /dev/shm directories, which are crutial for creating temp files for shared‑memory communication. Because of that, mkstemp() will fail. mkdir them while you are su, set up the permissions and ch3:nemesis will work.
(by Hemant Tiwari、cassini)