diff --git a/.gitignore b/.gitignore index 29e447bb..11677baa 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,7 @@ events.*.edf # Build directories build/ + +# Julia manifests +Manifest.toml +Manifest-v*.toml diff --git a/Julia/vec_add/Project.toml b/Julia/vec_add/Project.toml new file mode 100644 index 00000000..e0f06cd5 --- /dev/null +++ b/Julia/vec_add/Project.toml @@ -0,0 +1,5 @@ +[deps] +AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" + +[compat] +AMDGPU = "2" diff --git a/Julia/vec_add/README.md b/Julia/vec_add/README.md index ee939cb3..7e5d101e 100644 --- a/Julia/vec_add/README.md +++ b/Julia/vec_add/README.md @@ -10,11 +10,11 @@ If you are working on AAC6 or AAC7, make sure that a ROCm module is loaded with ```bash module load rocm ``` -Next, install the third-party `AMDGPU.jl package` and verify your GPU is detected: +Next, move to this directory, install the third-party `AMDGPU.jl` package and verify your GPU is detected: ```bash -julia -e 'using Pkg; Pkg.add("AMDGPU")' -julia -e 'using AMDGPU; AMDGPU.versioninfo()' +cd Julia/vec_add +julia --project -e 'using Pkg; Pkg.instantiate(); using AMDGPU; AMDGPU.versioninfo()' ``` ## Run @@ -22,7 +22,7 @@ julia -e 'using AMDGPU; AMDGPU.versioninfo()' With Julia and the necessary packages installed, you can now run the script with ```bash -julia vec_add.jl +julia --project vec_add.jl ``` If the scripts runs succesfully, it should output: `PASS!` diff --git a/tests/julia_gpu_oceananigans.sh b/tests/julia_gpu_oceananigans.sh index 0be5d86d..c553d996 100755 --- a/tests/julia_gpu_oceananigans.sh +++ b/tests/julia_gpu_oceananigans.sh @@ -27,15 +27,12 @@ export PATH=$PATH:"${WORK_DIR}/juliaup_install/bin" juliaup add 1.12 juliaup default 1.12 -git clone https://github.com/CliMA/Oceananigans.jl.git & -CLONE_PID=$! - -julia -e 'using Pkg; Pkg.add(["AMDGPU", "MPI", "Oceananigans", "CUDA", "FFTW", "KernelAbstractions", "SeawaterPolynomials", "OffsetArrays", "JLD2", "Adapt", "GPUArraysCore"])' - -wait $CLONE_PID -pushd Oceananigans.jl/test -julia test_amdgpu.jl -popd -rm -rf Oceananigans.jl +julia -e ' +using Pkg; +Pkg.activate(; temp=true); +Pkg.add(["AMDGPU", "MPI", "Oceananigans", "CUDA", "FFTW", "KernelAbstractions", "SeawaterPolynomials", "OffsetArrays", "JLD2", "Adapt", "GPUArraysCore"]); +using Oceananigans; +include(joinpath(pkgdir(Oceananigans, "test", "test_amdgpu.jl"))) +' export HOME="${ORIG_HOME}"