检查我的 MVAPICH 是否启用了多线程
Check if my MVAPICH has multi-threading enabled
我想知道是否有任何命令可以显示 MVAPICH 安装的启用功能,类似于我们可以为 OpenMPI 找到的功能:
ompi_info
特别是,我很想知道是否启用了多线程支持。
我只推荐 运行 一个像这样的简单测试程序:
#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
希望这有用。
大卫
我想知道是否有任何命令可以显示 MVAPICH 安装的启用功能,类似于我们可以为 OpenMPI 找到的功能:
ompi_info
特别是,我很想知道是否启用了多线程支持。
我只推荐 运行 一个像这样的简单测试程序:
#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
希望这有用。
大卫