-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ITK_GLOBAL_NUMBER_OF_THREADS is ignored #390
Comments
I think setting it in the console should work fine. See this old thread for
some tests I ran long time ago.
dorianps/LESYMAP#15
…On Tue, Jan 23, 2024, 7:54 PM muratmaga ***@***.***> wrote:
I am trying to do measure performance scaling for a project and this code
executes pretty much the same amount of time regardless of what I set the
ITK_GLOBAL_NUMBER_OF_THREADS to. I tried setting in R with Sys.setenv and
also in shell prior to starting R. Both had no effect
fi <- antsImageRead(getANTsRData("r16") ) %>% resampleImage(., c(1024, 1024), useVoxels = TRUE)mi <- antsImageRead(getANTsRData("r64") ) %>% resampleImage(., c(1024, 1024), useVoxels = TRUE)
f=function(X) {
antsRegistration(fi, mi, "SyNOnly",
synMetric="CC",
synSampling=4, synits="0x0x0x1000",
smoothingsigmas="3x2x1x0"
shrinkfactors="4x3x2x1")
}
cores=c(64, 32, 16, 8, 4)
time=NULLfor (i in cores){
Sys.setenv(ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=i)tt=Sys.time()
f(i)time=rbind(time, cbind(i, Sys.time()-tt))
}
This is not a big deal for me, as I typically prefer to use the full
number of cores. I wanted to let people now.
—
Reply to this email directly, view it on GitHub
<#390>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFJU7MYJ4OIAHXTJR5XCODYQBLSTAVCNFSM6AAAAABCH5BZNKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA4TOMRRHE4DKMY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks. I retried with the using the terminal window in the Rstudio, and yes setting the variable prior to starting R works. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to do measure performance scaling for a project and this code executes pretty much the same amount of time regardless of what I set the ITK_GLOBAL_NUMBER_OF_THREADS to. I tried setting in R with Sys.setenv and also in shell prior to starting R. Both had no effect
This is not a big deal for me, as I typically prefer to use the full number of cores. I wanted to let people now.
The text was updated successfully, but these errors were encountered: