mpi4py MPI terminates Yade

Asked by Jiadun Liu on 2019-05-03

Hi All,
I met the following probem.

jiadun@jiadun-HP-ZBook-15:~$ yade
Welcome to Yade 2019.01a
TCP python prompt on localhost:9000, auth cookie `ksyasu'
XMLRPC info provider on http://localhost:21000
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for showing help), F10 both, F9 generator, F8 plot. ]]

Yade [1]: from mpi4py import MPI
--------------------------------------------------------------------------
It looks like opal_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during opal_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):

  opal_error_register failed
  --> Returned value -2 instead of OPAL_SUCCESS
--------------------------------------------------------------------------
--------------------------------------------------------------------------
It looks like MPI_INIT failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during MPI_INIT; some of which are due to configuration or environment
problems. This failure appears to be an internal failure; here's some
additional information (which may only be relevant to an Open MPI
developer):

  ompi_mpi_init: opal_init_util failed
  --> Returned "(null)" (-2) instead of "Success" (0)
--------------------------------------------------------------------------
*** An error occurred in MPI_Init_thread
*** on a NULL communicator
*** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
*** and potentially your MPI job)
[jiadun-HP-ZBook-15:3988] Local abort before MPI_INIT completed successfully; not able to aggregate error messages, and not able to guarantee that all other processes were killed!
jiadun@jiadun-HP-ZBook-15:~$

Best regards,
Jiadun

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2019-05-03
Last reply:
2019-05-03
Deepak (deepak-kn1990) said : #1

Hello,

What happens when you try this :
from mpi4py import MPI
?

On Fri, May 3, 2019 at 5:03 PM Jiadun Liu <
<email address hidden>> wrote:

> Question #680609 on Yade changed:
> https://answers.launchpad.net/yade/+question/680609
>
> Description changed to:
> Hi All,
> I met the following probem.
>
> jiadun@jiadun-HP-ZBook-15:~$ yade
> Welcome to Yade 2019.01a
> TCP python prompt on localhost:9000, auth cookie `ksyasu'
> XMLRPC info provider on http://localhost:21000
> [[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key
> for showing help), F10 both, F9 generator, F8 plot. ]]
>
> Yade [1]: from mpi4py import MPI
> --------------------------------------------------------------------------
> It looks like opal_init failed for some reason; your parallel process is
> likely to abort. There are many reasons that a parallel process can
> fail during opal_init; some of which are due to configuration or
> environment problems. This failure appears to be an internal failure;
> here's some additional information (which may only be relevant to an
> Open MPI developer):
>
> opal_error_register failed
> --> Returned value -2 instead of OPAL_SUCCESS
> --------------------------------------------------------------------------
> --------------------------------------------------------------------------
> It looks like MPI_INIT failed for some reason; your parallel process is
> likely to abort. There are many reasons that a parallel process can
> fail during MPI_INIT; some of which are due to configuration or environment
> problems. This failure appears to be an internal failure; here's some
> additional information (which may only be relevant to an Open MPI
> developer):
>
> ompi_mpi_init: opal_init_util failed
> --> Returned "(null)" (-2) instead of "Success" (0)
> --------------------------------------------------------------------------
> *** An error occurred in MPI_Init_thread
> *** on a NULL communicator
> *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
> *** and potentially your MPI job)
> [jiadun-HP-ZBook-15:3988] Local abort before MPI_INIT completed
> successfully; not able to aggregate error messages, and not able to
> guarantee that all other processes were killed!
> jiadun@jiadun-HP-ZBook-15:~$
>
> Best regards,
> Jiadun
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Deepak (deepak-kn1990) said : #2

 I don't think it would work because, Yade has to be compiled with MPI
libraries. This can be done with the latest git version[1], with the
ENABLE_MPI option as shown here in [2]

[1]https://gitlab.com/yade-dev/trunk
[2]https://yade-dev.gitlab.io/trunk/FoamCoupling.html

On Fri, May 3, 2019 at 6:18 PM Deepak Kn <email address hidden> wrote:

> Hello,
>
> What happens when you try this :
> from mpi4py import MPI
> ?
>
> On Fri, May 3, 2019 at 5:03 PM Jiadun Liu <
> <email address hidden>> wrote:
>
>> Question #680609 on Yade changed:
>> https://answers.launchpad.net/yade/+question/680609
>>
>> Description changed to:
>> Hi All,
>> I met the following probem.
>>
>> jiadun@jiadun-HP-ZBook-15:~$ yade
>> Welcome to Yade 2019.01a
>> TCP python prompt on localhost:9000, auth cookie `ksyasu'
>> XMLRPC info provider on http://localhost:21000
>> [[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use
>> h-key for showing help), F10 both, F9 generator, F8 plot. ]]
>>
>> Yade [1]: from mpi4py import MPI
>> --------------------------------------------------------------------------
>> It looks like opal_init failed for some reason; your parallel process is
>> likely to abort. There are many reasons that a parallel process can
>> fail during opal_init; some of which are due to configuration or
>> environment problems. This failure appears to be an internal failure;
>> here's some additional information (which may only be relevant to an
>> Open MPI developer):
>>
>> opal_error_register failed
>> --> Returned value -2 instead of OPAL_SUCCESS
>> --------------------------------------------------------------------------
>> --------------------------------------------------------------------------
>> It looks like MPI_INIT failed for some reason; your parallel process is
>> likely to abort. There are many reasons that a parallel process can
>> fail during MPI_INIT; some of which are due to configuration or
>> environment
>> problems. This failure appears to be an internal failure; here's some
>> additional information (which may only be relevant to an Open MPI
>> developer):
>>
>> ompi_mpi_init: opal_init_util failed
>> --> Returned "(null)" (-2) instead of "Success" (0)
>> --------------------------------------------------------------------------
>> *** An error occurred in MPI_Init_thread
>> *** on a NULL communicator
>> *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
>> *** and potentially your MPI job)
>> [jiadun-HP-ZBook-15:3988] Local abort before MPI_INIT completed
>> successfully; not able to aggregate error messages, and not able to
>> guarantee that all other processes were killed!
>> jiadun@jiadun-HP-ZBook-15:~$
>>
>> Best regards,
>> Jiadun
>>
>> --
>> You received this question notification because your team yade-users is
>> an answer contact for Yade.
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~yade-users
>> Post to : <email address hidden>
>> Unsubscribe : https://launchpad.net/~yade-users
>> More help : https://help.launchpad.net/ListHelp
>>
>

I confirm #2, and I can reproduce the error with normal yade.
Yade needs to be linked to openmpi at compile time, else this error.

With normal yade it should still be possible to import both yade and mpi4py though:
:~/yade/builddailydebug$ yadedaily
Welcome to Yade 2018.02b-290bf6a54e~xenial
...
Yade [1]: from mpi4py import MPI
--------------------------------------------------------------------------
[...]
  opal_error_register failed
  --> Returned value -2 instead of OPAL_SUCCESS
--------------------------------------------------------------------------
:~/yade/builddailydebug$ ln -s yadedaily yadeimport.py
:~/yade/builddailydebug$ ipython
In [1]: import yadeimport as yade
In [2]: from mpi4py import MPI
In [3]:

Can you help with this problem?

Provide an answer of your own, or ask Jiadun Liu for more information if necessary.

To post a message you must log in.