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
66 stars 16 forks source link

MPI error with Assimulo 3.5.1 #99

Closed jmrohwer closed 1 month ago

jmrohwer commented 1 month 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 1 month 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 1 month ago

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

PeterMeisrimelModelon commented 1 month ago

Can you try Assimulo 3.5.1 with sundials 6.7.0?

jmrohwer commented 1 month ago

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

PeterMeisrimelModelon commented 1 month ago

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

jschueller commented 1 month ago

sundials must be compiled without mpi support

jmrohwer commented 1 month 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!