MIT-AI-Accelerator / MagNav.jl

MagNav: airborne Magnetic anomaly Navigation
Other
101 stars 28 forks source link

Code problem #203

Closed ZhuMingJue1380 closed 1 year ago

ZhuMingJue1380 commented 1 year ago

I am new to the julia and can you tell me which jl files I need to run to get the program running, is common_setup.jl or something else?

gnadt commented 1 year ago

Assuming you have Julia & MagNav.jl downloaded, example_sgl.jl is a good starting point.

ZhuMingJue1380 commented 1 year ago

Assuming you have Julia & MagNav.jl downloaded, example_sgl.jl is a good starting point.↳

thanks, in fact, I try running exampple_sgl.jl so many times before,it reports an error every time: LoadError: The following package names could not be resolved:

gnadt commented 1 year ago

MagNav.jl can be downloaded any of the standard ways, HTTPS, SSH, or zip file. How are you running the file? An IDE?

ZhuMingJue1380 commented 1 year ago

MagNav.jl can be downloaded any of the standard ways, HTTPS, SSH, or zip file. How are you running the file? An IDE?↳

I use Visual Studio Code to add julia plug-in to run the file, julia plug-in version is the latest, may I ask what software do you use to run julia program.

gnadt commented 1 year ago

We use VS Code as well. What version of Julia is installed?

ZhuMingJue1380 commented 1 year ago

We use VS Code as well. What version of Julia is installed?↳

The julia plug-in version for VS Code is is v1.47.2. I also downloaded version 1.6.7 from the julia website. I wonder if the julia version under the official website should be the same as the julia plug-in of VSCode. Like you mention in the README.md, "The package has been tested on the long-term support (LTS) and latest stable versions of Julia", will this have a bad effect on running the program

gnadt commented 1 year ago

It should work fine with Julia v1.6.7. In VS Code, you are opening the downloaded MagNav.jl folder, then running the example_sgl.jl file?

ZhuMingJue1380 commented 1 year ago

I just open example_sgl.jl file and click top-right button "Julia:Execute active File in REPL" and then display the code at the terminal.

cdbc4cf62ff4b0e9bb91a470d2b14a4

gnadt commented 1 year ago

The line Pkg.add("MagNav") is not in example_sgl.jl, as it should not be used, since MagNav.jl is not in the registry. What is the output immediately after running example_sgl.jl?

ZhuMingJue1380 commented 1 year ago

the immediately output is: Updating registry at C:\Users\Administrator\.julia\registries\General Updating git-repo https://github.com/JuliaRegistries/General.git ┌ Warning: Some registries failed to update: │ — C:\Users\Administrator.julia\registries\General — failed to fetch from repo: failed to fetch from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:OS, failed to send request: 操作超时 │ ) └ @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1246 ERROR: LoadError: The following package names could not be resolved:

Stacktrace: [1] pkgerror(msg::String) @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55 [2] ensure_resolved(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; registry::Bool) @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:883 [3] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}}) @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:193 [4] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:80 [5] add(pkgs::Vector{Pkg.Types.PackageSpec}) @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:78 [6] #add#23 @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:76 [inlined] [7] add @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:76 [inlined] [8] #add#22 @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:75 [inlined] [9] add(pkg::String) @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:75 [10] top-level scope @ d:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\runs\common_setup.jl:2 in expression starting at d:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\runs\common_setup.jl:2

gnadt commented 1 year ago

It may be a proxy issue, unrelated to the MagNav package specifically. What happens when you try to install another package, such as import Pkg; Pkg.add("Plots")?

ZhuMingJue1380 commented 1 year ago

image image

gnadt commented 1 year ago

What does import Pkg; Pkg.precompile() show?

ZhuMingJue1380 commented 1 year ago

the output is: image image image image image image image image image image image image image image image

gnadt commented 1 year ago

It looks to be an issue with CUDA/Flux. What OS are you using? It should work with Julia v1.6.7, but are you able to install the latest release (Julia v1.9.2) to test?

ZhuMingJue1380 commented 1 year ago

My OS is win 10. i download the v1.9.2. this is the setting: image the output after i run example_sgl.jl: image

ZhuMingJue1380 commented 1 year ago

This is my CUDA version: image

ZhuMingJue1380 commented 1 year ago

which folder should i choose as the Julia env: image or image

gnadt commented 1 year ago

The second option, i.e., the one that contains Project.toml, which sets up the Julia environment. Had you been doing that?

ZhuMingJue1380 commented 1 year ago

I use the second as environment all the time. But the bugs mentioned above still appear.

ZhuMingJue1380 commented 1 year ago

Could you help me solve the output error of example_sgl.jl? The details have been shown above.

gnadt commented 1 year ago

I don't believe there are any actual bugs, instead the MagNav package environment isn't being used. Try opening that folder (D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master) in VS Code, which can be verified by entering pwd() in the REPL - screenshot output. Then enter import Pkg; Pkg.activate(".") - screenshot output, then enter using MagNav - screenshot output.

ZhuMingJue1380 commented 1 year ago

the output of pwd(): image the output of Pkg.activate(".") image the output of using MagNav: image

gnadt commented 1 year ago

Can you please do that again starting from the correct folder? (D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master) Just open that folder in VS Code (File > Open Folder...), then repeat the same steps.

ZhuMingJue1380 commented 1 year ago

my bad. the output: image image image image image image

gnadt commented 1 year ago

This is definitely not a MagNav package issue, but as a first step, can you check if cublas64_11.dll exists in the shown location? What is in the C:\Users\Administrator.julia\artifacts\22c03bf198204cc536cb4477e16d5ffd4455391f\bin folder?

ZhuMingJue1380 commented 1 year ago

image the folder you mentioned is empty, there is nothing in it, not even the bin folder

gnadt commented 1 year ago

This may be a known issue that was at least partially solved. Again, this is not a MagNav package issue, but we can see if there is an easy fix before having you opening an issue elsewhere. As before, open the project folder (D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master) in VS Code. Please copy/paste the output of versioninfo() and import Pkg; Pkg.status()

ZhuMingJue1380 commented 1 year ago

the output is: image image image

gnadt commented 1 year ago

I think it would be easier to use if you copy/paste instead of screenshot next time. That all looks normal, except JULIA_NUM_THREADS, unclear why that is empty. What is the output of using CUDA (likely an error message) and then CUDA.runtime_version()?

ZhuMingJue1380 commented 1 year ago

the output of using CUDA is: julia> using CUDA [ Info: Precompiling CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] ERROR: LoadError: InitError: could not load library "C:\Users\Administrator.julia\artifacts\22c03bf198204cc536cb4477e16d5ffd4455391f\bin\cublas64_11.dll" The specified module could not be found. Stacktrace: [1] dlopen(s::String, flags::UInt32; throw_error::Bool) @ Base.Libc.Libdl .\libdl.jl:117 [2] dlopen(s::String, flags::UInt32) @ Base.Libc.Libdl .\libdl.jl:116 [3] macro expansion @ C:\Users\Administrator.julia\packages\JLLWrappers\QpMQW\src\products\library_generators.jl:54 [inlined] [4] init() @ CUDA_Runtime_jll C:\Users\Administrator.julia\packages\CUDA_Runtime_jll\kaNVq\src\wrappers\x86_64-w64-mingw32-cuda+11.8.jl:28 [5] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
@ Base .\loading.jl:1115 [6] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}) @ Base .\loading.jl:1061 [7] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128) @ Base .\loading.jl:1506 [8] _require(pkg::Base.PkgId, env::String) @ Base .\loading.jl:1783 [9] _require_prelocked(uuidkey::Base.PkgId, env::String) @ Base .\loading.jl:1660 [10] macro expansion @ .\loading.jl:1648 [inlined] [11] macro expansion @ .\lock.jl:267 [inlined] [12] require(into::Module, mod::Symbol) @ Base .\loading.jl:1611 [13] include @ .\Base.jl:457 [inlined] [14] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing) @ Base .\loading.jl:2049 [15] top-level scope @ stdin:3 during initialization of module CUDA_Runtime_jll in expression starting at C:\Users\Administrator.julia\packages\CUDA\tVtYo\src\CUDA.jl:1
in expression starting at stdin:3 ERROR: Failed to precompile CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] to "C:\Users\Administrator\.julia\compiled\v1.9\CUDA\jl_1DB0.tmp". Stacktrace: [1] error(s::String) @ Base .\error.jl:35 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool) @ Base .\loading.jl:2300 [3] compilecache @ .\loading.jl:2167 [inlined] [4] _require(pkg::Base.PkgId, env::String) @ Base .\loading.jl:1805 [5] _require_prelocked(uuidkey::Base.PkgId, env::String) @ Base .\loading.jl:1660 [6] macro expansion @ .\loading.jl:1648 [inlined] [7] macro expansion @ .\lock.jl:267 [inlined] [8] require(into::Module, mod::Symbol) @ Base .\loading.jl:1611 [9] eval @ .\boot.jl:370 [inlined] [10] eval @ .\Base.jl:68 [inlined] [11] repleval(m::Module, code::Expr, #unused#::String) @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\VSCodeServer\src\repl.jl:222 [12] (::VSCodeServer.var"#107#109"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})() @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\VSCodeServer\src\repl.jl:186 [13] with_logstate(f::Function, logstate::Any) @ Base.CoreLogging .\logging.jl:514 [14] with_logger @ .\logging.jl:626 [inlined] [15] (::VSCodeServer.var"#106#108"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})() @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\VSCodeServer\src\repl.jl:187 [16] #invokelatest#2 @ .\essentials.jl:816 [inlined] [17] invokelatest(::Any) @ Base .\essentials.jl:813 [18] macro expansion @ c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined] [19] (::VSCodeServer.var"#61#62")() @ VSCodeServer .\task.jl:514

the output of CUDA.runtime_version() is: julia> CUDA.runtime_version() ERROR: UndefVarError: CUDA not defined Stacktrace: [1] top-level scope @ REPL[9]:1

gnadt commented 1 year ago

Alright, perhaps CUDA did not download properly before when there was an issue with the CN east registry. Have you run import Pkg; Pkg.update() or import Pkg; Pkg.instantiate() since switching to Julia v1.9.2? If not, please try both of those now & copy/paste the output.

ZhuMingJue1380 commented 1 year ago

the output of Pkg.update(): julia> import Pkg

julia> Pkg.update() ┌ Warning: could not download https://pkg.julialang.org/registries │ exception = RequestError: HTTP/1.1 301 CN east internal redirect trigger (Failed to connect to cn-east.pkg.juliacn.com port 443 after 21009 ms: Timed out) while requesting https://pkg.julialang.org/registries └ @ Pkg.Registry D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\Registry\Registry.jl:69 Updating registry at C:\Users\Administrator\.julia\registries\General.toml ┌ Warning: could not download https://pkg.julialang.org/registries │ exception = RequestError: HTTP/1.1 301 CN east internal redirect trigger (Failed to connect to cn-east.pkg.juliacn.com port 443 after 21002 ms: Timed out) while requesting https://pkg.julialang.org/registries └ @ Pkg.Registry D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\Registry\Registry.jl:69 Installed Distributions ─ v0.25.96 Updating D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Project.toml [052768ef] ↓ CUDA v4.4.0 ⇒ v4.3.2 [8bb1440f] + DelimitedFiles v1.9.1 [31c24e10] ↓ Distributions v0.25.98 ⇒ v0.25.96
[af5da776] ↓ GlobalSensitivity v2.2.0 ⇒ v2.1.4
[c8e1da08] ↑ IterTools v1.4.0 ⇒ v1.8.0 [ec8451be] ↓ KernelFunctions v0.10.56 ⇒ v0.10.55 [276daf66] ↓ SpecialFunctions v2.3.0 ⇒ v2.2.0
⌅ [2913bbd2] ↓ StatsBase v0.34.0 ⇒ v0.33.21 [02a925ec] ↓ cuDNN v1.1.0 ⇒ v1.0.4 [44cfe95a] ~ Pkg ⇒ v1.9.2 [10745b16] ~ Statistics ⇒ v1.9.0 [fa267f1f] ~ TOML ⇒ v1.0.3 Updating D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Manifest.toml [621f4979] ↓ AbstractFFTs v1.4.0 ⇒ v1.3.1 [7d9f7c33] - Accessors v0.1.32 [f20549b4] - AlphaStableDistributions v1.1.6 [96374032] - CRlibm v1.0.1 [052768ef] ↓ CUDA v4.4.0 ⇒ v4.3.2 [082447d4] ↓ ChainRules v1.52.0 ⇒ v1.51.0 [9e997f8a] - ChangesOfVariables v0.1.8 [861a8166] - Combinatorics v1.0.2 [38540f10] - CommonSolve v0.2.4 [34da2185] ↓ Compat v4.7.0 ⇒ v4.6.1 [2569d6c7] - ConcreteStructs v0.2.3 [ae264745] - Copulas v0.1.10 [667455a9] - Cubature v1.5.1 [864edb3b] ↓ DataStructures v0.18.14 ⇒ v0.18.13 [8bb1440f] + DelimitedFiles v1.9.1 [b429d917] - DensityInterface v0.4.0 [31c24e10] ↓ Distributions v0.25.98 ⇒ v0.25.96 [90fa49ef] - ErrorfreeArithmetic v0.5.2 [460bff9d] - ExceptionUnwrapping v0.1.9 [7a1cc6ca] ↓ FFTW v1.7.1 ⇒ v1.7.0 [fa42c844] - FastRounding v0.3.1 [1a297f60] ↓ FillArrays v1.3.0 ⇒ v1.2.0 [0c68f7d7] ↓ GPUArrays v8.8.1 ⇒ v8.7.1 ⌅ [61eb1bfa] ↓ GPUCompiler v0.21.3 ⇒ v0.20.3 [92c85e6c] - GSL v1.0.1 [af5da776] ↓ GlobalSensitivity v2.2.0 ⇒ v2.1.4 [cd3eb016] ↓ HTTP v1.9.8 ⇒ v1.9.6 [18e54dd8] ↓ IntegerMathUtils v0.1.2 ⇒ v0.1.1 [d1acc4aa] - IntervalArithmetic v0.20.9 [3587e190] - InverseFunctions v0.1.10 [c8e1da08] ↑ IterTools v1.4.0 ⇒ v1.8.0 [033835bb] - JLD2 v0.4.31 [63c18a36] ↓ KernelAbstractions v0.9.6 ⇒ v0.9.4 [ec8451be] ↓ KernelFunctions v0.10.56 ⇒ v0.10.55 [929cbde3] ↓ LLVM v6.0.1 ⇒ v5.2.0 [a5e1c1ea] + LatinHypercubeSampling v1.9.0 [7a12625a] ↓ LinearMaps v3.10.2 ⇒ v3.10.1 [20f20a25] - MakieCore v0.6.3 [d8a4904e] - MutableArithmetics v1.3.0 [37188c8d] - MvNormalCDF v0.2.6 [510215fc] - Observables v0.5.4 [6fe1bfb0] ↓ OffsetArrays v1.12.10 ⇒ v1.12.9 [69de0a69] ↓ Parsers v2.7.1 ⇒ v2.7.0 ⌅ [8a4e6c94] ↓ QuasiMonteCarlo v0.3.1 ⇒ v0.2.19 [42d2dcc6] - Referenceables v0.1.2 [f2b01f46] - Roots v2.0.17 [5eaf0fd0] - RoundingEmulator v0.2.1 [3cc68bcd] - SetRounding v0.2.1 [276daf66] ↓ SpecialFunctions v2.3.0 ⇒ v2.2.0 [860ef19b] + StableRNGs v1.0.0 [90137ffa] ↓ StaticArrays v1.6.0 ⇒ v1.5.26 ⌅ [2913bbd2] ↓ StatsBase v0.34.0 ⇒ v0.33.21 [6aa5eb33] - TaylorSeries v0.14.0 [ac1d9e8a] - ThreadsX v0.1.11 [c751599d] - ToeplitzMatrices v0.8.1 [28d57a85] ↓ Transducers v0.4.77 ⇒ v0.4.76 [1986cc42] ↓ Unitful v1.15.0 ⇒ v1.14.0 [d80eeb9a] ↓ UnsafeAtomicsLLVM v0.1.3 ⇒ v0.1.2 [41fe7b60] ↑ Unzip v0.1.2 ⇒ v0.2.0 [02a925ec] ↓ cuDNN v1.1.0 ⇒ v1.0.4 [4e9b3aee] - CRlibm_jll v1.0.1+0 ⌅ [62b44479] ↓ CUDNN_jll v8.9.2+0 ⇒ v8.8.1+0 [7bc98958] - Cubature_jll v1.0.5+0 [d7e528f0] ↓ FreeType2_jll v2.13.1+0 ⇒ v2.10.4+0 [1b77fbbe] - GSL_jll v2.7.2+0 ⌅ [856f044c] ↓ MKL_jll v2023.1.0+0 ⇒ v2022.2.0+0 [4f6342f7] ↓ Xorg_libX11_jll v1.8.6+0 ⇒ v1.6.9+4 [0c0b7dd1] ↓ Xorg_libXau_jll v1.0.11+0 ⇒ v1.0.9+4 [a3789734] ↓ Xorg_libXdmcp_jll v1.1.4+0 ⇒ v1.1.3+4 [14d82f49] ↓ Xorg_libpthread_stubs_jll v0.1.1+0 ⇒ v0.1.0+3 [c7cfdc94] ↓ Xorg_libxcb_jll v1.15.0+0 ⇒ v1.13.0+3 [cc61e674] ↓ Xorg_libxkbfile_jll v1.1.2+0 ⇒ v1.1.0+4 [35661453] ↓ Xorg_xkbcomp_jll v1.4.6+0 ⇒ v1.4.2+4 [33bec58e] ↓ Xorg_xkeyboard_config_jll v2.39.0+0 ⇒ v2.27.0+4 [c5fb5394] ↓ Xorg_xtrans_jll v1.5.0+0 ⇒ v1.4.0+3 [0dad84c5] ~ ArgTools ⇒ v1.1.1 [f43a241f] ~ Downloads ⇒ v1.6.0 [b27032c2] ~ LibCURL ⇒ v0.6.3 [ca575930] ~ NetworkOptions ⇒ v1.2.0 [44cfe95a] ~ Pkg ⇒ v1.9.2 [ea8e919c] ~ SHA ⇒ v0.7.0 [10745b16] ~ Statistics ⇒ v1.9.0 [fa267f1f] ~ TOML ⇒ v1.0.3 [a4e569a6] ~ Tar ⇒ v1.10.0 [e66e0078] ~ CompilerSupportLibraries_jll ⇒ v1.0.5+0 [deac9b47] ~ LibCURL_jll ⇒ v7.84.0+0 [29816b5a] ~ LibSSH2_jll ⇒ v1.10.2+0 [c8ffd9c3] ~ MbedTLS_jll ⇒ v2.28.2+0 [14a3606d] ~ MozillaCACerts_jll ⇒ v2022.10.11 [4536629a] + OpenBLAS_jll v0.3.21+4 [05823500] ~ OpenLibm_jll ⇒ v0.8.1+0 [efcefdf7] ~ PCRE2_jll ⇒ v10.42.0+0 [bea87d4a] + SuiteSparse_jll v5.10.1+6 [83775a58] ~ Zlib_jll ⇒ v1.2.13+0 [8e850b90] ↑ libblastrampoline_jll v3.1.0+2 ⇒ v5.8.0+0 [8e850ede] ~ nghttp2_jll ⇒ v1.48.0+0 [3f19e933] ~ p7zip_jll ⇒ v17.4.0+0 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use status --outdated -m Precompiling project... ✗ CUDA ✗ cuDNN ✗ ArrayInterface → ArrayInterfaceCUDAExt ✗ NNlibCUDA ✗ Flux ✗ FluxOptTools ✗ MagNav 157 dependencies successfully precompiled in 284 seconds. 188 already precompiled. 7 dependencies errored. To see a full report either run import Pkg; Pkg.precompile() or load the packages 1 dependency had warnings during precompilation: ┌ SatelliteToolbox [6ac157d9-b43d-51bb-8fab-48bf53814f4a] │ WARNING: method definition for #init_orbit_propagator#142 at C:\Users\Administrator.julia\packages\SatelliteToolbox\JX7R1\src\orbit\propagators\api\j2.jl:54 declares type variable T but does not use it. └ [ Info: We haven't cleaned this depot up for a bit, running Pkg.gc()... Active manifest files: 5 found Active artifact files: 145 found Active scratchspaces: 4 found Deleted no artifacts, repos, packages or scratchspaces

the update of Pkg.instantiate(): julia> Pkg.instantiate()

julia> import Pkg

julia> Pkg.instantiate()

julia>

nothing came out

gnadt commented 1 year ago

Looks like there is again some sort of registry issue, which I am unfamiliar with. Try first manually deleting the artifact folder (C:\Users\Administrator.julia\artifacts\22c03bf198204cc536cb4477e16d5ffd4455391f) then remove from the project environment CUDA & the other non-MagNav packages that you added (import Pkg; Pkg.rm("CUDA") then Pkg.rm("ChainRulesCore") then Pkg.rm("cuDNN") then Pkg.rm("NNlibCUDA")), and then try Pkg.update() and Pkg.instantiate() again.

ZhuMingJue1380 commented 1 year ago

how to remove from the project environment CUDA & the other non-MagNav packages that you added? you mean all the packages that is not MagNav? Installed Distributions ─ v0.25.96 Updating D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Project.toml [052768ef] ↓ CUDA v4.4.0 ⇒ v4.3.2 [8bb1440f] + DelimitedFiles v1.9.1 [31c24e10] ↓ Distributions v0.25.98 ⇒ v0.25.96
[af5da776] ↓ GlobalSensitivity v2.2.0 ⇒ v2.1.4
[c8e1da08] ↑ IterTools v1.4.0 ⇒ v1.8.0 [ec8451be] ↓ KernelFunctions v0.10.56 ⇒ v0.10.55 [276daf66] ↓ SpecialFunctions v2.3.0 ⇒ v2.2.0
⌅ [2913bbd2] ↓ StatsBase v0.34.0 ⇒ v0.33.21 [02a925ec] ↓ cuDNN v1.1.0 ⇒ v1.0.4 [44cfe95a] ~ Pkg ⇒ v1.9.2 [10745b16] ~ Statistics ⇒ v1.9.0 [fa267f1f] ~ TOML ⇒ v1.0.3 Updating D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Manifest.toml [621f4979] ↓ AbstractFFTs v1.4.0 ⇒ v1.3.1 [7d9f7c33] - Accessors v0.1.32 [f20549b4] - AlphaStableDistributions v1.1.6 [96374032] - CRlibm v1.0.1 [052768ef] ↓ CUDA v4.4.0 ⇒ v4.3.2 [082447d4] ↓ ChainRules v1.52.0 ⇒ v1.51.0 [9e997f8a] - ChangesOfVariables v0.1.8 [861a8166] - Combinatorics v1.0.2 [38540f10] - CommonSolve v0.2.4 [34da2185] ↓ Compat v4.7.0 ⇒ v4.6.1 [2569d6c7] - ConcreteStructs v0.2.3 [ae264745] - Copulas v0.1.10 [667455a9] - Cubature v1.5.1 [864edb3b] ↓ DataStructures v0.18.14 ⇒ v0.18.13 [8bb1440f] + DelimitedFiles v1.9.1 [b429d917] - DensityInterface v0.4.0 [31c24e10] ↓ Distributions v0.25.98 ⇒ v0.25.96 [90fa49ef] - ErrorfreeArithmetic v0.5.2 [460bff9d] - ExceptionUnwrapping v0.1.9 [7a1cc6ca] ↓ FFTW v1.7.1 ⇒ v1.7.0 [fa42c844] - FastRounding v0.3.1 [1a297f60] ↓ FillArrays v1.3.0 ⇒ v1.2.0 [0c68f7d7] ↓ GPUArrays v8.8.1 ⇒ v8.7.1 ⌅ [61eb1bfa] ↓ GPUCompiler v0.21.3 ⇒ v0.20.3 [92c85e6c] - GSL v1.0.1 [af5da776] ↓ GlobalSensitivity v2.2.0 ⇒ v2.1.4 [cd3eb016] ↓ HTTP v1.9.8 ⇒ v1.9.6 [18e54dd8] ↓ IntegerMathUtils v0.1.2 ⇒ v0.1.1 [d1acc4aa] - IntervalArithmetic v0.20.9 [3587e190] - InverseFunctions v0.1.10 [c8e1da08] ↑ IterTools v1.4.0 ⇒ v1.8.0 [033835bb] - JLD2 v0.4.31 [63c18a36] ↓ KernelAbstractions v0.9.6 ⇒ v0.9.4 [ec8451be] ↓ KernelFunctions v0.10.56 ⇒ v0.10.55 [929cbde3] ↓ LLVM v6.0.1 ⇒ v5.2.0 [a5e1c1ea] + LatinHypercubeSampling v1.9.0 [7a12625a] ↓ LinearMaps v3.10.2 ⇒ v3.10.1 [20f20a25] - MakieCore v0.6.3 [d8a4904e] - MutableArithmetics v1.3.0 [37188c8d] - MvNormalCDF v0.2.6 [510215fc] - Observables v0.5.4 [6fe1bfb0] ↓ OffsetArrays v1.12.10 ⇒ v1.12.9 [69de0a69] ↓ Parsers v2.7.1 ⇒ v2.7.0 ⌅ [8a4e6c94] ↓ QuasiMonteCarlo v0.3.1 ⇒ v0.2.19 [42d2dcc6] - Referenceables v0.1.2 [f2b01f46] - Roots v2.0.17 [5eaf0fd0] - RoundingEmulator v0.2.1 [3cc68bcd] - SetRounding v0.2.1 [276daf66] ↓ SpecialFunctions v2.3.0 ⇒ v2.2.0 [860ef19b] + StableRNGs v1.0.0 [90137ffa] ↓ StaticArrays v1.6.0 ⇒ v1.5.26 ⌅ [2913bbd2] ↓ StatsBase v0.34.0 ⇒ v0.33.21 [6aa5eb33] - TaylorSeries v0.14.0 [ac1d9e8a] - ThreadsX v0.1.11 [c751599d] - ToeplitzMatrices v0.8.1 [28d57a85] ↓ Transducers v0.4.77 ⇒ v0.4.76 [1986cc42] ↓ Unitful v1.15.0 ⇒ v1.14.0 [d80eeb9a] ↓ UnsafeAtomicsLLVM v0.1.3 ⇒ v0.1.2 [41fe7b60] ↑ Unzip v0.1.2 ⇒ v0.2.0 [02a925ec] ↓ cuDNN v1.1.0 ⇒ v1.0.4 [4e9b3aee] - CRlibm_jll v1.0.1+0 ⌅ [62b44479] ↓ CUDNN_jll v8.9.2+0 ⇒ v8.8.1+0 [7bc98958] - Cubature_jll v1.0.5+0 [d7e528f0] ↓ FreeType2_jll v2.13.1+0 ⇒ v2.10.4+0 [1b77fbbe] - GSL_jll v2.7.2+0 ⌅ [856f044c] ↓ MKL_jll v2023.1.0+0 ⇒ v2022.2.0+0 [4f6342f7] ↓ Xorg_libX11_jll v1.8.6+0 ⇒ v1.6.9+4 [0c0b7dd1] ↓ Xorg_libXau_jll v1.0.11+0 ⇒ v1.0.9+4 [a3789734] ↓ Xorg_libXdmcp_jll v1.1.4+0 ⇒ v1.1.3+4 [14d82f49] ↓ Xorg_libpthread_stubs_jll v0.1.1+0 ⇒ v0.1.0+3 [c7cfdc94] ↓ Xorg_libxcb_jll v1.15.0+0 ⇒ v1.13.0+3 [cc61e674] ↓ Xorg_libxkbfile_jll v1.1.2+0 ⇒ v1.1.0+4 [35661453] ↓ Xorg_xkbcomp_jll v1.4.6+0 ⇒ v1.4.2+4 [33bec58e] ↓ Xorg_xkeyboard_config_jll v2.39.0+0 ⇒ v2.27.0+4 [c5fb5394] ↓ Xorg_xtrans_jll v1.5.0+0 ⇒ v1.4.0+3 [0dad84c5] ~ ArgTools ⇒ v1.1.1 [f43a241f] ~ Downloads ⇒ v1.6.0 [b27032c2] ~ LibCURL ⇒ v0.6.3 [ca575930] ~ NetworkOptions ⇒ v1.2.0 [44cfe95a] ~ Pkg ⇒ v1.9.2 [ea8e919c] ~ SHA ⇒ v0.7.0 [10745b16] ~ Statistics ⇒ v1.9.0 [fa267f1f] ~ TOML ⇒ v1.0.3 [a4e569a6] ~ Tar ⇒ v1.10.0 [e66e0078] ~ CompilerSupportLibraries_jll ⇒ v1.0.5+0 [deac9b47] ~ LibCURL_jll ⇒ v7.84.0+0 [29816b5a] ~ LibSSH2_jll ⇒ v1.10.2+0 [c8ffd9c3] ~ MbedTLS_jll ⇒ v2.28.2+0 [14a3606d] ~ MozillaCACerts_jll ⇒ v2022.10.11 [4536629a] + OpenBLAS_jll v0.3.21+4 [05823500] ~ OpenLibm_jll ⇒ v0.8.1+0 [efcefdf7] ~ PCRE2_jll ⇒ v10.42.0+0 [bea87d4a] + SuiteSparse_jll v5.10.1+6 [83775a58] ~ Zlib_jll ⇒ v1.2.13+0 [8e850b90] ↑ libblastrampoline_jll v3.1.0+2 ⇒ v5.8.0+0 [8e850ede] ~ nghttp2_jll ⇒ v1.48.0+0 [3f19e933] ~ p7zip_jll ⇒ v17.4.0+0

like all the packages?

gnadt commented 1 year ago

I literally just said what to do. There are several packages not in the MagNav project environment that you added, please follow the steps I mentioned to remove them.

ZhuMingJue1380 commented 1 year ago

My misunderstanding. Why does the downloaded text appear when I uninstall the package. julia> Pkg.rm("CUDA") Updating D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Project.toml [052768ef] - CUDA v4.3.2 No Changes to D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Manifest.toml Downloaded artifact: CUDA_Runtime Downloading artifact: CUDA_Runtime fatal: error thrown and no exception handler available. ] 4.5 %

Is that normal?

gnadt commented 1 year ago

No, it is not. Did you delete the artifact folder first? If not, please do, and try Pkg.rm("CUDA") again and the other steps mentioned previously.

ZhuMingJue1380 commented 1 year ago

I delete the artifact folder, do Pkg.rm("*") order about four packages you mentioned, and run Pkg.update(): Updating registry at C:\Users\Administrator\.julia\registries\General.toml Downloaded artifact: GDAL Downloaded artifact: GDAL Downloaded artifact: JpegTurbo Downloaded artifact: JpegTurbo Downloaded artifact: x265 Downloaded artifact: x265 Downloaded artifact: libfdk_aac Downloaded artifact: libfdk_aac Downloaded artifact: GR Downloaded artifact: GR Downloaded artifact: LERC Downloaded artifact: LERC Downloaded artifact: Opus Downloaded artifact: Opus Downloaded artifact: LLVMOpenMP Downloaded artifact: LLVMOpenMP Downloaded artifact: LAME Downloaded artifact: LAME Downloaded artifact: Libiconv Downloaded artifact: Libiconv Downloaded artifact: Glib Downloaded artifact: Glib Downloaded artifact: libvorbis Downloaded artifact: libvorbis Downloaded artifact: glmnet Downloaded artifact: glmnet No Changes to D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Project.toml No Changes to D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Manifest.toml

