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

Print error message upon periodic surface failure in exo2nek #761

Open
aprilnovak opened this issue Jun 6, 2022 · 0 comments
Open

Print error message upon periodic surface failure in exo2nek #761

aprilnovak opened this issue Jun 6, 2022 · 0 comments

Comments

@aprilnovak
Copy link
Contributor

When running exo2nek with periodic surfaces, the user is asked to enter the translation vector between the two surfaces. However, if the user makes a mistake entering this vector, exo2nek typically segfaults, like

 input translation vector (surface 1 -> surface 2)
0.0 0.0 22.91684

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7fdaf1942d21 in ???
#1  0x7fdaf1941ef5 in ???
#2  0x7fdaf162408f in ???
	at /build/glibc-SzIz7B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
#3  0x55e7fa6dde2c in ???
#4  0x55e7fa6e2fed in ???
#5  0x55e7fa6da5be in ???
#6  0x7fdaf1605082 in __libc_start_main
	at ../csu/libc-start.c:308
#7  0x55e7fa6da5fd in ???
#8  0xffffffffffffffff in ???
Segmentation fault (core dumped)

It would help to provide a useful error message to the user before exiting gracefully. Depending on the nature of the seg fault, this error message could be something along the lines of Failed to find periodic surface at vector 0.0 0.0 22.91684. Did you enter the translation vector correctly?

Alternatively, it'd be even better to deduce the translation vector automatically given the two sideset IDs (just a distance calculation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant