MPI_Query_thread
int MPI_Query_thread(int *);
Returns the current level of threads support.