Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ events.*.edf

# Build directories
build/

# Julia manifests
Manifest.toml
Manifest-v*.toml
5 changes: 5 additions & 0 deletions Julia/vec_add/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"

[compat]
AMDGPU = "2"
8 changes: 4 additions & 4 deletions Julia/vec_add/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ 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

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!`
17 changes: 7 additions & 10 deletions tests/julia_gpu_oceananigans.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"