[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Support hybrid MPI/OpenMP if available
From: |
Richard Guenther |
Subject: |
[PATCH] Support hybrid MPI/OpenMP if available |
Date: |
Wed, 7 Jan 2004 17:57:46 +0100 (CET) |
Hi!
This patch makes sure to correctly initialize MPI according to the
standard when using OpenMP.
Tested with mpich and Intel icpc where in fact, this mode is not supported
appearantly.
Ok?
Richard.
2004Jan07 Richard Guenther <address@hidden>
* src/Pooma/Pooma.cmpl.cpp: initialize MPI using MPI_Init_thread
if _OPENMP is defined, require at least MPI_THREAD_FUNNELED
support.
===== Pooma/Pooma.cmpl.cpp 1.6 vs edited =====
--- 1.6/r2/src/Pooma/Pooma.cmpl.cpp Wed Jan 7 12:23:35 2004
+++ edited/Pooma/Pooma.cmpl.cpp Wed Jan 7 17:54:30 2004
@@ -288,7 +288,13 @@
// the Cheetah options from the Options object.
#if POOMA_MPI
+# ifdef _OPENMP
+ int provided;
+ MPI_Init_thread(&argc, &argv, MPI_THREAD_FUNNELED, &provided);
+ PInsist(provided >= MPI_THREAD_FUNNELED, "No MPI support for OpenMP");
+# else
MPI_Init(&argc, &argv);
+# endif
#elif POOMA_CHEETAH
controller_g = new Cheetah::Controller(argc, argv);
#endif
- [PATCH] Support hybrid MPI/OpenMP if available,
Richard Guenther <=