freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Support hybrid MPI/OpenMP if available


From: Jeffrey D. Oldham
Subject: Re: [PATCH] Support hybrid MPI/OpenMP if available
Date: Thu, 08 Jan 2004 13:43:48 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Richard Guenther wrote:
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

OpenMP does not support MPI_init? I'd prefer to initialize OpenMP using the same mechanism as for MPI implementations.

Also, does finalization also need to change?

--
Jeffrey D. Oldham
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]