julia> Pkg.instantiate()

julia>

the output of Pkg.instantiate() is still nothing. the artifacts folder is now downloaded all over again. image However, this folder (C:\Users\Administrator.julia\artifacts\22c03bf198204cc536cb4477e16d5ffd4455391f) is still nothing: image

Did I do something wrong?

gnadt commented 1 year ago

Now what happens, again, from the project folder (D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master), after import Pkg; Pkg.activate("."), then using MagNav ?

ZhuMingJue1380 commented 1 year ago

julia> pwd() "D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master"

julia> import Pkg

julia> Pkg.activate(".") Activating project at D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master

julia> using MagNav [ Info: Precompiling MagNav [f91b31a4-be4d-40e3-b767-4b8c09c10076] ERROR: LoadError: InitError: could not load library "C:\Users\Administrator.julia\artifacts\22c03bf198204cc536cb4477e16d5ffd4455391f\bin\cublas64_11.dll" The specified module could not be found. Stacktrace: [1] dlopen(s::String, flags::UInt32; throw_error::Bool) @ Base.Libc.Libdl .\libdl.jl:117 [2] dlopen(s::String, flags::UInt32) @ Base.Libc.Libdl .\libdl.jl:116 [3] macro expansion @ C:\Users\Administrator.julia\packages\JLLWrappers\QpMQW\src\products\library_generators.jl:54 [inlined] [4] init() @ CUDA_Runtime_jll C:\Users\Administrator.julia\packages\CUDA_Runtime_jll\kaNVq\src\wrappers\x86_64-w64-mingw32-cuda+11.8.jl:28 [5] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String) @ Base .\loading.jl:1115 [6] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}) @ Base .\loading.jl:1061 [7] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128) @ Base .\loading.jl:1506 [8] _require(pkg::Base.PkgId, env::String) @ Base .\loading.jl:1783 [9] _require_prelocked(uuidkey::Base.PkgId, env::String) @ Base .\loading.jl:1660 [10] macro expansion @ .\loading.jl:1648 [inlined] [11] macro expansion @ .\lock.jl:267 [inlined] [12] require(into::Module, mod::Symbol) @ Base .\loading.jl:1611 [13] include @ .\Base.jl:457 [inlined] [14] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String) @ Base .\loading.jl:2049 [15] top-level scope @ stdin:3 during initialization of module CUDA_Runtime_jll in expression starting at C:\Users\Administrator.julia\packages\CUDA\pCcGc\src\CUDA.jl:1 in expression starting at stdin:3 ERROR: LoadError: Failed to precompile CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] to "C:\Users\Administrator\.julia\compiled\v1.9\CUDA\jl_B551.tmp". Stacktrace: [1] error(s::String) @ Base .\error.jl:35 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool) @ Base .\loading.jl:2300 [3] compilecache @ .\loading.jl:2167 [inlined] [4] _require(pkg::Base.PkgId, env::String) @ Base .\loading.jl:1805 [5] _require_prelocked(uuidkey::Base.PkgId, env::String) @ Base .\loading.jl:1660 [6] macro expansion @ .\loading.jl:1648 [inlined] [7] macro expansion @ .\lock.jl:267 [inlined] [8] require(into::Module, mod::Symbol) @ Base .\loading.jl:1611 [9] include @ .\Base.jl:457 [inlined] [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String) @ Base .\loading.jl:2049 [11] top-level scope @ stdin:3 in expression starting at C:\Users\Administrator.julia\packages\Flux\n3cOc\src\Flux.jl:1 in expression starting at stdin:3 ERROR: LoadError: Failed to precompile Flux [587475ba-b771-5e3f-ad9e-33799f191a9c] to "C:\Users\Administrator\.julia\compiled\v1.9\Flux\jl_A738.tmp". Stacktrace: [1] error(s::String) @ Base .\error.jl:35 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool) @ Base .\loading.jl:2300 [3] compilecache @ .\loading.jl:2167 [inlined] [4] _require(pkg::Base.PkgId, env::String) @ Base .\loading.jl:1805 [5] _require_prelocked(uuidkey::Base.PkgId, env::String) @ Base .\loading.jl:1660 [6] macro expansion @ .\loading.jl:1648 [inlined] [7] macro expansion @ .\lock.jl:267 [inlined] [8] require(into::Module, mod::Symbol) @ Base .\loading.jl:1611 [9] include @ .\Base.jl:457 [inlined] [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing) @ Base .\loading.jl:2049 [11] top-level scope @ stdin:3 in expression starting at D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\src\MagNav.jl:1 in expression starting at stdin:3 ERROR: Failed to precompile MagNav [f91b31a4-be4d-40e3-b767-4b8c09c10076] to "C:\Users\Administrator\.julia\compiled\v1.9\MagNav\jl_A5D1.tmp". Stacktrace: [1] error(s::String) @ Base .\error.jl:35 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool) @ Base .\loading.jl:2300 [3] compilecache @ .\loading.jl:2167 [inlined] [4] _require(pkg::Base.PkgId, env::String) @ Base .\loading.jl:1805 [5] _require_prelocked(uuidkey::Base.PkgId, env::String) @ Base .\loading.jl:1660 [6] macro expansion @ .\loading.jl:1648 [inlined] [7] macro expansion @ .\lock.jl:267 [inlined] [8] require(into::Module, mod::Symbol) @ Base .\loading.jl:1611 [9] eval @ .\boot.jl:370 [inlined] [10] eval @ .\Base.jl:68 [inlined] [11] repleval(m::Module, code::Expr, #unused#::String) @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\VSCodeServer\src\repl.jl:222 [12] (::VSCodeServer.var"#107#109"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})() @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\VSCodeServer\src\repl.jl:186 [13] with_logstate(f::Function, logstate::Any) @ Base.CoreLogging .\logging.jl:514 [14] with_logger @ .\logging.jl:626 [inlined] [15] (::VSCodeServer.var"#106#108"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})() @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\VSCodeServer\src\repl.jl:187 [16] #invokelatest#2 @ .\essentials.jl:816 [inlined] [17] invokelatest(::Any) @ Base .\essentials.jl:813 [18] macro expansion @ c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined] [19] (::VSCodeServer.var"#61#62")() @ VSCodeServer .\task.jl:514

gnadt commented 1 year ago

Have you tried restarting your computer? Either way, try that now. Then from the project folder (D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master) do import Pkg; Pkg.activate(".") then Pkg.update() then Pkg.resolve() then Pkg. instantiate(), and copy/paste any output for each step.

gnadt commented 1 year ago

After that, please copy/paste the output of versioninfo() and Pkg.status() again.

ZhuMingJue1380 commented 1 year ago

I already restart my computer. the output is: julia> pwd() "D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master"

julia> import Pkg

julia> Pkg.activate(".") Activating project at D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master

julia> Pkg.update() ┌ Warning: could not download https://pkg.julialang.org/registries │ exception = RequestError: HTTP/1.1 301 CN east internal redirect trigger (Failed to connect to cn-east.pkg.juliacn.com port 443 after 21011 ms: Timed out) while requesting https://pkg.julialang.org/registries └ @ Pkg.Registry D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\Registry\Registry.jl:69 Updating registry at C:\Users\Administrator\.julia\registries\General.toml No Changes to D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Project.toml No Changes to D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Manifest.toml Precompiling project... ✗ CUDA ✗ cuDNN ✗ ArrayInterface → ArrayInterfaceCUDAExt ✗ NNlibCUDA ✗ Flux ✗ FluxOptTools ✗ MagNav 0 dependencies successfully precompiled in 43 seconds. 345 already precompiled. 7 dependencies errored. To see a full report either run import Pkg; Pkg.precompile() or load the packages

julia> Pkg.resolve() No Changes to D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Project.toml No Changes to D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Manifest.toml

julia> Pkg.instantiate()

julia> versioninfo() Julia Version 1.9.2 Commit e4ee485e90 (2023-07-05 09:39 UTC) Platform Info: OS: Windows (x86_64-w64-mingw32) CPU: 12 × Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-14.0.6 (ORCJIT, skylake) Threads: 1 on 12 virtual cores Environment: JULIA_EDITOR = code JULIA_NUM_THREADS =

julia> Pkg.status() Project MagNav v1.0.3 Status D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master\Project.toml [c9ce4bd3] ArchGDAL v0.10.1 [fbb218c0] BSON v0.3.7 [6e4b80f9] BenchmarkTools v1.3.2 [336ed68f] CSV v0.10.11 [717857b8] DSP v0.7.8 [a93c6f00] DataFrames v1.5.0 [8bb1440f] DelimitedFiles v1.9.1 [31c24e10] Distributions v0.25.96 [d4d017d3] ExponentialUtilities v1.24.0 [587475ba] Flux v0.13.17 [ca11d760] FluxOptTools v0.1.2 [f6369f11] ForwardDiff v0.10.35 [8d5ece8b] GLMNet v0.7.2 [28b8d3ca] GR v0.72.7 [0ef565a4] Geodesy v1.1.0 [af5da776] GlobalSensitivity v2.1.4 [f67ccb44] HDF5 v0.16.15 [d25df0c9] Inflate v0.1.3 [a98d9a8b] Interpolations v0.14.7 [c8e1da08] IterTools v1.8.0 [ec8451be] KernelFunctions v0.10.55 [23992714] MAT v0.10.5 [6ee0df7b] MLJLinearModels v0.9.2 [b8a86587] NearestNeighbors v0.4.13 [429524aa] Optim v1.7.6 [d96e819e] Parameters v0.12.3 [91a5bcdd] Plots v1.38.16 [3cdcf5f2] RecipesBase v1.3.4 [295af30f] Revise v3.5.3 [6ac157d9] SatelliteToolbox v0.10.0 [8523bd24] ShapML v0.3.2 [276daf66] SpecialFunctions v2.2.0 ⌅ [2913bbd2] StatsBase v0.33.21 [a5390f91] ZipFile v0.10.1 [e88e6eb3] Zygote v0.6.62 [4af54fe1] LazyArtifacts [37e2e46d] LinearAlgebra [44cfe95a] Pkg v1.9.2 [9a3f8284] Random [10745b16] Statistics v1.9.0 [fa267f1f] TOML v1.0.3 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use status --outdated

gnadt commented 1 year ago

Alright, it likely has to do with the registry download not working, unclear why. As always, from the project folder (D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master), there are a few things to try:

ZhuMingJue1380 commented 1 year ago

julia> pwd() "D:\Desktop\work\magnetic\MagNav.jl-master\MagNav.jl-master"

julia> using Downloads; request("https://pkg.julialang.org/registries") ERROR: RequestError: Failed to connect to pkg.julialang.org port 443 after 21002 ms: Timed out while requesting https://pkg.julialang.org/registries Stacktrace: [1] (::Downloads.var"#9#18"{Base.DevNull, Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, String, Bool, Bool})(easy::Downloads.Curl.Easy) @ Downloads D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:388 [2] with_handle(f::Downloads.var"#9#18"{Base.DevNull, Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, String, Bool, Bool}, handle::Downloads.Curl.Easy) @ Downloads.Curl D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Curl\Curl.jl:90 [3] #8 @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:329 [inlined] [4] arg_write(f::Downloads.var"#8#17"{Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, String, Bool, Bool}, arg::Base.DevNull) @ ArgTools D:\Julia-1.9.2\share\julia\stdlib\v1.9\ArgTools\src\ArgTools.jl:134 [5] #7 @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:328 [inlined] [6] arg_read @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\ArgTools\src\ArgTools.jl:76 [inlined] [7] request(url::String; input::Nothing, output::Nothing, method::Nothing, headers::Vector{Pair{String, String}}, timeout::Float64, progress::Nothing, verbose::Bool, debug::Nothing, throw::Bool, downloader::Nothing) @ Downloads D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:327 [8] request(url::String) @ Downloads D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:295 [9] top-level scope @ REPL[2]:1

julia> request("https://pkg.julialang.org/registries";timeout=300) ERROR: RequestError: HTTP/1.1 301 CN east internal redirect trigger (Failed to connect to cn-east.pkg.juliacn.com port 443 after 21106 ms: Timed out) whi 443 after 21106 ms: Timed out) while requesting https://pkg.julialang.org/registries Stacktrace: [1] (::Downloads.var"#9#18"{Base.DevNull, Base.DevNull, Nothing, Vector{Pair{String, String}}, Int64, Nothing, Bool, Nothing, Bool, String, Bool, Bool}) Nothing, Bool, String, Bool, Bool})(easy::Downloads.Curl.Easy) @ Downloads D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:388 [2] with_handle(f::Downloads.var"#9#18"{Base.DevNull, Base.DevNull, Nothing, Vector{Pair{String, String}}, Int64, Nothing, Bool, Nothing, Bool, String, hing, Bool, Nothing, Bool, String, Bool, Bool}, handle::Downloads.Curl.Easy) @ Downloads.Curl D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Curl\Curl.jl:90 [3] #8 @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:329 [inlined] [4] arg_write(f::Downloads.var"#8#17"{Base.DevNull, Nothing, Vector{Pair{String, String}}, Int64, Nothing, Bool, Nothing, Bool, String, Bool, Bool}, arging, Bool, String, Bool, Bool}, arg::Base.DevNull) @ ArgTools D:\Julia-1.9.2\share\julia\stdlib\v1.9\ArgTools\src\ArgTools.jl:134 [5] #7 @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:328 [inlined] [6] arg_read @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\ArgTools\src\ArgTools.jl:76 [inlined] [7] request(url::String; input::Nothing, output::Nothing, method::Nothing, headers::Vector{Pair{String, String}}, timeout::Int64, progress::Nothing, vereout::Int64, progress::Nothing, verbose::Bool, debug::Nothing, throw::Bool, downloader::Nothing) @ Downloads D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:327 [8] top-level scope @ REPL[3]:1

