Skip to content
New issue

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

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

Already on GitHub? # to your account

update to Julia v1.7 #665

Merged
merged 10 commits into from
Jul 23, 2021
Merged

update to Julia v1.7 #665

merged 10 commits into from
Jul 23, 2021

Conversation

ranocha
Copy link
Member

@ranocha ranocha commented Jun 24, 2021

TODO

Details

Julia 1.6:

julia> redirect_std
redirect_stderr redirect_stdin   redirect_stdout
julia> redirect_std
redirect_stderr redirect_stdin   redirect_stdout
julia> redirect_stderr(devnull) do
           @info "@info"
           @warn "@warn"
       end
[ Info: @info
┌ Warning: @warn
└ @ Main REPL[1]:3

Julia 1.7:

julia> redirect_stderr(devnull) do
           @info "@info"
           @warn "@warn"
       end
[ Info: @info
42 of 2540 tests fail locally for me.
Test Summary:                                                                                      | Pass  Fail  Broken  Total
Trixi.jl tests                                                                                     | 3540    42       1   3583
  1D                                                                                               |  598     8            606
    Examples 1D                                                                                    |  530     4            534
      Linear scalar advection                                                                      |   15                   15
      Inviscid Burgers                                                                             |   10                   10
      Hyperbolic diffusion                                                                         |   14                   14
      Compressible Euler                                                                           |  149     4            153
        elixir_euler_source_terms.jl                                                               |    9                    9
        elixir_euler_convergence_pure_fv.jl                                                        |    9                    9
        elixir_euler_density_wave.jl                                                               |    9                    9
        elixir_euler_density_wave.jl with initial_condition_density_pulse                          |    9                    9
        elixir_euler_density_wave.jl with initial_condition_constant                               |    9                    9
        elixir_euler_source_terms_nonperiodic.jl                                                   |    9                    9
        elixir_euler_ec.jl                                                                         |    9                    9
        elixir_euler_ec.jl with flux_shima_etal                                                    |    8     1              9
        elixir_euler_ec.jl with flux_ranocha                                                       |    8     1              9
        elixir_euler_ec.jl with flux_hll                                                           |    8     1              9
        elixir_euler_shockcapturing.jl                                                             |    9                    9
        elixir_euler_sedov_blast_wave.jl                                                           |    9                    9
        elixir_euler_sedov_blast_wave_pure_fv.jl                                                   |    9                    9
        elixir_euler_sedov_blast_wave.jl with pressure                                             |    9                    9
        elixir_euler_sedov_blast_wave.jl with density                                              |    9                    9
        elixir_euler_positivity.jl                                                                 |    9                    9
        elixir_euler_blast_wave.jl                                                                 |    8     1              9
      Compressible Euler Multicomponent                                                            |   63                   63
      MHD                                                                                          |  152                  152
      MHD Multicomponent                                                                           |   90                   90
      Compressible Euler with self-gravity                                                         |    9                    9
      Curved Mesh                                                                                  |   28                   28
    Tests for initial conditions                                                                   |   16     4             20
      elixir_advection_extended.jl with initial_condition_sin                                      |    4     1              5
      elixir_advection_extended.jl with initial_condition_constant                                 |    4     1              5
      elixir_advection_extended.jl with initial_condition_linear_x                                 |    4     1              5
      elixir_advection_extended.jl with initial_condition_convergence_test                         |    4     1              5
    Displaying components 1D                                                                       |   45                   45
    Additional tests in 1D                                                                         |    6                    6
  2D-Part1                                                                                         |  478    30            508
    Examples 2D                                                                                    |  356    19            375
      Linear scalar advection                                                                      |   73     2             75
        elixir_advection_basic.jl                                                                  |    5                    5
        elixir_advection_extended.jl with polydeg=1                                                |    5                    5
        elixir_advection_restart.jl                                                                |    5                    5
        elixir_advection_mortar.jl                                                                 |    5                    5
        elixir_advection_amr.jl                                                                    |    5                    5
        elixir_advection_amr_nonperiodic.jl                                                        |    5                    5
        elixir_advection_amr_solution_independent.jl                                               |    5                    5
        elixir_advection_amr_visualization.jl                                                      |    5                    5
        elixir_advection_timeintegration.jl                                                        |    5                    5
        elixir_advection_timeintegration.jl with carpenter_kennedy_erk43                           |    5                    5
        elixir_advection_timeintegration.jl with carpenter_kennedy_erk43 with maxiters=1           |    4     1              5
        elixir_advection_timeintegration.jl with parsani_ketcheson_deconinck_erk94                 |    5                    5
        elixir_advection_timeintegration.jl with parsani_ketcheson_deconinck_erk32                 |    5                    5
        elixir_advection_timeintegration.jl with parsani_ketcheson_deconinck_erk32 with maxiters=1 |    4     1              5
        elixir_advection_callbacks.jl                                                              |    5                    5
      Hyperbolic diffusion                                                                         |   36                   36
      Compressible Euler                                                                           |  247    17            264
        elixir_euler_source_terms.jl                                                               |   11                   11
        elixir_euler_convergence_pure_fv.jl                                                        |   11                   11
        elixir_euler_density_wave.jl                                                               |   11                   11
        elixir_euler_source_terms_nonperiodic.jl                                                   |   11                   11
        elixir_euler_ec.jl                                                                         |   11                   11
        elixir_euler_shockcapturing.jl                                                             |   11                   11
        elixir_euler_blast_wave.jl                                                                 |   10     1             11
        elixir_euler_blast_wave_pure_fv.jl                                                         |   11                   11
        elixir_euler_blast_wave_amr.jl                                                             |   11                   11
        elixir_euler_sedov_blast_wave.jl                                                           |   11                   11
        elixir_euler_positivity.jl                                                                 |   11                   11
        elixir_euler_blob_mortar.jl                                                                |   11                   11
        elixir_euler_blob_amr.jl                                                                   |   11                   11
        elixir_euler_kelvin_helmholtz_instability.jl                                               |    3     8             11
        elixir_euler_kelvin_helmholtz_instability_amr.jl                                           |    3     8             11
        elixir_euler_vortex.jl                                                                     |   11                   11
        elixir_euler_vortex_mortar.jl                                                              |   11                   11
        elixir_euler_vortex_mortar_split.jl                                                        |   11                   11
        elixir_euler_vortex_mortar_split.jl with flux_central                                      |   11                   11
        elixir_euler_vortex_mortar_split.jl with flux_shima_etal                                   |   11                   11
        elixir_euler_vortex_mortar_split.jl with flux_ranocha                                      |   11                   11
        elixir_euler_vortex_shockcapturing.jl                                                      |   11                   11
        elixir_euler_vortex_mortar_shockcapturing.jl                                               |   11                   11
        elixir_euler_vortex_amr.jl                                                                 |   11                   11
    Tests for initial conditions                                                                   |   80    11             91
      elixir_advection_extended.jl with initial_condition_sin_sin                                  |    4     1              5
      elixir_advection_extended.jl with initial_condition_constant                                 |    4     1              5
      elixir_advection_extended.jl with initial_condition_linear_x_y                               |    4     1              5
      elixir_advection_extended.jl with initial_condition_linear_x                                 |    4     1              5
      elixir_advection_extended.jl with initial_condition_linear_y                                 |    4     1              5
      elixir_euler_vortex.jl one step with initial_condition_density_pulse                         |   10     1             11
      elixir_euler_vortex.jl one step with initial_condition_pressure_pulse                        |   10     1             11
      elixir_euler_vortex.jl one step with initial_condition_density_pressure_pulse                |   10     1             11
      elixir_euler_vortex.jl one step with initial_condition_constant                              |   10     1             11
      elixir_euler_sedov_blast_wave.jl one step                                                    |   10     1             11
      elixir_euler_sedov_blast_wave.jl one step with initial_condition_medium_sedov_blast_wave     |   10     1             11
    Displaying components 2D                                                                       |   41                   41
  2D-Part2                                                                                         |  473                  473
  2D-Part3                                                                                         |  531     1            532
    Examples 2D                                                                                    |  530     1            531
      Acoustic Perturbation                                                                        |   84     1             85
        elixir_ape_convergence.jl                                                                  |   17                   17
        elixir_ape_gauss.jl                                                                        |   17                   17
        elixir_ape_gaussian_source.jl                                                              |   17                   17
        elixir_ape_gauss_wall.jl                                                                   |   17                   17
        elixir_ape_monopole.jl                                                                     |   16     1             17
      Curved Mesh                                                                                  |  237                  237
      Unstructured Curve Mesh for Euler                                                            |  130                  130
      P4estMesh                                                                                    |   74                   74
      Linear scalar advection                                                                      |    5                    5
  3D-Part1                                                                                         |  375     2            377
    Examples 3D                                                                                    |  326     2            328
      Linear scalar advection                                                                      |   35                   35
      Hyperbolic diffusion                                                                         |   33                   33
      Compressible Euler                                                                           |  245     2            247
        elixir_euler_source_terms.jl                                                               |   13                   13
        elixir_euler_convergence_pure_fv.jl                                                        |   13                   13
        elixir_euler_source_terms.jl with split_form                                               |   13                   13
        elixir_euler_convergence.jl                                                                |   13                   13
        elixir_euler_mortar.jl                                                                     |   13                   13
        elixir_euler_amr.jl                                                                        |   13                   13
        elixir_euler_taylor_green_vortex.jl                                                        |   13                   13
        elixir_euler_shockcapturing.jl                                                             |   13                   13
        elixir_euler_shockcapturing.jl with initial_condition_sedov_blast_wave                     |   13                   13
        elixir_euler_shockcapturing.jl with initial_condition_sedov_self_gravity                   |   13                   13
        elixir_euler_shockcapturing_amr.jl                                                         |   12     1             13
        elixir_euler_density_pulse.jl                                                              |   13                   13
        elixir_euler_ec.jl                                                                         |   13                   13
        elixir_euler_ec.jl with initial_condition=initial_condition_constant                       |   13                   13
        elixir_euler_ec.jl with flux_chandrashekar                                                 |   13                   13
        elixir_euler_ec.jl with flux_kennedy_gruber                                                |   13                   13
        elixir_euler_ec.jl with flux_shima_etal                                                    |   13                   13
        elixir_euler_blob_amr.jl                                                                   |   13                   13
        elixir_euler_sedov_blast_wave.jl                                                           |   12     1             13
      Compressible Euler with self-gravity                                                         |   13                   13
    Displaying components 3D                                                                       |   41                   41
    Additional tests in 3D                                                                         |    7                    7
  3D-Part2                                                                                         |  460     1            461
    Examples 3D                                                                                    |  448     1            449
      MHD                                                                                          |  105                  105
      Lattice-Boltzmann                                                                            |  114                  114
      Curved mesh                                                                                  |  148                  148
      P4estMesh                                                                                    |   81     1             82
        elixir_advection_basic.jl                                                                  |    5                    5
        elixir_advection_unstructured_curved.jl                                                    |    5                    5
        elixir_advection_nonconforming.jl                                                          |    5                    5
        elixir_advection_amr.jl                                                                    |    5                    5
        elixir_advection_amr_unstructured_curved.jl                                                |    4     1              5
        elixir_advection_restart.jl                                                                |    5                    5
        elixir_euler_source_terms_nonperiodic.jl                                                   |   13                   13
        elixir_euler_free_stream.jl                                                                |   13                   13
        elixir_euler_free_stream_extruded.jl                                                       |   13                   13
        elixir_euler_ec.jl                                                                         |   13                   13
    Additional tests in 3D                                                                         |   11                   11
  Unit tests                                                                                       |  334                  334
  Special elixirs                                                                                  |   21             1     22
  Visualization tests                                                                              |  137                  137
  paper_self_gravitating_gas_dynamics                                                              |  129                  129
ERROR: LoadError: Some tests did not pass: 3540 passed, 42 failed, 0 errored, 1 broken.
in expression starting at /home/hendrik/.julia/dev/Trixi/test/runtests.jl:9
ERROR: Package Trixi errored during testing

P4est

CI:

ERROR: Unsatisfiable requirements detected for package libLLVM_jll [8f36deef]:
libLLVM_jll [8f36deef] log:
├─possible versions are: 12.0.0 or uninstalled
└─found to have no compatible versions left with Clang_jll [0ee61d77]
└─Clang_jll [0ee61d77] log:
├─possible versions are: 9.0.1-12.0.0 or uninstalled
└─restricted by compatibility requirements with CBindingGen [308a6e0c] to versions: 9.0.1-11.0.1
└─CBindingGen [308a6e0c] log:
├─possible versions are: 0.1.0-0.4.5 or uninstalled
└─restricted to versions 0.4 by an explicit requirement, leaving only versions 0.4.0-0.4.5

Thus, it looks like we have three options for P4est to use Julia v1.7.

  • Convince CBinding (v0.9) and CBindingGen to update their old versions with new compat bounds
  • Switch to CBinding v1.0 (might be difficult according to @sloede)
  • Get rid of CBinding and use Clang directly

@sloede
Copy link
Member

sloede commented Jun 24, 2021

Some features that might be interesting:

@ranocha
Copy link
Member Author

ranocha commented Jun 24, 2021

  • The default random number generator has changed, so all random numbers will be different (even with the same seed) unless an explicit RNG object is used. See the section on the Random standard library below (#40546).

This will probably require changes if the KHI test as discussed some months ago.

@sloede
Copy link
Member

sloede commented Jul 14, 2021

Just to be clear that I understand the urgency of this PR - and its attached TODOs - correctly:

Requiring Julia 1.7 for Trixi.jl in order to use some of the new features requires us to first fix P4est.jl such that it works with Julia 1.7 as well, which in turn requires us to tackle trixi-framework/P4est.jl#37?

@ranocha
Copy link
Member Author

ranocha commented Jul 14, 2021

Requiring Julia 1.7 for Trixi.jl in order to use some of the new features requires us to first fix P4est.jl such that it works with Julia 1.7 as well, which in turn requires us to tackle trixi-framework/P4est.jl#37?

Correct. Let's make the statement even a bit more clear: If anybody wants to use Trixi.jl and Julia v1.7 for whatever reason, we need to fix trixi-framework/P4est.jl#37. The usual reasons are

  • Julia v1.6 will not receive bug fixes if it's not declared as the new LTS.
  • People just want to use the new cool features.
  • We want to use new features in Trixi.jl.

@sloede
Copy link
Member

sloede commented Jul 14, 2021

OK, so this means this should be prioritized in order to fix everything before Julia 1.7 is released, which could be any time soon (likely after JuliaCon), since we are already into the 2nd or 3rd beta version...

I'll try to have a look starting tomorrow.

@ranocha
Copy link
Member Author

ranocha commented Jul 22, 2021

Do you have some place in kind where you would like to use this, @sloede?

@sloede
Copy link
Member

sloede commented Jul 22, 2021

No, I think the keyword here is might be interesting :-) I faintly recall that we used this vector[inds] style a lot in the early days of AMR and the SerialTree, but maybe this has all been fixed already.

@ranocha
Copy link
Member Author

ranocha commented Jul 22, 2021

Let's move the discussion of new features etc. to #731. I would like to get this ready, see whether tests pass on v1.7, revert the CI changes back to using Julia v1.6, and get merge this to be prepared for Julia v1.7.

@ranocha ranocha marked this pull request as ready for review July 23, 2021 05:12
@ranocha ranocha changed the title WIP: update to Julia v1.7 update to Julia v1.7 Jul 23, 2021
@ranocha ranocha requested a review from sloede July 23, 2021 05:12
@ranocha
Copy link
Member Author

ranocha commented Jul 23, 2021

This should enable passing tests on Julia v1.7. I reverted the change of the Julia version in CI so that we can merge this now to be prepared. We can revisit #731 later.

Copy link
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for preparing everything!

@ranocha ranocha closed this Jul 23, 2021
@ranocha ranocha reopened this Jul 23, 2021
@codecov
Copy link

codecov bot commented Jul 23, 2021

Codecov Report

Merging #665 (007adec) into main (39c01b8) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #665   +/-   ##
=======================================
  Coverage   93.67%   93.67%           
=======================================
  Files         172      172           
  Lines       16755    16755           
=======================================
  Hits        15694    15694           
  Misses       1061     1061           
Flag Coverage Δ
unittests 93.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
..._dgsem/elixir_advection_amr_unstructured_curved.jl 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39c01b8...007adec. Read the comment docs.

@ranocha ranocha enabled auto-merge (squash) July 23, 2021 07:00
@ranocha ranocha merged commit 2abc241 into main Jul 23, 2021
@ranocha ranocha deleted the hr/julia17 branch July 23, 2021 07:52
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants