I have cross compiled MPICH for Android and configured it. It works fine when I spawn a single process as follows
$./mpiexec -n 1 -launcher=fork ./mpi_hello_world
Hello world from processor zero, rank 0 out of 1 processors
However the Android System responds with following error if parameter "n" is greater than 1 as follows :
$./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
It may be something related with name of temp file being created on android ? Please help.
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.