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

Add warning for Julia version >= v1.11 #4109

Merged
merged 5 commits into from
Feb 21, 2025
Merged

Add warning for Julia version >= v1.11 #4109

merged 5 commits into from
Feb 21, 2025

Conversation

navidcy
Copy link
Collaborator

@navidcy navidcy commented Feb 18, 2025

until #3836 is resolved

cc @taimoorsohail

@navidcy navidcy added the package 📦 Quite meta label Feb 18, 2025
@simone-silvestri
Copy link
Collaborator

Not sure about this. If we allow the experimentation with julia 1.11 also from the user side, we can get bug reports more easily. I would probably just put a warning in the __init__() rather than flat-out not allowing julia 1.11.

@glwagner
Copy link
Member

Unfortunately we don't have a great system for development / having a dev branch, so this hard restriction, while desirable for users, will make it hard to test as @simone-silvestri said. We could merge this, tag, and then immediately change it back on main perhaps?

@navidcy
Copy link
Collaborator Author

navidcy commented Feb 18, 2025

Let's put a warning in the __init__()?
Something that gives out some information is good enough!

@glwagner
Copy link
Member

A warning is nice. You can ask users to report issues. The weird thing is that it works on Mac as far as I know. What issue did @taimoorsohail find?

@taimoorsohail
Copy link

taimoorsohail commented Feb 20, 2025

Hi @glwagner! Still getting set up with ClimaOcean (so some errors may just be due to my learning the language and workflow) but with Julia 1.11.0 I get some circular dependency warnings when trying to run the near_global_ocean_simulation.jl example, followed by an error related to one of said packages. This isn't the case when running on Julia 1.10.8

┌ Warning: Circular dependency detected. Precompilation will be skipped for:
│   Base.PkgId(Base.UUID("1285c0f1-ff9f-5867-b66e-0f359bcf09ba"), "SpecialFunctionsExt")
│   Base.PkgId(Base.UUID("06e1c1a7-607b-532d-9fad-de7d9aa2abac"), "TiledIteration")
│   Base.PkgId(Base.UUID("0d7ed370-da01-4f52-bd93-41d350b8b718"), "StaticArrayInterface")
│   Base.PkgId(Base.UUID("0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"), "GPUArrays")
│   Base.PkgId(Base.UUID("63c18a36-062a-441e-b654-da1e3ab1ce7c"), "KernelAbstractions")
│   Base.PkgId(Base.UUID("bdcacae8-1622-11e9-2a5c-532679323890"), "LoopVectorization")
│   Base.PkgId(Base.UUID("c2be9673-fb75-4747-82dc-aa2bb9f4aed0"), "OrthogonalSphericalShellGrids")
│   Base.PkgId(Base.UUID("f78586ac-ba87-5ec7-b3a5-84bc1b258ee3"), "ArrayInterfaceCUDAExt")
│   Base.PkgId(Base.UUID("476501e8-09a2-5ece-8869-fb82de89a1fa"), "SLEEFPirates")
│   Base.PkgId(Base.UUID("fb6a15b2-703c-40df-9091-08a04967cfa9"), "CloseOpenIntervals")
│   Base.PkgId(Base.UUID("0376089a-ecfe-4b0e-a64f-9c555d74d754"), "ClimaOcean")
│   Base.PkgId(Base.UUID("052768ef-5323-5732-b1bb-66c8b64840ba"), "CUDA")
│   Base.PkgId(Base.UUID("3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"), "VectorizationBase")
│   Base.PkgId(Base.UUID("85068d23-b5fb-53f1-8204-05c2aba6942f"), "SparseArraysExt")
│   Base.PkgId(Base.UUID("10f19ff3-798f-405d-979b-55457f8fc047"), "LayoutPointers")
│   Base.PkgId(Base.UUID("cbbf52aa-d660-55d4-8a5a-33845bbaa85d"), "StructArraysGPUArraysCoreExt")
│   Base.PkgId(Base.UUID("13011619-4c7c-5ef0-948f-5fc81565cd05"), "AtomixCUDAExt")
│   Base.PkgId(Base.UUID("11b7e2e0-d079-575b-885e-0ab22ef3252c"), "CUDAExt")
│   Base.PkgId(Base.UUID("787d08f9-d448-5407-9aad-5290dd7ab264"), "ImageMorphology")
│   Base.PkgId(Base.UUID("66d79d19-2cc4-5b0b-ac7a-b340256d1ecd"), "LinearAlgebraExt")
│   Base.PkgId(Base.UUID("499d2952-c3ce-5339-96ee-b197ee6daaa6"), "SpecialFunctionsExt")
│   Base.PkgId(Base.UUID("06b0261c-7a9b-5753-9bdf-fd6840237b4a"), "StaticArrayInterfaceStaticArraysExt")
│   Base.PkgId(Base.UUID("a8fab69c-de6f-5f74-aba3-bef19c2d033f"), "StaticArrayInterfaceOffsetArraysExt")
│   Base.PkgId(Base.UUID("b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"), "Thermodynamics")
│   Base.PkgId(Base.UUID("49b00bb7-8bd4-4f2b-b78c-51cd0450215f"), "SurfaceFluxes")
│   Base.PkgId(Base.UUID("9e8cae18-63c1-5223-a75c-80ca9d6e9a09"), "Oceananigans")
│   Base.PkgId(Base.UUID("6ba0ff68-24e6-4315-936c-2e99227c95a4"), "ClimaSeaIce")
└ @ Base.Precompilation precompilation.jl:556

 Error: Error during loading of extension AtomixCUDAExt of Atomix, use `Base.retry_load_extensions()` to retry.
