modelon-community / Assimulo

Assimulo is a simulation package for solving ordinary differential equations.
https://jmodelica.org/assimulo/index.html
GNU Lesser General Public License v3.0
70 stars 17 forks source link

MPI error with Assimulo 3.5.1 #99

Closed jmrohwer closed 6 months ago

jmrohwer commented 6 months ago

I have compiled and installed Assimulo 3.5.1 on an Arch linux system using the command:

python setup.py install --sundials-home=/usr --blas-home=/usr/lib --lapack-home=/usr

This is in a fresh Python 3.11 (compiled from scratch) virtual environment. The module compiles without error.

Some of the examples fail with the following error:

➜ python cvode_basic.py               
*** The MPI_Comm_dup() function was called before MPI_INIT was invoked.
*** This is disallowed by the MPI standard.
*** Your MPI job will now abort.
[jr-xps13:342153] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!

Specifically, only the examples with cvode, ida and kinsol fail with this error. All other examples (dasp,3, dopri5, radau5, etc.) work as expected.

I did not specify any MPI options during the compile, but openmpi and python-mpi4py packages are installed on my system (although the latter is based on the system Python 3.12, and I compiled this in a virtual environment with Python 3.11).

Is this a bug or am I doing something wrong?

Versions

PeterMeisrimelModelon commented 6 months ago

Hi,

what numpy & Cython versions are you using?

This could be related to Sundials 7, possibly try with an older sundials version.

Since this is possibly related to Assimulo > 3.5, have you used Assimulo prior to 3.5 without issues?

/Peter

jmrohwer commented 6 months ago

I can compile and run Assimulo 3.4.3 without error (using cython 0.29 and against sundials 6.7.0).

PeterMeisrimelModelon commented 6 months ago

Can you try Assimulo 3.5.1 with sundials 6.7.0?

jmrohwer commented 6 months ago

Assimulo 3.5.1 with sundials 6.7.0 works perfectly :smiley: Same versions of cython and numpy as above.

PeterMeisrimelModelon commented 6 months ago

@jschueller Do you want to have a look at this, seems like there are still some issues with Sundials 7?

jschueller commented 6 months ago

sundials must be compiled without mpi support

jmrohwer commented 6 months ago

Okay, this was the distro provided version, I don't really need 7.0, so will stick with 6.7 as that works. Thanks for the help!