Skip to content

Commit

Permalink
silence is golden
Browse files Browse the repository at this point in the history
  • Loading branch information
sumiya11 committed Nov 5, 2023
1 parent 88754c7 commit 6f864ff
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
17 changes: 8 additions & 9 deletions src/RationalFunctionFields/RationalFunctionField.jl
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ function generating_sets_fan(
time_start = time_ns()
vars = gens(parent(rff.mqs))
nbases = length(vars)
@info "Computing $nbases Groebner bases for block orderings. Simplification code is $code"
@info "Computing $nbases Groebner bases for degrees $up_to_degree for block orderings"
ordering_to_generators = Dict()
if code == 0
return ordering_to_generators
Expand Down Expand Up @@ -461,6 +461,7 @@ function generating_sets_fan(
end
end
_runtime_logger[:id_gbfan_time] = (time_ns() - time_start) / 1e9
@info "Computed Groebner bases in $((time_ns() - time_start) / 1e9) seconds"
return ordering_to_generators
end

Expand Down Expand Up @@ -493,7 +494,7 @@ function simplified_generating_set(
check_variables = false, # almost always slows down and thus turned off
rational_interpolator = :VanDerHoevenLecerf,
)
@info "Simplifying generating set"
@info "Simplifying generating set. Simplification level: $simplify"
_runtime_logger[:id_groebner_time] = 0.0
_runtime_logger[:id_calls_to_gb] = 0
_runtime_logger[:id_inclusion_check_mod_p] = 0.0
Expand Down Expand Up @@ -556,26 +557,24 @@ function simplified_generating_set(
for (ord, generators) in fan
append!(new_fracs, generators)
end

new_fracs_unique = unique(new_fracs)

@info """
@debug """
Final cleaning and simplification of generators.
Out of $(length(new_fracs)) fractions $(length(new_fracs_unique)) are syntactically unique."""
runtime =
@elapsed new_fracs = beautifuly_generators(RationalFunctionField(new_fracs_unique))
@info "Checking inclusion with probability $p"
@debug "Checking inclusion with probability $p"
runtime = @elapsed result = issubfield(rff, RationalFunctionField(new_fracs), p)
_runtime_logger[:id_inclusion_check] = runtime
@info "Inclusion checked in $(_runtime_logger[:id_inclusion_check]) seconds. Result: $result"
if !result
@warn "Field membership check failed. Error will follow."
throw("The new subfield generators are not correct.")
end
@info "Out of $(length(rff.mqs.nums_qq)) initial generators there are $(length(new_fracs)) indepdendent"
@info "Inclusion checked with probability $p in $(_runtime_logger[:id_inclusion_check]) seconds"
@debug "Out of $(length(rff.mqs.nums_qq)) initial generators there are $(length(new_fracs)) indepdendent"
ranking = generating_set_rank(new_fracs)
_runtime_logger[:id_ranking] = ranking
@info "The ranking of the new set of generators is $ranking"
@debug "The ranking of the new set of generators is $ranking"
return new_fracs
end

Expand Down
9 changes: 4 additions & 5 deletions src/RationalFunctionFields/normalforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,17 +295,16 @@ function linear_relations_between_normal_forms(
up_to_degree::Integer;
seed = 42,
) where {T}
time_start = time_ns()
mqs = IdealMQS(fractions_to_dennums(fracs))
ring = parent(mqs)
ring_param = ParamPunPam.parent_params(mqs)
xs_param = gens(ring_param)
nparams = nvars(ring_param)
finite_field = Nemo.GF(2^30 + 3)
ParamPunPam.reduce_mod_p!(mqs, finite_field)
@info """
Computing normal forms (probabilistic)
Variables ($nparams in total): $xs_param
Up to degree: $up_to_degree
@info "Computing normal forms of degree $up_to_degree in $nparams variables"
@debug """Variables ($nparams in total): $xs_param
Modulo: $finite_field"""
# We first compute relations between the normal forms of linear monomials.
# Then, we use this knowledge to drop out some monomials of higher degrees.
Expand Down Expand Up @@ -390,7 +389,6 @@ function linear_relations_between_normal_forms(
break
end
end
@info "Used specialization points: $iters"
union!(complete_intersection_relations_ff, relations_ff_1)
@debug "Reconstructing relations to rationals"
relations_qq = Vector{Generic.Frac{elem_type(ring_param)}}(
Expand All @@ -414,5 +412,6 @@ function linear_relations_between_normal_forms(
)
relations_qq[i] = relation_qq_param // one(relation_qq_param)
end
@info "Used $iters specializations in $((time_ns() - time_start) / 1e9) seconds, found $(length(complete_intersection_relations_ff)) relations"
relations_qq
end
6 changes: 3 additions & 3 deletions src/global_identifiability.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ function initial_identifiable_functions(
ioeq_time =
@elapsed io_equations = find_ioequations(ode; var_change_policy = var_change_policy)
@debug "Sizes: $(map(length, values(io_equations)))"
@info "Computed in $ioeq_time seconds" :ioeq_time ioeq_time
@info "Computed IO-equations in $ioeq_time seconds"
_runtime_logger[:ioeq_time] = ioeq_time

if isempty(ode.parameters)
@info "No parameters, so Wronskian computation is not needed"
else
@info "Computing Wronskians"
wrnsk_time = @elapsed wrnsk = wronskian(io_equations, ode)
@info "Computed in $wrnsk_time seconds" :wrnsk_time wrnsk_time
@info "Computed Wronskians in $wrnsk_time seconds"
_runtime_logger[:wrnsk_time] = wrnsk_time

dims = map(ncols, wrnsk)
Expand All @@ -109,7 +109,7 @@ function initial_identifiable_functions(
rank_times = @elapsed wranks = map(rank, wrnsk)
@debug "Dimensions of the Wronskians $dims"
@debug "Ranks of the Wronskians $wranks"
@info "Ranks of the Wronskians computed in $rank_times seconds" :rank_time rank_times
@info "Ranks of the Wronskians computed in $rank_times seconds"
_runtime_logger[:rank_time] = rank_times

if any([dim != rk + 1 for (dim, rk) in zip(dims, wranks)])
Expand Down

0 comments on commit 6f864ff

Please sign in to comment.