Boost logo

Boost-MPI :

Subject: Re: [Boost-mpi] openmpi 1.6.2 boost 1.54 mswin7 vs2010 Threading support:No
From: MM (finjulhich_at_[hidden])
Date: 2014-02-13 10:22:37


Apologies for the issue,

I was getting output from the 2 processes, and their threads, and I was
focused on only 1 process.

Please ignore,

On 13 February 2014 14:33, MM <finjulhich_at_[hidden]> wrote:

> Hello,
>
> I am running a MPI application on a single host, with a dual quadcore with
> hyperthreading on. (16 OS-visible processors), but just in debug mode
> (msvc2010) 32bit, with 2 mpi processes only.
>
> mpirun -mca btl_tcp_if_exclude lo -np 1 prog1.exe : -np 1 prog2.exe
>
> . when progr1.exe has 1 thread (mpi never initialized), everything works
> fine.
> . when progr2.exe has 2 threads (1 thread with no call to mpi functions,
> and a second thread where mpi is initialized, through a default ctor of
> boost::mpi::environment, I think thos means just a call to MPI_Initialize()
> ), ompi_info gives "Threading support: No"
>
> 1. I start prog1, create addition thread boost::thread that handles MPI
> calls.
> 2. proceed to a point where both thread1 and threadMPI, not concurrently,
> call a function f().
> f() initializes a global const std::string* X=null, to a static, this X is
> visible from both threads.
>
> In fact, it appears at a certain point during a boost::mpi::broadcast,
> within threadMPI, boost::mpi calls MPI_Isend (point_to_point.cpp: 53),
> during this Isend, a 3rd thread (not threadMPI) is created and causes a
> call to f() which doesn't see X as !=nullptr.
>
> I can see this while debugging with msvc, and stepping into MPI_Isend (i
> don't have the sources for it). At that moment, suddenly a new thread is
> created, and a call to f() is made.
>
> This all sounds quite nightmarish.
>
> I understand I haven't presented any specific code to receive an accurate
> answer, but any help is appreciated.
>
> Regards,
>
> MM
>



Boost-Commit list run by troyer at boostpro.com