julia> Threads.nthreads() 1

julia> Threads.threadid() 1

this is my setting.json: { "workbench.colorTheme": "Default High Contrast", "typescript.locale": "zh-CN", "julia.additionalArgs": [ ] "editor.fontSize": 16, "julia.enableTelemetry": true, "julia.executablePath":"D:/Julia-1.9.2/bin/julia.exe",
"julia.symbolCacheDownload":true, "julia.NumThreads": 8, }

the output of re-run the step is: julia> using Downloads; request("https://pkg.julialang.org/registries") ERROR: RequestError: HTTP/1.1 301 CN east internal redirect trigger (Failed to connect to cn-east.pkg.juliacn.com port 443 after 21005 ms: Timed out) while requesting https://pkg.julialang.org/registries Stacktrace: [1] (::Downloads.var"#9#18"{Base.DevNull, Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, String, Bool, Bool})(easy::Downloads.Curl.Easy) @ Downloads D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:388
[2] with_handle(f::Downloads.var"#9#18"{Base.DevNull, Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, String, Bool, Bool}, handle::Downloads.Curl.Easy) @ Downloads.Curl D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Curl\Curl.jl:90
[3] #8 @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:329 [inlined]
[4] arg_write(f::Downloads.var"#8#17"{Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, String, Bool, Bool}, arg::Base.DevNull) @ ArgTools D:\Julia-1.9.2\share\julia\stdlib\v1.9\ArgTools\src\ArgTools.jl:134 [5] #7 @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:328 [inlined]
[6] arg_read @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\ArgTools\src\ArgTools.jl:76 [inlined] [7] request(url::String; input::Nothing, output::Nothing, method::Nothing, headers::Vector{Pair{String, String}}, timeout::Float64, progress::Nothing, verbose::Bool, debug::Nothing, throw::Bool, downloader::Nothing) @ Downloads D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:327
[8] request(url::String) @ Downloads D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:295
[9] top-level scope @ REPL[7]:1

