diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0e08c74..8c5b8c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,19 +4,19 @@ stages: # This job tests DFTK.jl with Julia 1.9 on Noctua 2 # It only runs when: # - Commit in master -# - PR from branch with name ending in "gpu" +# - PR from branch with name ending in 'gpu' # - Manual run triggered julia/1.9-n2: stage: test variables: - SCHEDULER_PARAMETERS: "-N 1 -n 1 -c 16 --gres=gpu:a100:1 --qos=devel -p dgx -t 00:20:00 -A hpc-prf-dftkjl" - JULIA_DEPOT_PATH: "/scratch/hpc-prf-dftkjl/dftkjl01/.julia-ci" - JULIA_NUM_THREADS: "1" # GPU and multi-threading not yet compatible + SCHEDULER_PARAMETERS: -N 1 -n 1 -c 16 --gres=gpu:a100:1 --qos=devel -p dgx -t 01:30:00 -A hpc-prf-dftkjl + JULIA_DEPOT_PATH: /scratch/hpc-prf-dftkjl/dftkjl01/.julia-ci + JULIA_NUM_THREADS: 1 # GPU and multi-threading not yet compatible coverage: '/\(\d+.\d+\%\) covered/' rules: - - if: $CI_COMMIT_BRANCH == "master" - - if: $CI_PIPELINE_SOURCE == "external_pull_request_event" && $CI_EXTERNAL_PULL_REQUEST_SOURCE_BRANCH_NAME =~ /gpu$/ - - if: $CI_PIPELINE_SOURCE == "external_pull_request_event" + - if: $CI_COMMIT_BRANCH == 'master' + - if: $CI_PIPELINE_SOURCE == 'external_pull_request_event' && $CI_EXTERNAL_PULL_REQUEST_SOURCE_BRANCH_NAME =~ /gpu$/ + - if: $CI_PIPELINE_SOURCE == 'external_pull_request_event' when: manual script: - module load lang/JuliaHPC/1.9.3-foss-2022a-CUDA-11.7.0 @@ -24,7 +24,7 @@ julia/1.9-n2: using Pkg; Pkg.instantiate(); Pkg.add("CUDA"); using CUDA; - CUDA.set_runtime_version!(v"11.7"; local_toolkit=true) + CUDA.set_runtime_version!(v"11.7"; local_toolkit=true); ' - julia --color=yes --project=. -e ' using Pkg; diff --git a/Project.toml b/Project.toml index 0f24f2f..7b28934 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ authors = ["Jason Eu ", "Michael F. Herbst "] name = "Libxc" uuid = "66e17ffc-8502-11e9-23b5-c9248d0eb96d" -version = "0.3.17" +version = "0.3.18" [compat] CUDA = "5" diff --git a/src/evaluate.jl b/src/evaluate.jl index ac933bd..9862a78 100644 --- a/src/evaluate.jl +++ b/src/evaluate.jl @@ -30,8 +30,8 @@ const ARGUMENTS = Dict( # Hybrid or not, the arguments are the same ARGUMENTS[:hyb_lda] = ARGUMENTS[:lda] -ARGUMENTS[:hyb_gga] = ARGUMENTS[:lda] -ARGUMENTS[:hyb_mgga] = ARGUMENTS[:lda] +ARGUMENTS[:hyb_gga] = ARGUMENTS[:gga] +ARGUMENTS[:hyb_mgga] = ARGUMENTS[:mgga] const INPUT = Dict( :lda => [:rho], diff --git a/test/cpu.jl b/test/cpu.jl index 03d5098..7429d17 100644 --- a/test/cpu.jl +++ b/test/cpu.jl @@ -8,13 +8,13 @@ using Libxc # LDA lda_x = Functional(:lda_x) - result = evaluate(lda_x, rho=rho, derivatives=0).zk - @test result ≈ [-0.342809, -0.431912, -0.494416, -0.544175, -0.586194] atol=1e-5 + result = evaluate(lda_x, rho=rho, derivatives=0:1) + @test result.zk ≈ [-0.342809, -0.431912, -0.494416, -0.544175, -0.586194] atol=1e-5 # GGA gga_x = Functional(:gga_x_pbe) - result = evaluate(gga_x, rho=rho, sigma=sigma, derivatives=0).zk - @test result ≈ [-0.452598, -0.478878, -0.520674, -0.561428, -0.598661] atol=1e-5 + result = evaluate(gga_x, rho=rho, sigma=sigma, derivatives=0:1) + @test result.zk ≈ [-0.452598, -0.478878, -0.520674, -0.561428, -0.598661] atol=1e-5 end @testset "Hybrid LDA and Hybrid GGA evaluate" begin @@ -24,13 +24,13 @@ end # LDA hyb_lda_xc = Functional(:hyb_lda_xc_bn05) - result = evaluate(hyb_lda_xc, rho=rho, derivatives=0).zk - @test result ≈ [-0.162837, -0.234719, -0.286980, -0.329442, -0.365816] atol=1e-5 + result = evaluate(hyb_lda_xc, rho=rho, derivatives=0:1) + @test result.zk ≈ [-0.162837, -0.234719, -0.286980, -0.329442, -0.365816] atol=1e-5 # GGA gga_x = Functional(:hyb_gga_x_s12h) - result = evaluate(gga_x, rho=rho, sigma=sigma, derivatives=0).zk - @test result ≈ [-0.350425, -0.362603, -0.389472, -0.421598, -0.452075] atol=1e-5 + result = evaluate(gga_x, rho=rho, sigma=sigma, derivatives=0:1) + @test result.zk ≈ [-0.350425, -0.362603, -0.389472, -0.421598, -0.452075] atol=1e-5 end @testset "LDA and GGA evaluate!" begin