mpiexec 拋出錯誤“mkstemp 失敗,沒有這樣的文件或目錄” (mpiexec throws error "mkstemp failed No such file or directory")


問題描述

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 Tiwaricassini)

參考文件

  1. mpiexec throws error "mkstemp failed No such file or directory" (CC BY‑SA 2.5/3.0/4.0)

#mpi #mpich #Android #mkstemp #cross-platform






相關問題

MPI 在根進程上收集數組 (MPI gather array on root process)

如何為 xcode 安裝 Openmpi? (how to install Openmpi for xcode?)

在 ARM 上的 Linux 上運行 MPI (OpenMPI) 應用程序時出現問題 (Problems running MPI (OpenMPI) app on Linux on ARM)

在 C++ 和 MPI 中獨立並行寫入文件 (independent parallel writing into files in C++ and MPI)

傳輸一些數據後 MPI_Bcast 掛起 (MPI_Bcast hanging after some data transferred)

來自一個文件的多個 mpirun 與多個文件運行 (Multiple mpiruns from one file vs multiple file runs)

Isend/Irecv 不起作用,但 Send/Recv 可以 (Isend/Irecv doesn`t work but Send/Recv does)

MPI 要求在 localhost 上進行身份驗證 (MPI asks authentication on localhost)

MPI 生成和合併問題 (Issue with MPI spawn and merge)

mpiexec 拋出錯誤“mkstemp 失敗,沒有這樣的文件或目錄” (mpiexec throws error "mkstemp failed No such file or directory")

使用 MPI_Isend 時出現分段錯誤 (Segmentation Fault when using MPI_Isend)

MPI_Comm_split 不適用於 MPI_Bcast (MPI_Comm_split not working with MPI_Bcast)







留言討論