我想知道是否有任何命令可以显示MVAPICH安装的启用功能,类似于我们可以为OpenMPI找到的功能:
ompi_info
特别是,我很想知道是否启用了多线程支持。
答案 0 :(得分:1)
我建议只运行这样一个简单的测试程序:
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
int main(void)
{
int lvlrequired, lvlprovided;
lvlrequired = MPI_THREAD_MULTIPLE;
MPI_Init_thread(NULL, NULL, lvlrequired, &lvlprovided);
if (lvlprovided < lvlrequired)
{
printf("Required level of threading support *not* available\n");
}
else
{
printf("Required level of threading support *is* available\n");
}
MPI_Finalize();
return(0);
}
在我的Ubuntu笔记本电脑上使用标准的OpenMPI:
me@laptop$ mpicc -o threadcheck threadcheck.c
me@laptop$ mpiexec -n 2 ./threadcheck
Required level of threading support *not* available
Required level of threading support *not* available
与ompi_info:
一致me@laptop$ ompi_info | grep THREAD_MULTIPLE
Thread support: posix (MPI_THREAD_MULTIPLE: no, OPAL support: yes, OMPI progress: no, ORTE progress: yes, Event lib: yes)
但如果我请求MPI_THREAD_SERIALIZED
me@laptop$ mpiexec -n 2 ./threadcheck
Required level of threading support *is* available
Required level of threading support *is* available
希望这很有用。
大卫