julia> request("https://pkg.julialang.org/registries";timeout=300) ERROR: RequestError: HTTP/1.1 301 CN east internal redirect trigger (Failed to connect to cn-east.pkg.juliacn.com port 443 after 21004 ms: Timed out) while requesting https://pkg.julialang.org/registries Stacktrace: [1] (::Downloads.var"#9#18"{Base.DevNull, Base.DevNull, Nothing, Vector{Pair{String, String}}, Int64, Nothing, Bool, Nothing, Bool, String, Bool, Bool})(easy::Downloads.Curl.Easy) @ Downloads D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:388
[2] with_handle(f::Downloads.var"#9#18"{Base.DevNull, Base.DevNull, Nothing, Vector{Pair{String, String}}, Int64, Nothing, Bool, Nothing, Bool, String, Bool, Bool}, handle::Downloads.Curl.Easy) @ Downloads.Curl D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Curl\Curl.jl:90 [3] #8 @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:329 [inlined]
[4] arg_write(f::Downloads.var"#8#17"{Base.DevNull, Nothing, Vector{Pair{String, String}}, Int64, Nothing, Bool, Nothing, Bool, String, Bool, Bool}, arg::Base.DevNull) @ ArgTools D:\Julia-1.9.2\share\julia\stdlib\v1.9\ArgTools\src\ArgTools.jl:134 [5] #7 @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:328 [inlined]
[6] arg_read @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\ArgTools\src\ArgTools.jl:76 [inlined] [7] request(url::String; input::Nothing, output::Nothing, method::Nothing, headers::Vector{Pair{String, String}}, timeout::Int64, progress::Nothing, verbose::Bool, debug::Nothing, throw::Bool, downloader::Nothing) @ Downloads D:\Julia-1.9.2\share\julia\stdlib\v1.9\Downloads\src\Downloads.jl:327
[8] top-level scope @ REPL[8]:1

