From f19f9ffc380c09e296d833378e6b60f2d90e3ffa Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Wed, 9 Oct 2024 10:30:41 -0400 Subject: [PATCH 01/27] Update Jenkins to test 1.10 and 1.11 --- jenkins/Jenkinsfile | 70 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 5ac7f6a62b..4340c03100 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -31,6 +31,30 @@ pipeline { ''' } } + stage('NDTensorsCUDAExt julia-1.11') { + options { + timeout(time: 45, unit: 'MINUTES') + } + agent { + dockerfile { + label 'gpu&&v100' + filename 'Dockerfile' + dir 'jenkins' + additionalBuildArgs '--build-arg JULIA=1.11' + args '--gpus "device=1"' + } + } + environment { + HOME = pwd(tmp:true) + OMP_NUM_THREADS = 4 + JULIA_NUM_THREADS = 4 + } + steps { + sh ''' + julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' + ''' + } + } stage('NDTensorscuTENSORExt julia-1.10') { options { timeout(time: 45, unit: 'MINUTES') @@ -55,7 +79,52 @@ pipeline { ''' } } + stage('NDTensorscuTENSORExt julia-1.11') { + options { + timeout(time: 45, unit: 'MINUTES') + } + agent { + dockerfile { + label 'gpu&&v100' + filename 'Dockerfile' + dir 'jenkins' + additionalBuildArgs '--build-arg JULIA=1.11' + args '--gpus "device=1"' + } + } + environment { + HOME = pwd(tmp:true) + OMP_NUM_THREADS = 4 + JULIA_NUM_THREADS = 4 + } + steps { + sh ''' + julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' + ''' + } + } stage('NDTensorsMetalExt Julia-1.10'){ + options { + timeout(time: 45, unit: 'MINUTES') + } + agent { + label 'm1' + } + environment{ + PATH="${env.HOME}/.juliaup/bin:${env.PATH}" + PLATFORM = 'macos' + } + steps{ + sh ''' + juliaup add 1.10 + juliaup default 1.10 + ''' + sh ''' + julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["metal"])' + ''' + } + } + stage('NDTensorsMetalExt Julia-1.11'){ options { timeout(time: 45, unit: 'MINUTES') } @@ -69,6 +138,7 @@ pipeline { steps{ sh ''' juliaup update + juliaup default release ''' sh ''' julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["metal"])' From c47968c69822d1ef3b7ee702c82e1675518ff680 Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Wed, 9 Oct 2024 10:31:03 -0400 Subject: [PATCH 02/27] Move tblis to extra because no tblis tests exist and its throwing an error --- NDTensors/test/Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NDTensors/test/Project.toml b/NDTensors/test/Project.toml index 5244d98895..15787f7fbb 100644 --- a/NDTensors/test/Project.toml +++ b/NDTensors/test/Project.toml @@ -18,7 +18,6 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StridedViews = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143" -TBLIS = "48530278-0828-4a49-9772-0f3830dfa1e9" TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" @@ -30,5 +29,6 @@ Metal = "1.1.0" [extras] AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" -Metal = "dde4c033-4e86-420c-a63e-0dd931031962" cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1" +Metal = "dde4c033-4e86-420c-a63e-0dd931031962" +TBLIS = "48530278-0828-4a49-9772-0f3830dfa1e9" From 53abec007dd158f354b6ecefa0fd97fd89ff7f9e Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Wed, 9 Oct 2024 10:34:17 -0400 Subject: [PATCH 03/27] Move 1.6 tests to 1.10 --- .github/workflows/main_test_itensors_base_macos_windows.yml | 2 +- .github/workflows/test_itensormps_ubuntu.yml | 2 +- .github/workflows/test_itensors_base_ubuntu.yml | 2 +- .github/workflows/test_ndtensors.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main_test_itensors_base_macos_windows.yml b/.github/workflows/main_test_itensors_base_macos_windows.yml index a92e581dd6..0cc10e0359 100644 --- a/.github/workflows/main_test_itensors_base_macos_windows.yml +++ b/.github/workflows/main_test_itensors_base_macos_windows.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: version: - - '1.6' + - '1.10' - '1' os: # - windows-latest # windows tests are failing for an unknow reason, disable for now diff --git a/.github/workflows/test_itensormps_ubuntu.yml b/.github/workflows/test_itensormps_ubuntu.yml index fb81c37280..8008620063 100644 --- a/.github/workflows/test_itensormps_ubuntu.yml +++ b/.github/workflows/test_itensormps_ubuntu.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: version: - - '1.6' + - '1.10' - '1' os: - ubuntu-latest diff --git a/.github/workflows/test_itensors_base_ubuntu.yml b/.github/workflows/test_itensors_base_ubuntu.yml index d185c5de56..91d300a21a 100644 --- a/.github/workflows/test_itensors_base_ubuntu.yml +++ b/.github/workflows/test_itensors_base_ubuntu.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: version: - - '1.6' + - '1.10' - '1' os: - ubuntu-latest diff --git a/.github/workflows/test_ndtensors.yml b/.github/workflows/test_ndtensors.yml index 67a46f39b0..678fb05045 100644 --- a/.github/workflows/test_ndtensors.yml +++ b/.github/workflows/test_ndtensors.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: version: - - '1.6' + - '1.10' - '1' os: - ubuntu-latest From 42d48a629a76d16dfad1d68fd753d5136c02d81a Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Wed, 9 Oct 2024 11:28:22 -0400 Subject: [PATCH 04/27] Bump Julia versions --- NDTensors/Project.toml | 2 +- Project.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NDTensors/Project.toml b/NDTensors/Project.toml index 65771b0c5a..f77c086f70 100644 --- a/NDTensors/Project.toml +++ b/NDTensors/Project.toml @@ -91,7 +91,7 @@ TimerOutputs = "0.5.5" TupleTools = "1.2.0" VectorInterface = "0.4.2" cuTENSOR = "2" -julia = "1.6" +julia = "1.10" [extras] AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" diff --git a/Project.toml b/Project.toml index 0e9b91a39e..8e94889a4b 100644 --- a/Project.toml +++ b/Project.toml @@ -73,7 +73,7 @@ TupleTools = "1.2" VectorInterface = "0.4" Zeros = "0.3.0" ZygoteRules = "0.2.2" -julia = "1.6" +julia = "1.10" [extras] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" From 08de5ec67046c85a10287609008ae1463306a8b3 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Thu, 10 Oct 2024 14:07:52 -0400 Subject: [PATCH 05/27] Skip broken BlockSparseArrays tests in Julia 1.11 --- .../lib/BlockSparseArrays/test/test_basics.jl | 51 ++++++++++++------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/NDTensors/src/lib/BlockSparseArrays/test/test_basics.jl b/NDTensors/src/lib/BlockSparseArrays/test/test_basics.jl index 10f8d6e35d..a7797766d4 100644 --- a/NDTensors/src/lib/BlockSparseArrays/test/test_basics.jl +++ b/NDTensors/src/lib/BlockSparseArrays/test/test_basics.jl @@ -597,21 +597,31 @@ include("TestBlockSparseArraysUtils.jl") c = @view b[4:8, 4:8] @test c isa SubArray{<:Any,<:Any,<:BlockSparseArray} @test size(c) == (5, 5) - @test block_nstored(c) == 2 + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test block_nstored(c) == 2 broken = VERSION > v"1.11-" @test blocksize(c) == (2, 2) @test blocklengths.(axes(c)) == ([2, 3], [2, 3]) - @test size(c[Block(1, 1)]) == (2, 2) - @test c[Block(1, 1)] == a[Block(2, 2)[2:3, 2:3]] - @test size(c[Block(2, 2)]) == (3, 3) - @test c[Block(2, 2)] == a[Block(1, 1)[1:3, 1:3]] - @test size(c[Block(2, 1)]) == (3, 2) - @test iszero(c[Block(2, 1)]) - @test size(c[Block(1, 2)]) == (2, 3) - @test iszero(c[Block(1, 2)]) + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test size(c[Block(1, 1)]) == (2, 2) broken = VERSION ≥ v"1.11-" + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test c[Block(1, 1)] == a[Block(2, 2)[2:3, 2:3]] broken = VERSION ≥ v"1.11-" + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test size(c[Block(2, 2)]) == (3, 3) broken = VERSION ≥ v"1.11-" + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test c[Block(2, 2)] == a[Block(1, 1)[1:3, 1:3]] broken = VERSION ≥ v"1.11-" + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test size(c[Block(2, 1)]) == (3, 2) broken = VERSION ≥ v"1.11-" + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test iszero(c[Block(2, 1)]) broken = VERSION ≥ v"1.11-" + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test size(c[Block(1, 2)]) == (2, 3) broken = VERSION ≥ v"1.11-" + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test iszero(c[Block(1, 2)]) broken = VERSION ≥ v"1.11-" x = randn(elt, 3, 3) c[Block(2, 2)] = x - @test c[Block(2, 2)] == x + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test c[Block(2, 2)] == x broken = VERSION ≥ v"1.11-" @test a[Block(1, 1)[1:3, 1:3]] == x a = BlockSparseArray{elt}([2, 3], [3, 4]) @@ -637,10 +647,13 @@ include("TestBlockSparseArraysUtils.jl") @test copy(b) == a @test blocksize(b) == (2, 2) @test blocklengths.(axes(b)) == ([4, 4], [4, 4]) - @test b[Block(1, 1)] == a[Block.(1:2), Block.(1:2)] - @test b[Block(2, 1)] == a[Block.(3:4), Block.(1:2)] - @test b[Block(1, 2)] == a[Block.(1:2), Block.(3:4)] - @test b[Block(2, 2)] == a[Block.(3:4), Block.(3:4)] + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + if VERSION < v"1.11-" + @test b[Block(1, 1)] == a[Block.(1:2), Block.(1:2)] + @test b[Block(2, 1)] == a[Block.(3:4), Block.(1:2)] + @test b[Block(1, 2)] == a[Block.(1:2), Block.(3:4)] + @test b[Block(2, 2)] == a[Block.(3:4), Block.(3:4)] + end c = @view b[Block(2, 2)] @test blocksize(c) == (1, 1) @test c == a[Block.(3:4), Block.(3:4)] @@ -669,13 +682,17 @@ include("TestBlockSparseArraysUtils.jl") @test copy(b) == a[J, J] @test blocksize(b) == (2, 2) @test blocklengths.(axes(b)) == ([4, 4], [4, 4]) - @test b[Block(1, 1)] == Array(a)[[7, 8, 5, 6], [7, 8, 5, 6]] + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test b[Block(1, 1)] == Array(a)[[7, 8, 5, 6], [7, 8, 5, 6]] broken = + VERSION ≥ v"1.11-" c = @views b[Block(1, 1)][2:3, 2:3] @test c == Array(a)[[8, 5], [8, 5]] - @test copy(c) == Array(a)[[8, 5], [8, 5]] + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test copy(c) == Array(a)[[8, 5], [8, 5]] broken = VERSION ≥ v"1.11-" c = @view b[Block(1, 1)[2:3, 2:3]] @test c == Array(a)[[8, 5], [8, 5]] - @test copy(c) == Array(a)[[8, 5], [8, 5]] + # TODO: Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539). + @test copy(c) == Array(a)[[8, 5], [8, 5]] broken = VERSION ≥ v"1.11-" end # TODO: Add more tests of this, it may From 6064e9d7ae1b7d87ff33e65b953a45cbde7ce21d Mon Sep 17 00:00:00 2001 From: mtfishman Date: Thu, 10 Oct 2024 14:26:40 -0400 Subject: [PATCH 06/27] Bump patch versions of NDTensors and ITensors --- NDTensors/Project.toml | 2 +- Project.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NDTensors/Project.toml b/NDTensors/Project.toml index f77c086f70..a70030e922 100644 --- a/NDTensors/Project.toml +++ b/NDTensors/Project.toml @@ -1,7 +1,7 @@ name = "NDTensors" uuid = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf" authors = ["Matthew Fishman "] -version = "0.3.43" +version = "0.3.44" [deps] Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" diff --git a/Project.toml b/Project.toml index 8e94889a4b..c9460d885e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ITensors" uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5" authors = ["Matthew Fishman ", "Miles Stoudenmire "] -version = "0.6.19" +version = "0.6.20" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" @@ -56,7 +56,7 @@ IsApprox = "0.1, 1, 2" KrylovKit = "0.4.2, 0.5, 0.6, 0.7, 0.8" LinearAlgebra = "1.6" LinearMaps = "3" -NDTensors = "0.3.34" +NDTensors = "0.3.44" Observers = "0.2" PackageCompiler = "1, 2" PackageExtensionCompat = "1" From 0516662df257c57d7d53a4b57efe5091882a381d Mon Sep 17 00:00:00 2001 From: mtfishman Date: Thu, 10 Oct 2024 14:28:07 -0400 Subject: [PATCH 07/27] Revert changing NDTensors compat entry in ITensors --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index c9460d885e..4feba3d861 100644 --- a/Project.toml +++ b/Project.toml @@ -56,7 +56,7 @@ IsApprox = "0.1, 1, 2" KrylovKit = "0.4.2, 0.5, 0.6, 0.7, 0.8" LinearAlgebra = "1.6" LinearMaps = "3" -NDTensors = "0.3.44" +NDTensors = "0.3.34" Observers = "0.2" PackageCompiler = "1, 2" PackageExtensionCompat = "1" From a2e2b5b069517cbf46e6a9e5860c689fc33d2dd9 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Thu, 10 Oct 2024 14:36:40 -0400 Subject: [PATCH 08/27] Fix ITensorMPS tests using StableRNGs --- src/lib/ITensorMPS/test/Project.toml | 1 + src/lib/ITensorMPS/test/base/Project.toml | 1 + src/lib/ITensorMPS/test/base/test_mpo.jl | 9 +++++---- test/Project.toml | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/ITensorMPS/test/Project.toml b/src/lib/ITensorMPS/test/Project.toml index 127ce9e065..7345ba4285 100644 --- a/src/lib/ITensorMPS/test/Project.toml +++ b/src/lib/ITensorMPS/test/Project.toml @@ -6,5 +6,6 @@ ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5" JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf" OptimKit = "77e91f04-9b3b-57a6-a776-40b61faaebe0" +StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" diff --git a/src/lib/ITensorMPS/test/base/Project.toml b/src/lib/ITensorMPS/test/base/Project.toml index 895d21daab..0522110b73 100644 --- a/src/lib/ITensorMPS/test/base/Project.toml +++ b/src/lib/ITensorMPS/test/base/Project.toml @@ -4,4 +4,5 @@ HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5" JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf" +StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" diff --git a/src/lib/ITensorMPS/test/base/test_mpo.jl b/src/lib/ITensorMPS/test/base/test_mpo.jl index 32746a752b..929eaa2d7b 100644 --- a/src/lib/ITensorMPS/test/base/test_mpo.jl +++ b/src/lib/ITensorMPS/test/base/test_mpo.jl @@ -2,6 +2,7 @@ using Combinatorics using ITensors using NDTensors: scalartype +using StableRNGs: StableRNG using Test include(joinpath(@__DIR__, "utils", "util.jl")) @@ -812,11 +813,11 @@ end N = 6 sites = [Index(2, "Site,n=$n") for n in 1:N] seed = 623 - mt = MersenneTwister(seed) - K = random_mps(mt, sites) + rng = StableRNG(seed) + K = random_mps(rng, sites) L = MPO(K) - result = sample(mt, L) - @test result ≈ [1, 2, 1, 1, 2, 2] + result = sample(rng, L) + @test result ≈ [1, 1, 2, 1, 1, 1] end @testset "MPO+MPO sum (directsum)" begin diff --git a/test/Project.toml b/test/Project.toml index 34fe930acb..48b6cfc79e 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -15,6 +15,7 @@ OptimKit = "77e91f04-9b3b-57a6-a776-40b61faaebe0" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8" From 97c42c487d16e47bae037bf2741850423cceb884 Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Thu, 10 Oct 2024 14:47:33 -0400 Subject: [PATCH 09/27] Update Jenkins file --- jenkins/Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 4340c03100..0164957969 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -31,7 +31,7 @@ pipeline { ''' } } - stage('NDTensorsCUDAExt julia-1.11') { + stage('NDTensorsCUDAExt julia-1') { options { timeout(time: 45, unit: 'MINUTES') } @@ -40,7 +40,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1.11' + additionalBuildArgs '--build-arg JULIA=1' args '--gpus "device=1"' } } @@ -79,7 +79,7 @@ pipeline { ''' } } - stage('NDTensorscuTENSORExt julia-1.11') { + stage('NDTensorscuTENSORExt julia-1') { options { timeout(time: 45, unit: 'MINUTES') } @@ -88,7 +88,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1.11' + additionalBuildArgs '--build-arg JULIA=1' args '--gpus "device=1"' } } @@ -124,7 +124,7 @@ pipeline { ''' } } - stage('NDTensorsMetalExt Julia-1.11'){ + stage('NDTensorsMetalExt Julia-1'){ options { timeout(time: 45, unit: 'MINUTES') } From 21b19ce13d597e0849ceb0c5d76b2bb4dbd849a4 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Thu, 10 Oct 2024 16:25:52 -0400 Subject: [PATCH 10/27] Fix GradedAxes test --- .../src/lib/LabelledNumbers/src/labelledunitrange.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/NDTensors/src/lib/LabelledNumbers/src/labelledunitrange.jl b/NDTensors/src/lib/LabelledNumbers/src/labelledunitrange.jl index 2e4379daba..a82c666987 100644 --- a/NDTensors/src/lib/LabelledNumbers/src/labelledunitrange.jl +++ b/NDTensors/src/lib/LabelledNumbers/src/labelledunitrange.jl @@ -37,6 +37,17 @@ end labelled_getindex(a, index) = labelled(unlabel(a)[index], label(a)) +# This is required in Julia 1.11 and above since +# the generic `axes(a::AbstractRange)` definition was removed +# and replace with a generic `axes(a)` definition that +# is written in terms of `Base.unchecked_oneto`, i.e.: +# ```julia +# map(Base.unchecked_oneto, size(A)) +# ``` +# which returns a `Base.OneTo` instead of a `LabelledUnitRange`. +Base.axes(a::LabelledUnitRange) = Base.oneto.(size(a)) + +# TODO: Delete this definition, this should output a `Base.OneTo`. Base.OneTo(stop::LabelledInteger) = labelled(Base.OneTo(unlabel(stop)), label(stop)) # Fix ambiguity error with `AbstractRange` definition in `Base`. From 2f4a02729ba5c758732d3ca7a78664810bd49b8a Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Thu, 10 Oct 2024 17:32:04 -0400 Subject: [PATCH 11/27] Update tests --- .../main_test_itensors_base_macos_windows.yml | 2 +- .github/workflows/test_itensormps_ubuntu.yml | 2 +- .github/workflows/test_itensors_base_ubuntu.yml | 2 +- .github/workflows/test_ndtensors.yml | 2 +- jenkins/Jenkinsfile | 14 +++++++------- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main_test_itensors_base_macos_windows.yml b/.github/workflows/main_test_itensors_base_macos_windows.yml index 0cc10e0359..f9f39d16fd 100644 --- a/.github/workflows/main_test_itensors_base_macos_windows.yml +++ b/.github/workflows/main_test_itensors_base_macos_windows.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: version: - - '1.10' + - 'lts' - '1' os: # - windows-latest # windows tests are failing for an unknow reason, disable for now diff --git a/.github/workflows/test_itensormps_ubuntu.yml b/.github/workflows/test_itensormps_ubuntu.yml index 8008620063..cf80a2a8b3 100644 --- a/.github/workflows/test_itensormps_ubuntu.yml +++ b/.github/workflows/test_itensormps_ubuntu.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: version: - - '1.10' + - 'lts' - '1' os: - ubuntu-latest diff --git a/.github/workflows/test_itensors_base_ubuntu.yml b/.github/workflows/test_itensors_base_ubuntu.yml index 91d300a21a..7004dae0f7 100644 --- a/.github/workflows/test_itensors_base_ubuntu.yml +++ b/.github/workflows/test_itensors_base_ubuntu.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: version: - - '1.10' + - 'lts' - '1' os: - ubuntu-latest diff --git a/.github/workflows/test_ndtensors.yml b/.github/workflows/test_ndtensors.yml index 678fb05045..1f3f4c8be1 100644 --- a/.github/workflows/test_ndtensors.yml +++ b/.github/workflows/test_ndtensors.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: version: - - '1.10' + - 'lts' - '1' os: - ubuntu-latest diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 0164957969..905170b561 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -7,7 +7,7 @@ pipeline { stages { stage('GPU Testing') { parallel { - stage('NDTensorsCUDAExt julia-1.10') { + stage('NDTensorsCUDAExt julia-lts') { options { timeout(time: 45, unit: 'MINUTES') } @@ -16,7 +16,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1.10' + additionalBuildArgs '--build-arg JULIA=lts' args '--gpus "device=1"' } } @@ -55,7 +55,7 @@ pipeline { ''' } } - stage('NDTensorscuTENSORExt julia-1.10') { + stage('NDTensorscuTENSORExt julia-lts') { options { timeout(time: 45, unit: 'MINUTES') } @@ -64,7 +64,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1.10' + additionalBuildArgs '--build-arg JULIA=lts' args '--gpus "device=1"' } } @@ -103,7 +103,7 @@ pipeline { ''' } } - stage('NDTensorsMetalExt Julia-1.10'){ + stage('NDTensorsMetalExt Julia-lts'){ options { timeout(time: 45, unit: 'MINUTES') } @@ -116,8 +116,8 @@ pipeline { } steps{ sh ''' - juliaup add 1.10 - juliaup default 1.10 + juliaup add lts + juliaup default lts ''' sh ''' julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["metal"])' From 55d7813693002fdede69f5098b72add063ed453f Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Thu, 10 Oct 2024 17:47:17 -0400 Subject: [PATCH 12/27] Use 1.10 instead of LTS --- jenkins/Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 905170b561..8ce5f7e020 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=lts' + additionalBuildArgs '--build-arg JULIA=1.10' args '--gpus "device=1"' } } @@ -64,7 +64,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=lts' + additionalBuildArgs '--build-arg JULIA=1.10' args '--gpus "device=1"' } } From b32cc2e02f73a86d4841eccae3f8eaec9362b8af Mon Sep 17 00:00:00 2001 From: Matt Fishman Date: Thu, 10 Oct 2024 18:51:03 -0400 Subject: [PATCH 13/27] Update jenkins/Jenkinsfile --- jenkins/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 8ce5f7e020..5e408db171 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -40,7 +40,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1' + additionalBuildArgs '--build-arg JULIA=1.11' args '--gpus "device=1"' } } From 73d432f2009d4772caf4773091269b9f5b73e230 Mon Sep 17 00:00:00 2001 From: Matt Fishman Date: Thu, 10 Oct 2024 18:54:57 -0400 Subject: [PATCH 14/27] Update jenkins/Jenkinsfile --- jenkins/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 5e408db171..c2cee573bd 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -88,7 +88,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1' + additionalBuildArgs '--build-arg JULIA=1.11' args '--gpus "device=1"' } } From 154d87fbb344da0ed406051b5690bb0ce80fe053 Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Fri, 11 Oct 2024 10:45:33 -0400 Subject: [PATCH 15/27] Try to update docker file --- jenkins/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index c677086f2f..48712a1626 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -11,6 +11,7 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -ARG JULIA=1.6 -RUN curl -s -L https://julialang-s3.julialang.org/bin/linux/x64/${JULIA}/julia-${JULIA}-latest-linux-x86_64.tar.gz | \ - tar -C /usr/local -x -z --strip-components=1 -f - +#ARG JULIA=1.6 +RUN curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local --yes && \ + juliaup add ${JULIA} && \ + juliaup default ${JULIA} From 0233c16b29446d5ed3a3ba9ae96c33f78fcacd0e Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Fri, 11 Oct 2024 10:47:13 -0400 Subject: [PATCH 16/27] Dont force juliaup to be somewhere specifically --- jenkins/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index 48712a1626..4436b428bc 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -12,6 +12,6 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* #ARG JULIA=1.6 -RUN curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local --yes && \ +RUN curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.julia --yes && \ juliaup add ${JULIA} && \ juliaup default ${JULIA} From c71c0eb72fd7cf55664e3ab9a51719b54d24f91c Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Fri, 11 Oct 2024 10:47:23 -0400 Subject: [PATCH 17/27] Missing changes --- jenkins/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index 4436b428bc..ccbb08a614 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -12,6 +12,6 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* #ARG JULIA=1.6 -RUN curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.julia --yes && \ +RUN curl -fsSL https://install.julialang.org | sh -s -- --yes && \ juliaup add ${JULIA} && \ juliaup default ${JULIA} From ff0ca592c511b398d6a70594121d05ce1b6b2fab Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Fri, 11 Oct 2024 11:23:29 -0400 Subject: [PATCH 18/27] Seperate lines and use full path to juliaup. Also export the juila path --- jenkins/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index ccbb08a614..2606d03c0d 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -12,6 +12,7 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* #ARG JULIA=1.6 -RUN curl -fsSL https://install.julialang.org | sh -s -- --yes && \ - juliaup add ${JULIA} && \ - juliaup default ${JULIA} +RUN curl -fsSL https://install.julialang.org | sh -s -- --yes +RUN /root/.juliaup/bin/juliaup add ${JULIA} && \ + /root/.juliaup/bin/juliaup default ${JULIA} +RUN export PATH=/root/.juliaup/bin/:$PATH \ No newline at end of file From 62b8d73cad929cad6b78dd02598f945fd7346ead Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Fri, 11 Oct 2024 11:25:15 -0400 Subject: [PATCH 19/27] Seperate run lines --- jenkins/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index 2606d03c0d..88e80f80e9 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -13,6 +13,6 @@ RUN apt-get update && \ #ARG JULIA=1.6 RUN curl -fsSL https://install.julialang.org | sh -s -- --yes -RUN /root/.juliaup/bin/juliaup add ${JULIA} && \ - /root/.juliaup/bin/juliaup default ${JULIA} +RUN /root/.juliaup/bin/juliaup add ${JULIA} +RUN /root/.juliaup/bin/juliaup default ${JULIA} RUN export PATH=/root/.juliaup/bin/:$PATH \ No newline at end of file From 1f26d1b25a70385ea7051aa91ffb9d1b3c4802c5 Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Fri, 11 Oct 2024 11:26:00 -0400 Subject: [PATCH 20/27] Seperate lines and add Julia argument --- jenkins/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index 88e80f80e9..f074d2291f 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -11,7 +11,7 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -#ARG JULIA=1.6 +ARG JULIA=1.6 RUN curl -fsSL https://install.julialang.org | sh -s -- --yes RUN /root/.juliaup/bin/juliaup add ${JULIA} RUN /root/.juliaup/bin/juliaup default ${JULIA} From f659b44100a64d5dc2a4525e85107099defd052e Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Fri, 11 Oct 2024 11:45:30 -0400 Subject: [PATCH 21/27] Update to jenkinsfile --- jenkins/Dockerfile | 3 +-- jenkins/Jenkinsfile | 16 ++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index f074d2291f..3ae3f221cb 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -14,5 +14,4 @@ RUN apt-get update && \ ARG JULIA=1.6 RUN curl -fsSL https://install.julialang.org | sh -s -- --yes RUN /root/.juliaup/bin/juliaup add ${JULIA} -RUN /root/.juliaup/bin/juliaup default ${JULIA} -RUN export PATH=/root/.juliaup/bin/:$PATH \ No newline at end of file +RUN /root/.juliaup/bin/juliaup default ${JULIA} \ No newline at end of file diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index c2cee573bd..12b33826aa 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1.10' + additionalBuildArgs '--build-arg JULIA=lts' args '--gpus "device=1"' } } @@ -27,7 +27,7 @@ pipeline { } steps { sh ''' - julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' + /root/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' ''' } } @@ -40,7 +40,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1.11' + additionalBuildArgs '--build-arg JULIA=1' args '--gpus "device=1"' } } @@ -51,7 +51,7 @@ pipeline { } steps { sh ''' - julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' + /root/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' ''' } } @@ -64,7 +64,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1.10' + additionalBuildArgs '--build-arg JULIA=lts' args '--gpus "device=1"' } } @@ -75,7 +75,7 @@ pipeline { } steps { sh ''' - julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' + /root/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' ''' } } @@ -88,7 +88,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1.11' + additionalBuildArgs '--build-arg JULIA=1' args '--gpus "device=1"' } } @@ -99,7 +99,7 @@ pipeline { } steps { sh ''' - julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' + /root/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' ''' } } From 9a55d6749d327dcca71349a98ff7c99dd7366dca Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Fri, 11 Oct 2024 12:09:10 -0400 Subject: [PATCH 22/27] Install to /usr/local instead of root for promission reason --- jenkins/Dockerfile | 6 +++--- jenkins/Jenkinsfile | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index 3ae3f221cb..1a6b088595 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -12,6 +12,6 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* ARG JULIA=1.6 -RUN curl -fsSL https://install.julialang.org | sh -s -- --yes -RUN /root/.juliaup/bin/juliaup add ${JULIA} -RUN /root/.juliaup/bin/juliaup default ${JULIA} \ No newline at end of file +RUN curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.juliaup --yes +RUN /usr/local/.juliaup/bin/juliaup add ${JULIA} +RUN /usr/local/.juliaup/bin/juliaup default ${JULIA} \ No newline at end of file diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 12b33826aa..dde0cfe902 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -27,7 +27,7 @@ pipeline { } steps { sh ''' - /root/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' + /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' ''' } } @@ -51,7 +51,7 @@ pipeline { } steps { sh ''' - /root/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' + /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' ''' } } @@ -75,7 +75,7 @@ pipeline { } steps { sh ''' - /root/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' + /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' ''' } } @@ -99,7 +99,7 @@ pipeline { } steps { sh ''' - /root/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' + /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' ''' } } From 145919e0d38a767675c2dcd23e44dd01670fbcc9 Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Fri, 11 Oct 2024 12:30:06 -0400 Subject: [PATCH 23/27] Add command to make sure julia version is actually compiled on docker --- jenkins/Jenkinsfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index dde0cfe902..8577243bb6 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -26,6 +26,10 @@ pipeline { JULIA_NUM_THREADS = 4 } steps { + sh ''' + /usr/local/.juliaup/bin/juliaup add lts; + /usr/local/.juliaup/bin/juliaup default lts; + ''' sh ''' /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' ''' @@ -50,6 +54,10 @@ pipeline { JULIA_NUM_THREADS = 4 } steps { + sh ''' + /usr/local/.juliaup/bin/juliaup add 1; + /usr/local/.juliaup/bin/juliaup default 1; + ''' sh ''' /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' ''' @@ -74,6 +82,10 @@ pipeline { JULIA_NUM_THREADS = 4 } steps { + sh ''' + /usr/local/.juliaup/bin/juliaup add lts; + /usr/local/.juliaup/bin/juliaup default lts; + ''' sh ''' /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' ''' @@ -98,6 +110,10 @@ pipeline { JULIA_NUM_THREADS = 4 } steps { + sh ''' + /usr/local/.juliaup/bin/juliaup add 1; + /usr/local/.juliaup/bin/juliaup default 1; + ''' sh ''' /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' ''' From f7bca6a761954a4e9dda36ab991b7aafe81cb9a9 Mon Sep 17 00:00:00 2001 From: Matt Fishman Date: Fri, 11 Oct 2024 20:21:16 -0400 Subject: [PATCH 24/27] [NDTensors] Bump to v0.3.45 --- NDTensors/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NDTensors/Project.toml b/NDTensors/Project.toml index a70030e922..513114881e 100644 --- a/NDTensors/Project.toml +++ b/NDTensors/Project.toml @@ -1,7 +1,7 @@ name = "NDTensors" uuid = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf" authors = ["Matthew Fishman "] -version = "0.3.44" +version = "0.3.45" [deps] Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" From 63ca05fd30875f1ca4ce4aadbf9999d986b118b6 Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Sat, 12 Oct 2024 13:21:31 -0400 Subject: [PATCH 25/27] Try to install juliaup in jenkins instead of docker --- jenkins/Dockerfile | 6 +----- jenkins/Jenkinsfile | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index 1a6b088595..985fc7e63d 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -10,8 +10,4 @@ RUN apt-get update && \ && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* - -ARG JULIA=1.6 -RUN curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.juliaup --yes -RUN /usr/local/.juliaup/bin/juliaup add ${JULIA} -RUN /usr/local/.juliaup/bin/juliaup default ${JULIA} \ No newline at end of file + \ No newline at end of file diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 8577243bb6..70af7cf9f0 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -27,6 +27,7 @@ pipeline { } steps { sh ''' + curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.juliaup --yes; /usr/local/.juliaup/bin/juliaup add lts; /usr/local/.juliaup/bin/juliaup default lts; ''' @@ -55,6 +56,7 @@ pipeline { } steps { sh ''' + curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.juliaup --yes; /usr/local/.juliaup/bin/juliaup add 1; /usr/local/.juliaup/bin/juliaup default 1; ''' @@ -83,6 +85,7 @@ pipeline { } steps { sh ''' + curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.juliaup --yes; /usr/local/.juliaup/bin/juliaup add lts; /usr/local/.juliaup/bin/juliaup default lts; ''' @@ -111,6 +114,7 @@ pipeline { } steps { sh ''' + curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.juliaup --yes; /usr/local/.juliaup/bin/juliaup add 1; /usr/local/.juliaup/bin/juliaup default 1; ''' From fd332dc3dfb6da1e7b32a21903c6ee3a351b8ee9 Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Sat, 12 Oct 2024 13:28:59 -0400 Subject: [PATCH 26/27] Remove julia and juliaup before going into jenkins --- jenkins/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index 985fc7e63d..56d5ded4eb 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -10,4 +10,6 @@ RUN apt-get update && \ && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* - \ No newline at end of file + +RUN rm -rf /usr/local/.juliaup +RUN rm -rf /usr/local/.julia \ No newline at end of file From cb274bd28754b0a2e16cb8f79b20f64b663b71ed Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Sat, 12 Oct 2024 13:49:39 -0400 Subject: [PATCH 27/27] Revert Docker and Jenkins files. --- jenkins/Dockerfile | 5 +++-- jenkins/Jenkinsfile | 38 +++++++++----------------------------- 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index 56d5ded4eb..e2367a8c01 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -11,5 +11,6 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -RUN rm -rf /usr/local/.juliaup -RUN rm -rf /usr/local/.julia \ No newline at end of file +ARG JULIA=1.6 +RUN curl -s -L https://julialang-s3.julialang.org/bin/linux/x64/${JULIA}/julia-${JULIA}-latest-linux-x86_64.tar.gz | \ + tar -C /usr/local -x -z --strip-components=1 -f - \ No newline at end of file diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 70af7cf9f0..4fd308d59a 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=lts' + additionalBuildArgs '--build-arg JULIA=1.10' args '--gpus "device=1"' } } @@ -27,12 +27,7 @@ pipeline { } steps { sh ''' - curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.juliaup --yes; - /usr/local/.juliaup/bin/juliaup add lts; - /usr/local/.juliaup/bin/juliaup default lts; - ''' - sh ''' - /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' + julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' ''' } } @@ -45,7 +40,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1' + additionalBuildArgs '--build-arg JULIA=1.11' args '--gpus "device=1"' } } @@ -56,12 +51,7 @@ pipeline { } steps { sh ''' - curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.juliaup --yes; - /usr/local/.juliaup/bin/juliaup add 1; - /usr/local/.juliaup/bin/juliaup default 1; - ''' - sh ''' - /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' + julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cuda"])' ''' } } @@ -74,7 +64,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=lts' + additionalBuildArgs '--build-arg JULIA=1.10' args '--gpus "device=1"' } } @@ -85,12 +75,7 @@ pipeline { } steps { sh ''' - curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.juliaup --yes; - /usr/local/.juliaup/bin/juliaup add lts; - /usr/local/.juliaup/bin/juliaup default lts; - ''' - sh ''' - /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' + julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' ''' } } @@ -103,7 +88,7 @@ pipeline { label 'gpu&&v100' filename 'Dockerfile' dir 'jenkins' - additionalBuildArgs '--build-arg JULIA=1' + additionalBuildArgs '--build-arg JULIA=1.11' args '--gpus "device=1"' } } @@ -114,12 +99,7 @@ pipeline { } steps { sh ''' - curl -fsSL https://install.julialang.org | sh -s -- --path /usr/local/.juliaup --yes; - /usr/local/.juliaup/bin/juliaup add 1; - /usr/local/.juliaup/bin/juliaup default 1; - ''' - sh ''' - /usr/local/.juliaup/bin/julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' + julia -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.test("NDTensors"; test_args=["cutensor"])' ''' } } @@ -168,4 +148,4 @@ pipeline { } } } -} +} \ No newline at end of file