I wonder if there is any command to show the enabled features of an MVAPICH installation similar to the one that we can find for OpenMPI:
ompi_info
Especially, I am interested in knowing if multi-thread support is enabled.
I would recommend just running a simple test program like this:
#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);
}
On my Ubuntu laptop with standard 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
which agrees with 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)
but if I request MPI_THREAD_SERIALIZED
me@laptop$ mpiexec -n 2 ./threadcheck
Required level of threading support *is* available
Required level of threading support *is* available
Hope this is useful.
David