fusion-energy / cad_to_dagmc

Convert CAD geometry (STP files) or Cadquery assemblies to DAGMC h5m files
MIT License
24 stars 6 forks source link

my_model.export_dagmc_h5m_file() MPI error #103

Closed ParticleTruthSeeker closed 1 day ago

ParticleTruthSeeker commented 2 days ago

Hi this function causes the following error message:

Info    : Done meshing 2D (Wall 0.0325914s, CPU 0.186605s)
Info    : 1555 nodes 3259 elements
*** The MPI_Comm_rank() function was called after MPI_FINALIZE was invoked.
*** This is disallowed by the MPI standard.
*** Your MPI job will now abort.
[user:67752] Local abort after MPI_FINALIZE started completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!

any clues about what may be causing this ?

shimwell commented 2 days ago

Hi, we don't call mpi directly in this package but perhaps one of the dependencies does.

You could try commenting out this line https://github.com/fusion-energy/cad_to_dagmc/blob/47af923a46d849dfcda7efb51b444a42a116437c/src/cad_to_dagmc/core.py#L254

Let me know if it helps and if some we can make the run on all cores line optional

ParticleTruthSeeker commented 2 days ago

Hi, we don't call mpi directly in this package but perhaps one of the dependencies does.

You could try commenting out this line

https://github.com/fusion-energy/cad_to_dagmc/blob/47af923a46d849dfcda7efb51b444a42a116437c/src/cad_to_dagmc/core.py#L254

Let me know if it helps and if some we can make the run on all cores line optional

Thanks for the reply! I commented that line out but it doesn't solve the problem. https://stackoverflow.com/questions/31687583/mumps-the-mpi-comm-f2c-function-was-called-before-mpi-init-was-invoked

This suggests there is an mpi version clash in one of the dependencies. I am looking through the library symbols.

shimwell commented 2 days ago

it might be work trying the conda package in that case as I think it checks for compatibilities a bit more than pip

conda install -c conda-forge cad_to_dagmc
ParticleTruthSeeker commented 1 day ago

My apologies. I don't believe this has anything to do with cad-to-dagmc. There is either a bug in gmsh 4.14 mpi implementation or some other issue of the sort. Either way perhaps its best to remove this issue.

The problem is resolved by disabling MPI in my gmsh build.

shimwell commented 1 day ago

Thanks for letting me know. If anyone else comes across this issue in the future perhaps try a different version of gmsh