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

UndefVarError: parameters not defined on Windows10 #1371

Closed
prog900 opened this issue Feb 14, 2022 · 4 comments
Closed

UndefVarError: parameters not defined on Windows10 #1371

prog900 opened this issue Feb 14, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@prog900
Copy link

prog900 commented Feb 14, 2022

Hello!
I'm trying to run a simple example program on windows10

using CUDA
N = 2^20
x_d = CUDA.fill(1.0f0, N)  # a vector stored on the GPU filled with 1.0 (Float32)
y_d = CUDA.fill(2.0f0, N)  # a vector stored on the GPU filled with 2.0
y_d .+= x_d

and I get an error message - "UndefVarError: parameters not defined"

System parameters:
CUDA v2.6.3
Julia 1.6.4
Windows 10 Pro x64
Julia Environment: Jupyter Notebook

julia> CUDA.versioninfo()
CUDA toolkit 11.1.1, artifact installation
CUDA driver 11.6.0

Libraries:

  • CUBLAS: 11.3.0
  • CURAND: 10.2.2
  • CUFFT: 10.3.0
  • CUSOLVER: 11.0.1
  • CUSPARSE: 11.3.0
  • CUPTI: 14.0.0
  • NVML: missing
  • CUDNN: 8.10.0 (for CUDA 11.2.0)
  • CUTENSOR: 1.2.2 (for CUDA 11.1.0)

Toolchain:

  • Julia: 1.6.4
  • LLVM: 11.0.1
  • PTX ISA support: 3.2, 4.0, 4.1, 4.2, 4.3, 5.0, 6.0, 6.1, 6.3, 6.4, 6.5, 7.0
  • Device support: sm_35, sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80

1 device:
0: NVIDIA GeForce GTX 1060 6GB (sm_61, 5.028 GiB / 6.000 GiB available)

Pkg.test("CUDA")
Testing CUDA
Status C:\Users\Evgeny\AppData\Local\Temp\jl_0hzTVi\Project.toml
[79e6a3ab] Adapt v3.3.3
[ab4f0b2a] BFloat16s v0.1.0
[052768ef] CUDA v2.6.3
[864edb3b] DataStructures v0.18.11
[7a1cc6ca] FFTW v1.4.5
[1a297f60] FillArrays v0.9.7
[f6369f11] ForwardDiff v0.10.25
[0c68f7d7] GPUArrays v6.4.1
[a98d9a8b] Interpolations v0.13.5
[872c559c] NNlib v0.7.34
[ade2ca70] Dates @stdlib/Dates
[8ba89e20] Distributed @stdlib/Distributed
[37e2e46d] LinearAlgebra @stdlib/LinearAlgebra
[de0858da] Printf @stdlib/Printf
[3fa0cd96] REPL @stdlib/REPL
[9a3f8284] Random @stdlib/Random
[2f01184e] SparseArrays @stdlib/SparseArrays
[10745b16] Statistics @stdlib/Statistics
[8dfed614] Test @stdlib/Test
Status C:\Users\Evgeny\AppData\Local\Temp\jl_0hzTVi\Manifest.toml
[621f4979] AbstractFFTs v1.1.0
[79e6a3ab] Adapt v3.3.3
[13072b0f] AxisAlgorithms v1.0.1
[ab4f0b2a] BFloat16s v0.1.0
[fa961155] CEnum v0.4.1
[052768ef] CUDA v2.6.3
[d360d2e6] ChainRulesCore v1.12.0
[9e997f8a] ChangesOfVariables v0.1.2
[bbf7d656] CommonSubexpressions v0.3.0
[34da2185] Compat v3.41.0
[864edb3b] DataStructures v0.18.11
[163ba53b] DiffResults v1.0.3
[b552c78f] DiffRules v1.9.1
[ffbed154] DocStringExtensions v0.8.6
[e2ba6199] ExprTools v0.1.8
[7a1cc6ca] FFTW v1.4.5
[1a297f60] FillArrays v0.9.7
[f6369f11] ForwardDiff v0.10.25
[0c68f7d7] GPUArrays v6.4.1
[61eb1bfa] GPUCompiler v0.10.0
[a98d9a8b] Interpolations v0.13.5
[3587e190] InverseFunctions v0.1.2
[92d709cd] IrrationalConstants v0.1.1
[692b3bcd] JLLWrappers v1.4.1
[929cbde3] LLVM v3.9.0
[2ab3a3ac] LogExpFunctions v0.3.6
[1914dd2f] MacroTools v0.5.9
[c03570c3] Memoize v0.4.4
[872c559c] NNlib v0.7.34
[77ba4419] NaNMath v0.3.7
[6fe1bfb0] OffsetArrays v1.10.8
[bac558e1] OrderedCollections v1.4.1
[21216c6a] Preferences v1.2.3
[c84ed2f1] Ratios v0.4.2
[189a3867] Reexport v0.2.0
[ae029012] Requires v1.3.0
[6c6a2e73] Scratch v1.1.0
[276daf66] SpecialFunctions v2.1.2
[90137ffa] StaticArrays v1.3.4
[a759f4b9] TimerOutputs v0.5.15
[efce3f68] WoodburyMatrices v0.5.5
[f5851436] FFTW_jll v3.3.10+0
[1d5cc7b8] IntelOpenMP_jll v2018.0.3+2
[856f044c] MKL_jll v2021.1.1+2
[efe28fd5] OpenSpecFun_jll v0.5.5+0
[0dad84c5] ArgTools @stdlib/ArgTools
[56f22d72] Artifacts @stdlib/Artifacts
[2a0f44e3] Base64 @stdlib/Base64
[ade2ca70] Dates @stdlib/Dates
[8bb1440f] DelimitedFiles @stdlib/DelimitedFiles
[8ba89e20] Distributed @stdlib/Distributed
[f43a241f] Downloads @stdlib/Downloads
[b77e0a4c] InteractiveUtils @stdlib/InteractiveUtils
[4af54fe1] LazyArtifacts @stdlib/LazyArtifacts
[b27032c2] LibCURL @stdlib/LibCURL
[76f85450] LibGit2 @stdlib/LibGit2
[8f399da3] Libdl @stdlib/Libdl
[37e2e46d] LinearAlgebra @stdlib/LinearAlgebra
[56ddb016] Logging @stdlib/Logging
[d6f4376e] Markdown @stdlib/Markdown
[a63ad114] Mmap @stdlib/Mmap
[ca575930] NetworkOptions @stdlib/NetworkOptions
[44cfe95a] Pkg @stdlib/Pkg
[de0858da] Printf @stdlib/Printf
[3fa0cd96] REPL @stdlib/REPL
[9a3f8284] Random @stdlib/Random
[ea8e919c] SHA @stdlib/SHA
[9e88b42a] Serialization @stdlib/Serialization
[1a1011a3] SharedArrays @stdlib/SharedArrays
[6462fe0b] Sockets @stdlib/Sockets
[2f01184e] SparseArrays @stdlib/SparseArrays
[10745b16] Statistics @stdlib/Statistics
[fa267f1f] TOML @stdlib/TOML
[a4e569a6] Tar @stdlib/Tar
[8dfed614] Test @stdlib/Test
[cf7118a7] UUIDs @stdlib/UUIDs
[4ec0a83e] Unicode @stdlib/Unicode
[e66e0078] CompilerSupportLibraries_jll @stdlib/CompilerSupportLibraries_jll
[deac9b47] LibCURL_jll @stdlib/LibCURL_jll
[29816b5a] LibSSH2_jll @stdlib/LibSSH2_jll
[c8ffd9c3] MbedTLS_jll @stdlib/MbedTLS_jll
[14a3606d] MozillaCACerts_jll @stdlib/MozillaCACerts_jll
[05823500] OpenLibm_jll @stdlib/OpenLibm_jll
[83775a58] Zlib_jll @stdlib/Zlib_jll
[8e850ede] nghttp2_jll @stdlib/nghttp2_jll
[3f19e933] p7zip_jll @stdlib/p7zip_jll
Precompiling project...
✓ OpenLibm_jll
✓ CommonSubexpressions
✓ DiffResults
✓ SpecialFunctions
✓ DiffRules
✓ ForwardDiff
6 dependencies successfully precompiled in 9 seconds (44 already precompiled)
Testing Running tests...
ERROR: LoadError: LoadError: UndefVarError: parameters not defined
Stacktrace:
[1] call!(builder::LLVM.Builder, rt::GPUCompiler.Runtime.RuntimeMethodInstance, args::Vector{LLVM.ConstantExpr})
@ GPUCompiler C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\rtlib.jl:57
[2] emit_exception!(builder::LLVM.Builder, name::String, inst::LLVM.CallInst)
@ GPUCompiler C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\irgen.jl:262
[3] macro expansion
@ C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\irgen.jl:212 [inlined]
[4] macro expansion
@ C:\Users\Evgeny.julia\packages\TimerOutputs\5tW2E\src\TimerOutput.jl:252 [inlined]
[5] lower_throw!(mod::LLVM.Module)
@ GPUCompiler C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\irgen.jl:173
[6] module_pass_callback(ptr::Ptr{Nothing}, data::Ptr{Nothing})
@ LLVM C:\Users\Evgeny.julia\packages\LLVM\srSVa\src\pass.jl:21
[7] macro expansion
@ C:\Users\Evgeny.julia\packages\LLVM\srSVa\src\util.jl:85 [inlined]
[8] LLVMRunPassManager
@ C:\Users\Evgeny.julia\packages\LLVM\srSVa\lib\11\libLLVM_h.jl:4707 [inlined]
[9] run!
@ C:\Users\Evgeny.julia\packages\LLVM\srSVa\src\passmanager.jl:39 [inlined]
[10] (::GPUCompiler.var"#51#53"{GPUCompiler.CompilerJob{GPUCompiler.PTXCompilerTarget, CUDA.CUDACompilerParams, GPUCompiler.FunctionSpec{typeof(GPUCompiler.Runtime.box_bool), Tuple{Bool}}}, LLVM.Module})(pm::LLVM.ModulePassManager)
@ GPUCompiler C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\irgen.jl:82
[11] LLVM.ModulePassManager(::GPUCompiler.var"#51#53"{GPUCompiler.CompilerJob{GPUCompiler.PTXCompilerTarget, CUDA.CUDACompilerParams, GPUCompiler.FunctionSpec{typeof(GPUCompiler.Runtime.box_bool), Tuple{Bool}}}, LLVM.Module})
@ LLVM C:\Users\Evgeny.julia\packages\LLVM\srSVa\src\passmanager.jl:33
[12] macro expansion
@ C:\Users\Evgeny.julia\packages\TimerOutputs\5tW2E\src\TimerOutput.jl:252 [inlined]
[13] irgen(job::GPUCompiler.CompilerJob, method_instance::Core.MethodInstance, world::UInt64)
@ GPUCompiler C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\irgen.jl:65
[14] macro expansion
@ C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\driver.jl:130 [inlined]
[15] macro expansion
@ C:\Users\Evgeny.julia\packages\TimerOutputs\5tW2E\src\TimerOutput.jl:252 [inlined]
[16] macro expansion
@ C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\driver.jl:129 [inlined]

