Mpi 使用aprun的进程放置--每个节点需要一个进程

Mpi 使用aprun的进程放置--每个节点需要一个进程,mpi,placement,cray,Mpi,Placement,Cray,我需要在Cray系统上的aprun下运行MPI代码。出于我不想深入讨论的原因,有人要求我运行它,以便没有节点有多个进程。我一直对aprun手册页感到困惑,我不确定我是否已经弄明白了这一点。如果我只有两个进程,这个命令能确保它们在不同的节点上运行吗?(假设一个节点上有32个核。) 如果有人感兴趣,我上面的命令行就可以了。我用代码测试了它: #include <mpi.h> #include <stdio.h>   int main(int argc, char **argv

我需要在Cray系统上的
aprun
下运行MPI代码。出于我不想深入讨论的原因,有人要求我运行它,以便没有节点有多个进程。我一直对
aprun
手册页感到困惑,我不确定我是否已经弄明白了这一点。如果我只有两个进程,这个命令能确保它们在不同的节点上运行吗?(假设一个节点上有32个核。)


如果有人感兴趣,我上面的命令行就可以了。我用代码测试了它:

#include <mpi.h>
#include <stdio.h>
 
int main(int argc, char **argv) {
char hname[80];
int length;
 
MPI_Init(&argc, &argv);
 
MPI_Get_processor_name(hname, &length);
printf("Hello world from %s\n", hname);
MPI_Finalize();

}
#包括
#包括
 
int main(int argc,字符**argv){
char hname[80];
整数长度;
 
MPI_Init(&argc,&argv);
 
MPI获取处理器名称(名称和长度);
printf(“来自%s\n的Hello world”,hname);
MPI_Finalize();
}
#include <mpi.h>
#include <stdio.h>
 
int main(int argc, char **argv) {
char hname[80];
int length;
 
MPI_Init(&argc, &argv);
 
MPI_Get_processor_name(hname, &length);
printf("Hello world from %s\n", hname);
MPI_Finalize();

}