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

incremental compilation error #275

Closed
navidcy opened this issue Jun 9, 2022 · 1 comment · Fixed by #276
Closed

incremental compilation error #275

navidcy opened this issue Jun 9, 2022 · 1 comment · Fixed by #276

Comments

@navidcy
Copy link
Collaborator

navidcy commented Jun 9, 2022

It turns out that

struct NormExceedsMedian{T}
minimum_relative_norm :: T
end
"""
NormExceedsMedian(minimum_relative_norm)
The particle failure condition. A particle is marked "failed" if the forward map norm is
larger than `minimum_relative_norm` times more than the median value of the ensemble.
By default `minimum_relative_norm = 1e9`.
"""
NormExceedsMedian(minimum_relative_norm = 1e9) =
minimum_relative_norm < 0 ? error("minimum_relative_norm must non-negative") :
NormExceedsMedian{typeof(minimum_relative_norm)}(minimum_relative_norm)

result in

WARNING: Method definition (::Type{ParameterEstimocean.EnsembleKalmanInversions.NormExceedsMedian{T} where T})(Any) in module EnsembleKalmanInversions at /home/runner/work/ParameterEstimocean.jl/ParameterEstimocean.jl/src/EnsembleKalmanInversions.jl:273 overwritten at /home/runner/work/ParameterEstimocean.jl/ParameterEstimocean.jl/src/EnsembleKalmanInversions.jl:283.
  ** incremental compilation may be fatally broken for this module **

I think inner constructor is the solution to this one.

@glwagner
Copy link
Member

glwagner commented Jun 9, 2022

Just change

 NormExceedsMedian(minimum_relative_norm = 1e9) =

to

 NormExceedsMedian() =

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

Successfully merging a pull request may close this issue.

2 participants