[17] emit_llvm(job::GPUCompiler.CompilerJob, method_instance::Any, world::UInt64; libraries::Bool, deferred_codegen::Bool, optimize::Bool, only_entry::Bool)
@ GPUCompiler C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\utils.jl:62
[18] codegen(output::Symbol, job::GPUCompiler.CompilerJob; libraries::Bool, deferred_codegen::Bool, optimize::Bool, strip::Bool, validate::Bool, only_entry::Bool)
@ GPUCompiler C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\driver.jl:55
[19] emit_function!(mod::LLVM.Module, job::GPUCompiler.CompilerJob, f::Function, method::GPUCompiler.Runtime.RuntimeMethodInstance)
@ GPUCompiler C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\rtlib.jl:76
[20] build_runtime(job::GPUCompiler.CompilerJob, ctx::LLVM.Context)
@ GPUCompiler C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\rtlib.jl:126
[21] load_runtime(job::GPUCompiler.CompilerJob, ctx::LLVM.Context)
@ GPUCompiler C:\Users\Evgeny.julia\packages\GPUCompiler\XwWPj\src\rtlib.jl:174
[22] (::CUDA.var"#186#188"{Set{VersionNumber}, CUDA.CUDACompilerParams, GPUCompiler.FunctionSpec{CUDA.var"#185#187", Tuple{}}})(ctx::LLVM.Context)
@ CUDA C:\Users\Evgeny.julia\packages\CUDA\M4jkK\src\device\runtime.jl:21
[23] LLVM.Context(f::CUDA.var"#186#188"{Set{VersionNumber}, CUDA.CUDACompilerParams, GPUCompiler.FunctionSpec{CUDA.var"#185#187", Tuple{}}})
@ LLVM C:\Users\Evgeny.julia\packages\LLVM\srSVa\src\core\context.jl:22
[24] JuliaContext
@ C:\Users\Evgeny.julia\packages\LLVM\srSVa\src\interop\base.jl:29 [inlined]
[25] precompile_runtime
@ C:\Users\Evgeny.julia\packages\CUDA\M4jkK\src\device\runtime.jl:15 [inlined]
[26] precompile_runtime()
@ CUDA C:\Users\Evgeny.julia\packages\CUDA\M4jkK\src\device\runtime.jl:13
[27] top-level scope
@ C:\Users\Evgeny.julia\packages\CUDA\M4jkK\test\setup.jl:23
[28] include(fname::String)
@ Base.MainInclude .\client.jl:444
[29] top-level scope
@ C:\Users\Evgeny.julia\packages\CUDA\M4jkK\test\runtests.jl:51
[30] include(fname::String)
@ Base.MainInclude .\client.jl:444
[31] top-level scope
@ none:6
in expression starting at C:\Users\Evgeny.julia\packages\CUDA\M4jkK\test\setup.jl:23
in expression starting at C:\Users\Evgeny.julia\packages\CUDA\M4jkK\test\runtests.jl:51

