-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
116 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
ClimaComms.jl Release Notes | ||
======================== | ||
|
||
v0.6.0 | ||
------- | ||
|
||
- ![][badge-💥breaking] `ClimaComms` does no longer try to guess the correct | ||
compute device: the default is now CPU. To control which device to use, | ||
use the `CLIMACOMMS_DEVICE` environment variable. | ||
- ![][badge-💥breaking] `CUDA` and `MPI` are now extensions in `ClimaComms`. To | ||
use `CUDA`/`MPI`, `CUDA.jl`/`MPI.jl` have to be loaded. A convenience macro | ||
`ClimaComms.@import_required_backends` checks what device/context could be | ||
used and conditionally loads `CUDA.jl`/`MPI.jl`. It is recommended to change | ||
```julia | ||
import ClimaComms | ||
``` | ||
to | ||
```julia | ||
import ClimaComms | ||
ClimaComms.@import_required_backends | ||
``` | ||
This has to be done before calling `ClimaComms.context()`. | ||
|
||
[badge-💥breaking]: https://img.shields.io/badge/💥BREAKING-red.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
export import_required_backends | ||
|
||
function mpi_required() | ||
return context_type() == :MPICommsContext | ||
end | ||
|
||
function cuda_required() | ||
return device() isa CUDADevice | ||
end | ||
|
||
""" | ||
ClimaComms.@import_required_backends | ||
If the desired context is MPI (as determined by `ClimaComms.context()`), try loading MPI.jl. | ||
If the desired device is CUDA (as determined by `ClimaComms.device()`), try loading CUDA.jl. | ||
""" | ||
macro import_required_backends() | ||
return quote | ||
@static if $mpi_required() | ||
try | ||
import MPI | ||
catch | ||
error( | ||
"Cannot load MPI.jl. Make sure it is included in your environment stack.", | ||
) | ||
end | ||
end | ||
@static if $cuda_required() | ||
try | ||
import CUDA | ||
catch | ||
error( | ||
"Cannot load CUDA.jl. Make sure it is included in your environment stack.", | ||
) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters