Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A sanity check for the use of the boundary ID. #392

Closed
yslan opened this issue Nov 9, 2021 · 2 comments
Closed

A sanity check for the use of the boundary ID. #392

yslan opened this issue Nov 9, 2021 · 2 comments

Comments

@yslan
Copy link
Contributor

yslan commented Nov 9, 2021

Is your feature request related to a problem? Please describe.

By default, Nek5000 will set the variable boundaryID by the sideset id of the mesh
boundaryID(ifc,iel) = bc(5,ifc,iel,1)

NekRS, use boundaryID to map the boundary types from par file's boundaryTypeMap

If user forgets to zero out the boundaryID before the mapping, it will cause a MPI error that is hard figuring out the mapping is wrong.
For example, if there are more boundaryID values than the the boundaryTypeMap

  boundaryID(ifc,iel)=1, 2, ... 10
  boundaryTypeMap = t, t

Then, the code will give this error (on a CPU machine):

loading mesh from nek ... NboundaryIDs: 9, NboundaryFaces: 135132 done (0.00953882s)
generating mesh ... Nq: 6 cubNq: 8
computing geometric factors ... 
[node003:424520] *** An error occurred in MPI_Waitall
[node003:424520] *** reported by process [3245670401,83]
[node003:424520] *** on communicator MPI COMMUNICATOR 4 DUP FROM 3
[node003:424520] *** MPI_ERR_TRUNCATE: message truncated
[node003:424520] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
[node003:424520] ***    and potentially your MPI job)
[node001:454378] 1 more process has sent help message help-mpi-errors.txt / mpi_errors_are_fatal

It's users fault to set up a wrong boundary ID map.
However, it'd be nice, if it prints at least warning into the logfile instead of hitting the MPI errors.

Describe the solution you'd like
When boundaryTypeMap is used, we check whether the map from boundaryID to boundaryTypeMap are bijective.

This issue might be naturally resolved if #289 is implemented.

@stgeke
Copy link
Collaborator

stgeke commented Nov 11, 2021

We check for unmapped boundaryIDs already. Not sure why it doesn't work for you. Would you mind having a look?

MalachiTimothyPhillips added a commit to MalachiTimothyPhillips/nekRS that referenced this issue Jan 15, 2022
@stgeke
Copy link
Collaborator

stgeke commented May 13, 2022

Fixed in 9ae8872

@stgeke stgeke closed this as completed May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants