code-saturne / code_saturne

code_saturne public mirror
https://www.code-saturne.org
GNU General Public License v2.0
215 stars 80 forks source link

Mesh partitioning deadlock condition always on #115

Closed JulesL2 closed 1 year ago

JulesL2 commented 1 year ago

Hi, I have tried to use PT-Scotch to partition my mesh but even though it was installed as I got : External libraries: METIS PT-SCOTCH 7.0.3 in the listing, I could not manage to get Scotch to partition my mesh to reach around 50k cells per node (I have tried via the GUI and via the cs_user_partition function), it was always using Morton algorithm.

I jumped in the code and put some print to understand what was happening and it seems that the code always enters in this condition in base/cs_partition.c:

if (mesh->n_cells < cs_glob_n_ranks
      && (   _algorithm >= CS_PARTITION_SCOTCH
          && _algorithm < CS_PARTITION_BLOCK))

I print mesh->n_cells and found that it was 0 for my mesh even though my mesh has a few hundred thousand cells. When removing this check I can use scotch again. I attached a minimal reproducing example with 1 run (mesh is 12k cells to have a small zip file AND I put 2 MPI processes but phenomena appears on all mesh tested)

Partition.zip