termux / science-packages

Science packages for Termux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use of "orterun" from openmpi package triggers seccomp

opened this issue · comments

Problem description

$ orterun --help
Bad system call

Strace:

rt_tgsigqueueinfo(2019, 2019, SIGSYS, {si_signo=SIGSYS, si_code=SYS_SECCOMP, si_call_addr=0x7bdf96b240, si_syscall=__NR_shmget, si_arch=AUDIT_ARCH_AARCH64}) = 0

Seems like it tries to use shmget() from kernel which is not possible without root on Android. Maybe it should link with libandroid-shmem ?

LDFLAGS at

LDFLAGS+=" -landroid-shmem"

doesnt work as expected.

I see that libopen-rte.so and libopen-pal.so are linked with libandroid-shmem.so, but orterun is not. Android linker ignores libandroid-shmem for some reason.

Fixed in 5a6a6c4.

I can run orterun --help and can also compile MPI programs. However, executing them gives me Bad system call. Below is me trying to run a hello world test

~/runs/rookiehpc_test $ make
mpicc    -c -o hw.o hw.c
mpicc -O3 -m64 -Wall hw.o -L/data/data/com.termux/files/usr/lib -Wl,--enable-new-dtags -L/data/data/com.termux/files/usr/lib -lmpi -o a.out
rm hw.o
~/runs/rookiehpc_test $ ldd a.out
libmpi.so
libdl.so
libc.so
~/runs/rookiehpc_test $ ./a.out
Bad system call
~/runs/rookiehpc_test $ mpirun -np 4 ./a.out
mpirun: Forwarding signal 31 to job
mpirun: Forwarding signal 31 to job
mpirun: Forwarding signal 31 to job
mpirun: Forwarding signal 31 to job
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun noticed that process rank 3 with PID 0 on node localhost exited on signal 31 (Bad system call).
--------------------------------------------------------------------------

What's going on here? Any suggestions or insights would be greatly appreciated!