pghysels / STRUMPACK

Structured Matrix Package (LBNL)
http://portal.nersc.gov/project/sparse/strumpack/
Other
167 stars 41 forks source link

error: # Geometric reordering only works on a simple 3 point wide stencil #47

Open ztdepztdep opened 3 years ago

ztdepztdep commented 3 years ago

I use STRUMPACK to solve the matrix system resulting from a spectral collocation method. and I got this error feedback. Could you please give me some suggestions.

ERROR: nested dissection went wrong, ierr=1
# ERROR: Geometric reordering failed. 
# Geometric reordering only works on a simple 3 point wide stencil
# on a regular grid and you need to provide the mesh sizes.
pghysels commented 3 years ago

Is your problem defined on a regular 1D, 2D or 3D mesh? If yes, then you need to specify the mesh dimensions, as in spss.reorder(n, n); // for a 2d mesh this needs to be called before you call factor. Or you can set nx and ny, and nz through the options object. You can also specify the number of components and the width of the separator (1 for a 3 point wide stencil). Make sure that the matrix is in the natural ordering, meaning i+jnx+knx*ny, with i,j,k the coordinates in the mesh.

If not then use a different ordering spss.options().set_reordering_method(ReorderingStrategy::METIS); or from the command line --sp_reordering_method metis

ztdepztdep commented 3 years ago

Thanks, I use 2d cartesian mesh, but in the spectral collocation method, the stencil is as large as the number of point in each direction. if my mesh is 20*20, then the width is 20. Could you please told me how to specify the width of the separator.

pghysels commented 3 years ago

I'm not familiar with the spectral collocation method. Sounds like if the stencil is 20 mesh points wide, and the mesh is only 20 wide, then everything is fully connected and you get a dense matrix. But clearly I'm missing something.

I'm thinking in terms of a simple finite difference stencil. For instance for a stencil that is 3 points wide in each dimension, the width of the separator is 1. If you have a 3D mesh, and remove a plane that is 1 mesh point thick, then the 2 subdomains are no longer connected. Likewise, for a stencil that is 5 points wide, the separator would have to be 2 wide.