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

OpenMPI error in FunctionDT #9498

Closed
agiorla opened this issue Jul 14, 2017 · 5 comments
Closed

OpenMPI error in FunctionDT #9498

agiorla opened this issue Jul 14, 2017 · 5 comments
Labels
C: Framework Good first issue P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.

Comments

@agiorla
Copy link
Contributor

agiorla commented Jul 14, 2017

Description of the enhancement or error report

Creating a FunctionDT TimeStepper with time_t and time_dt inputs of different sizes causes an unexpected MPI communication error such as

application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1
:
system msg for write_line failure : Bad file descriptor

There should be a test in the constructor to check that time_t and time_dt have the same size (or where-ever that bugs occurs, I am not sure)

Rationale for the enhancement or information for reproducing the error

This would provide the user a clearer (and less scary) explanation of why his/her input file causes an error, and what to modify in its input file.

Identified impact

Changes to FunctionDT TimeStepper or one of its attributes (I am not sure where it happens).

@permcody
Copy link
Member

Have you run your input file through a debugger? Should be pretty easy to narrow this down. Also run in serial when you do that you and should get a line number. At the very a least an input file that we can use to reproduce would be helpful.

@agiorla
Copy link
Contributor Author

agiorla commented Jul 14, 2017

See below an input file that fails, at least on my workstation. I tried with different --n-threads and it gives me the same error.

Don't get me wrong, I know that there is an error in the input file and that Moose should stop. It would be just nicer if the error were caught by Moose error system instead of MPI ;)

`[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]

[Functions]
[./exact_fn]
type = ParsedFunction
value = tt(xx+yy)
[../]

[./forcing_fn]
type = ParsedFunction
value = 2t(xx+yy)-4tt
[../]
[]

[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]

[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]

[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]

[./diff]
type = Diffusion
variable = u
[../]

[./ffn]
type = UserForcingFunction
variable = u
function = forcing_fn
[../]
[]

[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]

[Executioner]
type = Transient

start_time = 0
end_time = 20
[./TimeStepper]
type = FunctionDT
time_t = '0 4 8 12'
time_dt = '1 2 4'
interpolate = false
[../]
[]

[Outputs]
exodus = true
[]`

@permcody
Copy link
Member

Well maybe... For one time checks and simple input validation errors, yes you should get a sensible error message. However, we also tend to use assertions if a check needs to happen in a hot spot to avoid the expensive of branching. We remove those assertions in the optimized binary for optimum speed. So we have a mix. We always recommend that developers check their inputs in debug mode first to see if at least we are catching a problem with an assert. It sounds like this case probably should be looked at. Thanks for the input file.

@permcody permcody added C: Framework Good first issue P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations. labels Jul 14, 2017
@friedmud
Copy link
Contributor

friedmud commented Jul 14, 2017 via email

@friedmud
Copy link
Contributor

friedmud commented Jul 14, 2017 via email

permcody added a commit to permcody/moose that referenced this issue Jul 17, 2017
jarons pushed a commit to jarons/moose that referenced this issue Oct 5, 2017
liuusu pushed a commit to liuusu/moose that referenced this issue Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework Good first issue P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.
Projects
None yet
Development

No branches or pull requests

3 participants