Package CUDA errored during testing

@prog900 prog900 added the bug Something isn't working label Feb 14, 2022
@maleadt
Copy link
Member

maleadt commented Feb 14, 2022

You're using old packages, this has long been fixed: JuliaGPU/GPUCompiler.jl#214

@maleadt maleadt closed this as completed Feb 14, 2022
@stmorgenstern
Copy link

@maleadt Currently having this same issue. ExprTools and LLVM are updated (double and triple-checked this). Should I just delete project.toml & manifest.toml, or do I need a full Julia reinstall?

@prog900
Copy link
Author

prog900 commented Apr 23, 2022

@stmorgenstern> @maleadt Currently having this same issue. ExprTools and LLVM are updated (double and triple-checked this). Should I just delete project.toml & manifest.toml, or do I need a full Julia reinstall? I got this error when i installed both ArrayFire.jl and CUDA.jl libraries.
ArrayFire.jl does not allow updating CUDA.jl modules.
you need to remove other libraries that work with GPU. or configure the 2 different environments.
after that update CUDA.jl via update command

@maleadt
Copy link
Member

maleadt commented Apr 25, 2022

Reinstalling Julia won't help. Verify that you're running the latest version of LLVM.jl using ] st -m, just running up doesn't suffice as the update might be held back by some dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants