Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <mpi.h>
- int main(int argc, char** argv)
- {
- // Initialise MPI process
- std::string threading[] = { "MPI_THREAD_SINGLE",
- "MPI_THREAD_FUNNELED",
- "MPI_THREAD_SERIALIZED",
- "MPI_THREAD_MULTIPLE"
- };
- int required = MPI_THREAD_MULTIPLE,
- provided;
- MPI_Init_thread(&argc, &argv, required, &provided);
- for (int t = 0; t < 4; ++t)
- std::cout << t << " : " << threading[t] << std::endl;
- std::cout << "Required : " << required << ", " << threading[required] << std::endl;
- std::cout << "Provided : " << provided << ", " << threading[provided] << std::endl;
- // Release MPI environment
- MPI_Finalize();
- return 0L;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement