Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 21 14:55
    jgottschlich-intel added as member
  • Apr 21 14:55
    jgottschlich-intel added as member
  • Apr 21 14:55
    kpamnany added as member
  • Apr 21 14:55
    jgottschlich-intel added as member
  • Apr 21 14:55
    kpamnany added as member
  • Apr 21 14:55
    kpamnany added as member
  • Mar 04 2021 11:26
    timholy commented #160
  • Mar 04 2021 07:53
    tjaeuth commented #160
  • Feb 14 2020 13:06
    ViralBShah removed as member
  • Feb 14 2020 13:06
    ViralBShah removed as member
  • Feb 14 2020 13:06
    ViralBShah removed as member
  • Oct 09 2019 08:33
    KristofferC closed #161
  • Oct 09 2019 08:28
    KristofferC closed #2
  • Oct 09 2019 08:28
    KristofferC closed #2
  • Sep 04 2019 18:14
    KristofferC opened #161
  • Sep 04 2019 15:28
    KristofferC opened #2
  • Sep 04 2019 15:28
    KristofferC opened #2
  • Jun 01 2019 12:21
    timholy commented #160
  • Jun 01 2019 05:05
    javadba opened #160
  • Sep 12 2018 21:30
    NaelsonDouglas opened #159
f
@f_kazemian_twitter
for the second one I got more memory allocation and more time
I'm sorry Ican't understand
at firs I add this package:
Pkg.add("ParallelAccelerator")
and then I wrote that code I just sent it here
and then I got that result that I sent
Christopher Rackauckas
@ChrisRackauckas
running time how many times?
f
@f_kazemian_twitter
one time
Christopher Rackauckas
@ChrisRackauckas
we've gone over this
time it twice.
f
@f_kazemian_twitter
If I run it for twice the first one is also better than the second one
It's not fair we can run it twice but the first one is important
you mean parallel accelerator has good spead up for twice run?
Christopher Rackauckas
@ChrisRackauckas
it always works by compiling the first time
it is fair to time it without timing compilation which is unrelated to the actual performance.
f
@f_kazemian_twitter
Actually I want to know why using @acc doesn't improve the running time?
Christopher Rackauckas
@ChrisRackauckas
because in this case it isn't doing anything
it speeds up vectorized functions
this function isn't vectorized at all
f
@f_kazemian_twitter
can we use @acc and @parallel together?
Christopher Rackauckas
@ChrisRackauckas
of course, but I wouldn't put multiple processes on the same machine though
ParallelAccelerator should be pretty efficient for shared memory.
f
@f_kazemian_twitter
I think it's not correct
Christopher Rackauckas
@ChrisRackauckas
it is...?
f
@f_kazemian_twitter
I use the main example in that link you just sent to me
yes the last sentences of you is correct
another thing is not correct
I mean
I use this:
f(x)=x.+x.*x
@acc f2(x)=x.+x.*x
@time f([1,2,3,4,5])
is 0.020449
but
@time f2([1,2,3,4,5]) is 14.322378
it their example
Christopher Rackauckas
@ChrisRackauckas
julia> f(x)=x.+x.*x
f (generic function with 1 method)

julia> @time f([1,2,3,4,5])
  0.021305 seconds (24.38 k allocations: 1.195 MiB)
5-element Array{Int64,1}:
  2
  6
 12
 20
 30

julia> @time f([1,2,3,4,5])
  0.000004 seconds (6 allocations: 416 bytes)
5-element Array{Int64,1}:
  2
  6
 12
 20
 30
did you run it twice?
No
f
@f_kazemian_twitter
No
Christopher Rackauckas
@ChrisRackauckas
So your timings don't mean anything.
f
@f_kazemian_twitter
of course if I run the both code
I can get this
@time f([1,2,3,4,5]) is 0.000004
and @time f2([1,2,3,4,5]) is 0.000109
why f2 is worse than f?
I mean It's their example
I think parallelaccelerator is not good
Christopher Rackauckas
@ChrisRackauckas
because you're probably are multithreading a computation which only has length 5?