julia> Threads.nthreads() 1

julia> Threads.threadid() 1

gnadt commented 1 year ago

Oh, I think you needed to restart Julia for that change to take effect. Please restart Julia and make sure settings.json still has "julia.NumThreads": 8, then try:

ZhuMingJue1380 commented 1 year ago

I already restart Julia by Julia: Restart REPL.

the output is: julia> Threads.nthreads() 8

julia> using Downloads; request("https://pkg.julialang.org/registries";verbose=true)

gnadt commented 1 year ago

What is your network DNS address?

From here, you can also try:

ZhuMingJue1380 commented 1 year ago

my DNS address is 202.101.172.46

the output is: When I type Pkg.update(), the previous output is collapsed, but no errors are reported and the registry of General is installed as normal. the output is: rror: GitError(Code:ERROR, Class:OS, failed to send request: 操作超时 │ ) └ @ Pkg.Registry D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\Registry\Registry.jl:510 Installed GR_jll ────────────────── v0.72.8+0 Installed StaticArraysCore ──────── v1.4.2 Installed CodecZlib ─────────────── v0.7.2 Installed StaticArrays ──────────── v1.6.2 Installed ConstructionBase ──────── v1.5.3 Installed HypergeometricFunctions ─ v0.3.21 Installed ChainRules ────────────── v1.53.0 Installed OrderedCollections ────── v1.6.2 Installed Primes ────────────────── v0.5.4 Installed OnlineStats ───────────── v1.6.3 Installed FillArrays ────────────── v1.4.2 Installed GPUCompiler ───────────── v0.21.4 Installed Transducers ───────────── v0.4.78 Installed DiskArrays ────────────── v0.3.14 Installed PrettyTables ──────────── v2.2.6 Installed ColorSchemes ──────────── v3.22.0 Installed GR ────────────────────── v0.72.8 Downloaded artifact: GR ERROR: Unable to automatically download/install artifact 'GR' from sources listed in 'C:\Users\Administrator.julia\packages\GR_jll\xZYsZ\Artifacts.toml'.
Sources attempted:

