我正在使用mpiexec来运行两个hello world可执行文件。它们每个都运行,但进程数总是1,看起来应该有4个进程。有人明白为什么吗?我也不确定stty为什么给我一个无效的论点。谢谢!PBS集群上的MPI Hello World
这里是输出:
/bin/stty: standard input: invalid argument
Hello world from process 0 of 1
Hello world from process 0 of 1
Hello world from process 0 of 1
Hello world from process 0 of 1
这里是C文件:
#include <stdio.h>
#include <mpi.h>
int main(int argc, char *argv[])
{
int rank, size;
MPI_Init (&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
printf("Hello world from process %d of %d\n", rank, size);
fflush(stdout);
MPI_Finalize();
return 0;
}
这里提交脚本:
#!/bin/bash
#PBS -N helloWorld
#PBS -l select=4:ncpus=2
#PBS -j oe
#PBS -o output
#PBS -l walltime=3:00
cd $PBS_O_WORKDIR
mpiexec ./helloWorld
[MPI \ _Rank返回所有进程的相同进程号的可能重复](http://stackoverflow.com/questions/20287564/mpi-rank-return-same-process-number-for-all-process) – 2014-06-16 15:32:44