-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from CliMA/ck/tests
Fix macro hygiene
- Loading branch information
Showing
3 changed files
with
27 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "ClimaComms" | ||
uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" | ||
authors = ["CliMA Contributors <[email protected]>"] | ||
version = "0.5.2" | ||
version = "0.5.3" | ||
|
||
[deps] | ||
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" | ||
|
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 |
---|---|---|
@@ -1,13 +1,20 @@ | ||
import ClimaComms as CC | ||
dev = CC.device() | ||
CC.@threaded dev for i in 1:2 | ||
1 | ||
end | ||
function test_macro_hyhiene(dev) | ||
n = 3 # tests that we can reach variables defined in scope | ||
CC.@threaded dev for i in 1:n | ||
if Threads.nthreads() > 1 | ||
@show Threads.threadid() | ||
end | ||
end | ||
|
||
CC.@time dev for i in 1:2 | ||
sin.(rand(10)) | ||
end | ||
CC.@time dev for i in 1:n | ||
sin.(rand(10)) | ||
end | ||
|
||
CC.@elapsed dev for i in 1:2 | ||
sin.(rand(10)) | ||
CC.@elapsed dev for i in 1:n | ||
sin.(rand(10)) | ||
end | ||
end | ||
dev = CC.device() | ||
|
||
test_macro_hyhiene(dev) |
5381b8a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
5381b8a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/87452
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: