[mpich-discuss] MPI_THREAD_MULTIPLE

Jayesh Krishna jayesh at mcs.anl.gov
Mon Sep 21 11:04:17 CDT 2009


Hi,
 Are you launching your MPI job using the "-channel" option of mpiexec
(mpiexec -n 2 -channel nemesis thread_multiple_test.exe)? A simple MPI
program (see below) that queries for the thread level support returns
MPI_THREAD_MULTIPLE for me.
 
=========== Thread multiple test ===================
#include <iostream>

#include "mpi.h"

int main(int argc, char *argv[])

{

int provided;

provided = MPI::Init_thread(MPI_THREAD_MULTIPLE);

if(provided == MPI_THREAD_MULTIPLE){

std::cout << "Thread multiple supported" << std::endl;

}

else{

std::cout << "Thread multiple NOT supported" << std::endl;

}

MPI::Finalize();

}

=========== Thread multiple test ===================
 
Regards,
Jayesh

  _____  

From: mpich-discuss-bounces at mcs.anl.gov
[mailto:mpich-discuss-bounces at mcs.anl.gov] On Behalf Of Lubomir Radev
Sent: Sunday, September 20, 2009 7:23 PM
To: mpich-discuss at mcs.anl.gov
Subject: Re: [mpich-discuss] MPI_THREAD_MULTIPLE


Yes. I was using 1.0.8p1 originally, but after your suggestion got 1.1.1p1
and the problem persists.

I could reduce my code to a test case exhibiting the issue, but I need to
understand why MPI_Init_thread() won't provide me with MPI_THREAD_MULTIPLE
support and always returns MPI_THREAD_SINGLE regardless of the channel
configuration. I need to get that working first so my multi-threaded code
can assume it operates in a correctly initialized environment and can
legitimately call into MPICH2 simultaneously from more than one thread.

I'm using Boost.MPI wrapper (and Boost.Thread), but that shouldn't matter.

Thanks

  _____  

From: Jayesh Krishna <jayesh at mcs.anl.gov>
To: mpich-discuss at mcs.anl.gov
Sent: Friday, September 18, 2009 8:42:38 AM
Subject: Re: [mpich-discuss] MPI_THREAD_MULTIPLE



Hi,
 Are you trying the latest stable release, 1.1.1p1, of MPICH2
(http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=dow
nloads) ?
 Can you send us a test program ?

Regards,
Jayesh

-----Original Message-----
From: mpich-discuss-bounces at mcs.anl.gov
[mailto:mpich-discuss-bounces at mcs.anl.gov] On Behalf Of Lubomir Radev
Sent: Thursday, September 17, 2009 10:08 PM
To: mpich-discuss at mcs.anl.gov
Subject: [mpich-discuss] MPI_THREAD_MULTIPLE

Hey guys,

I need to call into the thread-safe version of MPICH2 so I tried to
initialize with MPI_Init_thread() and MPI_THREAD_MULTIPLE, but no matter
how I configured the channels on my nodes - tried both mt and nemesis -
that function returns MPI_THREAD_SINGLE as provided thread support.

I'm using 1.0.8p1 on Windows if that matters. Installed from the provided
MSI binary. Perhaps I need to build from sources, configuring it with
thread support?

Thanks


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20090921/b96ae2cf/attachment.htm>


More information about the mpich-discuss mailing list