Timeline for How to get KernelID in from KernelObject?
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 25, 2020 at 6:00 | history | tweeted | twitter.com/StackMma/status/1220949536811749376 | ||
Jan 24, 2020 at 20:41 | comment | added | Szabolcs | I deleted my comment. I misunderstood what you said in the original version of the question. Sorry. | |
Jan 24, 2020 at 18:21 | vote | accept | user5601 | ||
Jan 24, 2020 at 17:40 | answer | added | Carl Woll | timeline score: 3 | |
Jan 24, 2020 at 17:27 | comment | added | user5601 | @user6014 the function I'm writing doesn't actually launch the kernels but uses ambient ones | |
Jan 24, 2020 at 17:19 | history | edited | user5601 | CC BY-SA 4.0 |
added 329 characters in body; edited title
|
Jan 24, 2020 at 17:07 | comment | added | user5601 | That won't always give the same values {3, 1, 2}, {2, 3, 1}, ... | |
Jan 24, 2020 at 4:18 | comment | added | Rolf Mertig |
Would 1 + Mod[$KernelID - 1, $KernelCount] do what you want? I.e., ParallelEvaluate[1 + Mod[$KernelID - 1, $KernelCount]] always gives, e.g., on a 4-core machine, {1,2,3,4} ?
|
|
Jan 23, 2020 at 20:29 | comment | added | ktm |
What if you kept a variable where you stored the output of LaunchKernels , and referenced the kernels by their index (1-4) in that variable? I am sure there are practical, low-level reasons why the kernels continue to increment.
|
|
Jan 23, 2020 at 19:38 | history | asked | user5601 | CC BY-SA 4.0 |