Hi Bruno,

 

I appreciated it very much for your responses.

 

The Matrices and Vectors are of TrilinosWrappers, the solvers should use 
MPI, too. I used the OpenMPI 1.8.1. The release date is Apr 22 2014, later 
than the post on the Github. I initialized the MPI as following

try

    {

     using namespace dealii;

     using namespace problem;

     Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv,

numbers::invalid_unsigned_int);

     Problem<2> app;

     app.infofile = argv[1];

     app.run ();

}

So, It seems this error is because I called two functions which use MPI 
during solving thermal diffusion and stokes flow equations.

 According to this post https://github.com/open-mpi/ompi/issues/1081

 “It turns out that if one tries to use Open MPI with MPI THREAD MULTIPLE 
(at least master) and actually has multiple threads making concurrent MPI 
calls, one gets a flood of messages of the following ilk:

opal_libevent2022_event_base_loop: reentrant invocation. Only one 
event_base_loop can run on each event_base at once.

showing up in stderr.

This needs to be fixed before release of v2.x”

I should update my OpenMPI to the latest version and such problem will be 
avoided and I do not need to change my code for initialization of MPI and 
TBB myself?

 

Thanks for your kind help!

 

Regards,


Jack

在 2017年5月19日星期五 UTC+8下午8:25:55,Bruno Turcksin写道:
>
> Jack,
>
> are your solvers using MPI?  This looks similar to this problem 
> https://github.com/open-mpi/ompi/issues/1081 Which version of MPI are you 
> using? How do you initialize MPI? MPI_InitFinalize set 
> MPI_THREAD_SERIALIZED which "tells MPI that 
> we might use several threads but never call two MPI functions at the same 
> time." This is not want you want if your solvers use MPI. Then you need to 
> initialize MPI and TBB yourself and use MPI THREAD MULTIPLE.
>
> Best,
>
> Bruno
>
> On Friday, May 19, 2017 at 3:52:39 AM UTC-4, Jack wrote:
>>
>> Dear all,
>>
>>  
>>
>> I’m trying to solve the thermal diffusion and Stokes flow problem 
>> simultaneously, similar to the step-32. I opened two threads to solve 
>> thermal diffusion and Stokes equations during solving by linear solvers 
>> (the former is solved by CG solver and the latter is solved by GMRES 
>> solver) after assembling the matrices and RHS. I encountered a problem when 
>> I using parallel computing in combination with distributed and shared 
>> memory.
>>
>>  The code is like following:
>>
>>
>> assemble_thermal_diffusion_system();
>>
>> assemble_stokes_flow_system ();
>>
>> Threads::Task<void> task =
>>
>> Threads::new_task (&Problem<dim>::solve_thermal_diffsuion, *this);
>>
>> solve_stokes_flow ();
>>
>> task.join();
>>
>>
>> The program ran successfully with single process and showed a high 
>> performance of thread parallel computing, unfortunately, when I ran the 
>> program using several processes I got following error. I have googled this 
>> error and can not find any solution. Could someone help me?
>>
>> Thanks in advance!
>>
>>  
>> [warn] opal_libevent2021_event_base_loop: reentrant invocation.  Only 
>> one event_base_loop can run on each event_base at once.
>>
>> [warn] opal_libevent2021_event_base_loop: reentrant invocation.  Only one 
>> event_base_loop can run on each event_base at once.
>>
>> [warn] opal_libevent2021_event_base_loop: reentrant invocation.  Only one 
>> event_base_loop can run on each event_base at once.
>>
>> [warn] opal_libevent2021_event_base_loop: reentrant invocation.  Only one 
>> event_base_loop can run on each event_base at once.
>>
>> [warn] opal_libevent2021_event_base_loop: reentrant invocation.  Only one 
>> event_base_loop can run on each event_base at once.
>>
>> [warn] opal_libevent2021_event_base_loop: reentrant invocation.  Only one 
>> event_base_loop can run on each event_base at once.
>>
>> [warn] opal_libevent2021_event_base_loop: reentrant invocation.  Only one 
>> event_base_loop can run on each event_base at once.
>>
>> [warn] opal_libevent2021_event_base_loop: reentrant invocation.  Only one 
>> event_base_loop can run on each event_base at once.
>>
>> [warn] opal_libevent2021_event_base_loop: reentrant invocation.  Only one 
>> event_base_loop can run on each event_base at once.
>>
>> [warn] opal_libevent2021_event_base_loop: reentrant invocation.  Only one 
>> event_base_loop can run on each event_base at once.
>>
>> [warn] opal_libevent2021_event_base_loop: reentrant invocation.  Only one 
>> event_base_loop can run on each event_base at once.
>>
>>
>> Thank you very much.
>>
>>  
>>
>> Best,
>>
>>  
>>
>> Jack
>>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to