Stacktrace: [1] error(s::String) @ Base .\error.jl:35 [2] ensure_artifact_installed(name::String, meta::Dict{String, Any}, artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, verbose::Bool, quiet_download::Bool, io::Base.TTY) @ Pkg.Artifacts D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\Artifacts.jl:443 [3] download_artifacts(env::Pkg.Types.EnvCache; platform::Base.BinaryPlatforms.Platform, julia_version::VersionNumber, verbose::Bool, io::Base.TTY)
@ Pkg.Operations D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\Operations.jl:756 [4] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, level::Pkg.Types.UpgradeLevel; skip_writing_project::Bool, preserve::Nothing) @ Pkg.Operations D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\Operations.jl:1539 [5] up @ D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\Operations.jl:1516 [inlined] [6] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, preserve::Nothing, update_registry::Bool, skip_writing_project::Bool, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}}) @ Pkg.API D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\API.jl:348 [7] up(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Pkg.Types.PackageMode, Tuple{Symbol}, NamedTuple{(:mode,), Tuple{Pkg.Types.PackageMode}}}) @ Pkg.API D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\API.jl:156 [8] up(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Pkg.API D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\API.jl:171 [9] up() @ Pkg.API D:\Julia-1.9.2\share\julia\stdlib\v1.9\Pkg\src\API.jl:162 [10] top-level scope @ REPL[6]:1