multithreaded mpi

This commit is contained in:
Joachim Schoeberl 2011-07-13 18:24:56 +00:00
parent 95726ff4a1
commit b00666b2da

View File

@ -63,7 +63,10 @@ int main(int argc, char ** argv)
{
#ifdef PARALLEL
MPI_Init(&argc, &argv);
int required = MPI_THREAD_MULTIPLE;
int provided;
MPI_Init_thread(&argc, &argv, required, &provided);
cout << "requ = " << required << ", provided = " << provided << endl;
MPI_Comm_size(MPI_COMM_WORLD, &netgen::ntasks);
MPI_Comm_rank(MPI_COMM_WORLD, &netgen::id);
#endif