│   exception =
│    1-element ExceptionStack:
│    Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.```

@glwagner
Copy link
Member

Hi @glwagner! Still getting set up with ClimaOcean (so some errors may just be due to my learning the language and workflow) but with Julia 1.11.0 I get some circular dependency warnings when trying to run the near_global_ocean_simulation.jl example, followed by an error related to one of said packages. This isn't the case when running on Julia 1.10.8

┌ Warning: Circular dependency detected. Precompilation will be skipped for:
│   Base.PkgId(Base.UUID("1285c0f1-ff9f-5867-b66e-0f359bcf09ba"), "SpecialFunctionsExt")
│   Base.PkgId(Base.UUID("06e1c1a7-607b-532d-9fad-de7d9aa2abac"), "TiledIteration")
│   Base.PkgId(Base.UUID("0d7ed370-da01-4f52-bd93-41d350b8b718"), "StaticArrayInterface")
│   Base.PkgId(Base.UUID("0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"), "GPUArrays")
│   Base.PkgId(Base.UUID("63c18a36-062a-441e-b654-da1e3ab1ce7c"), "KernelAbstractions")
│   Base.PkgId(Base.UUID("bdcacae8-1622-11e9-2a5c-532679323890"), "LoopVectorization")
│   Base.PkgId(Base.UUID("c2be9673-fb75-4747-82dc-aa2bb9f4aed0"), "OrthogonalSphericalShellGrids")
│   Base.PkgId(Base.UUID("f78586ac-ba87-5ec7-b3a5-84bc1b258ee3"), "ArrayInterfaceCUDAExt")
│   Base.PkgId(Base.UUID("476501e8-09a2-5ece-8869-fb82de89a1fa"), "SLEEFPirates")
│   Base.PkgId(Base.UUID("fb6a15b2-703c-40df-9091-08a04967cfa9"), "CloseOpenIntervals")
│   Base.PkgId(Base.UUID("0376089a-ecfe-4b0e-a64f-9c555d74d754"), "ClimaOcean")
│   Base.PkgId(Base.UUID("052768ef-5323-5732-b1bb-66c8b64840ba"), "CUDA")
│   Base.PkgId(Base.UUID("3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"), "VectorizationBase")
│   Base.PkgId(Base.UUID("85068d23-b5fb-53f1-8204-05c2aba6942f"), "SparseArraysExt")
│   Base.PkgId(Base.UUID("10f19ff3-798f-405d-979b-55457f8fc047"), "LayoutPointers")
│   Base.PkgId(Base.UUID("cbbf52aa-d660-55d4-8a5a-33845bbaa85d"), "StructArraysGPUArraysCoreExt")
│   Base.PkgId(Base.UUID("13011619-4c7c-5ef0-948f-5fc81565cd05"), "AtomixCUDAExt")
│   Base.PkgId(Base.UUID("11b7e2e0-d079-575b-885e-0ab22ef3252c"), "CUDAExt")
│   Base.PkgId(Base.UUID("787d08f9-d448-5407-9aad-5290dd7ab264"), "ImageMorphology")
│   Base.PkgId(Base.UUID("66d79d19-2cc4-5b0b-ac7a-b340256d1ecd"), "LinearAlgebraExt")
│   Base.PkgId(Base.UUID("499d2952-c3ce-5339-96ee-b197ee6daaa6"), "SpecialFunctionsExt")
│   Base.PkgId(Base.UUID("06b0261c-7a9b-5753-9bdf-fd6840237b4a"), "StaticArrayInterfaceStaticArraysExt")
│   Base.PkgId(Base.UUID("a8fab69c-de6f-5f74-aba3-bef19c2d033f"), "StaticArrayInterfaceOffsetArraysExt")
│   Base.PkgId(Base.UUID("b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"), "Thermodynamics")
│   Base.PkgId(Base.UUID("49b00bb7-8bd4-4f2b-b78c-51cd0450215f"), "SurfaceFluxes")
│   Base.PkgId(Base.UUID("9e8cae18-63c1-5223-a75c-80ca9d6e9a09"), "Oceananigans")
│   Base.PkgId(Base.UUID("6ba0ff68-24e6-4315-936c-2e99227c95a4"), "ClimaSeaIce")
└ @ Base.Precompilation precompilation.jl:556

 Error: Error during loading of extension AtomixCUDAExt of Atomix, use `Base.retry_load_extensions()` to retry.
│   exception =
│    1-element ExceptionStack:
│    Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.```

