为什么使用mpirun运行并行程序时出现“权限被拒绝”错误

时间:2018-08-29 02:50:38

标签: c eclipse parallel-processing

我正在学习使用MPI和PTP进行并行编程,并且正在关注本教程:

how to use the eclipse parallel tools platform

一切顺利,直到我尝试以并行方式实际运行此示例。然后我得到这个错误:

[proxy:0:0@michel-Dell-System-XPS-L702X] HYDU_create_process (utils/launch/launch.c:74): execvp error on file /home/michel/parallel/workspace/firstc/Debug (Permission denied)

michel @ michel-Dell-System-XPS-L702X:〜$

当我从Eclipse(sudo ... eclipse)以及从终端运行它时会发生这种情况:

sudo /usr/bin/mpirun -n 2 -f /home/michel/mpi/myhosts2 /home/michel/parallel/workspace/firstc/Debug 

主机文件myhosts2包含以下内容:

michel@michel-Dell-System-XPS-L702X:~$ cat /home/michel/mpi/myhosts2

localhost:2

和`michel @ michel-Dell-System-XPS-L702X:〜$ ls -l / home / michel / mpi / myhosts2

-rw-rw-r-- 1 michel michel 12 Aug 29 14:29 /home/michel/mpi/myhosts2`

michel@michel-Dell-System-XPS-L702X:~$ ls -l /home/michel/parallel/workspace/firstc/Debug
total 72
-rwxrwxrwx 1 root root 56392 Aug 29 13:58 firstc
-rwxrwxrwx 1 root root   967 Aug 29 13:58 makefile
-rwxrwxrwx 1 root root   231 Aug 29 13:58 objects.mk
-rwxrwxrwx 1 root root   392 Aug 29 13:58 sources.mk
drwxrwxrwx 2 root root  4096 Aug 29 13:58 src

因此,我以sudo身份运行,任何人都有权执行任何操作,但该可执行文件firstc的权限被拒绝。但是,如果我从eclipse作为本地C / C ++应用程序运行它(因此不能并行运行),那么它将起作用:

Hello MPI World From process 0: Num processes: 1

怎么可能,我该怎么办?非常感谢您的帮助。

0 个答案:

没有答案