These errors on compilation are not necessarily a problem. The issue is that some simulations seem to blow up. That indicates there's a numerical difference which is concerning.

@giordano
Copy link
Contributor

giordano commented Feb 20, 2025

For the record, doing this means that users on Julia v1.11 would simply get older versions of Oceananigans. If you really want to disallow Oceananigans on 1.11 entirely you should submit a PR to General to do that, but those PRs are usually questioned a bit. But support for v1.11 would be really helpful for GB

@glwagner
Copy link
Member

For the record, doing this means that users on Julia v1.11 would simply get older versions of Oceananigans. If you really want to disallow Oceananigans on 1.11 entirely you should submit a PR to General to do that, but those PRs are usually questioned a bit. But support for v1.11 would be really helpful for GB

Oh yeah, that makes sense. So it doesn't actually solve the problem. A warning would be better. And best would be to actually address the issue.

@navidcy navidcy changed the title Restrict Julia version < v1.11 Add warning for Julia version >= v1.11 Feb 20, 2025
Co-authored-by: Gregory L. Wagner <[email protected]>
@navidcy navidcy requested a review from glwagner February 21, 2025 05:20
@navidcy
Copy link
Collaborator Author

navidcy commented Feb 21, 2025

Changed it from @info "Warning: You are using..." to @warn "You are using..."

$ julia --project 
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.3 (2025-01-21)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using Oceananigans
┌ Warning: You are using Julia v1.11 or later!"
│ Oceananigans is currently tested on Julia v1.10."
│ If you find issues with Julia v1.11 or later,"
│ please report at https://github.com/CliMA/Oceananigans.jl/issues/new
└ @ Oceananigans ~/.julia/packages/Oceananigans/2WYlH/src/Oceananigans.jl:118
[ Info: Oceananigans will use 12 threads

@navidcy navidcy merged commit b075494 into main Feb 21, 2025
50 checks passed
@navidcy navidcy deleted the ncc/julia-compat-entry branch February 21, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package 📦 Quite meta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants