Serving the Quantitative Finance Community

 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Looking for hardware recommendations

August 3rd, 2017, 3:14 pm

Billy,
We were here in Donegal 2 weeks ago, 27 degrees. You can fly in your 2-seater, park it and 5  minutes later go for a dip. Then you miss all those ryanair tourists.

Europe is krazee in August.

Image
 
User avatar
Billy7
Posts: 262
Joined: March 30th, 2016, 2:12 pm

Re: Looking for hardware recommendations

August 3rd, 2017, 10:59 pm

That seems like a good adventure...Do you fly? 
I'm not there yet though, I just drive to the beaches in my old Renaut Clio! Or occasionally rent a boat. But I'm lucky enough to live in a country with huge shoreline, so finding a beach with no mass tourism is not a big problem.
 
User avatar
Billy7
Posts: 262
Joined: March 30th, 2016, 2:12 pm

Re: Looking for hardware recommendations

August 3rd, 2017, 11:05 pm

To outrun:

Well I didn't bring any code with me on my laptop so that I can switch off on holidays, but since you posted some I couldn't resist trying it, that geek in me...
It's a 2 physical - 4 logical core CPU (i5-5200U), but the BIOS option to turn OFF HT is locked, so I can only run your test with HT ON.
It's Windows 10 and I compiled it with with VS2015. I only tried your test up to the 4 available hardware threads, repeated 32 times as your code has it and picked the min, so here you go: 

NoThreads    Time in microsecs
1                    1085420
2                     584667
3                     484993
4                     420278

Comparing the results for 1 and 4, we see that the HT gain is 29%, pretty much as expected. Not sure why you get 10%, but we must find out! Is it Linux vs Windows? Is it that dual CPU setup? Is it the compiler? Again, I suspect he dual CPU thing,but it may be something else.
Comparing the results for 2 and 4 (as was that test of yours from years ago), would make us believe the HT gain is 39%, which it isn't. Using 2 of the 4 available threads seems to not do as well as using two physical cores with one thread each (that is it doesn't halve the time of 1), as I had found before on my desktop too. Moreover, that timing for 2 threads is by far the most volatile of the four in those 32 retries.
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: Looking for hardware recommendations

August 4th, 2017, 12:20 am

Sorry for cutting in again. A naive question 1): isn't hyper-threading an inferior option to two proper cores? Does it affect in any way single-core operation performance? 2) For a quad-channel controller, is there any difference between 8 memory sticks 16 GB each and 4 memory sticks 32GB each (the option I've never seen tested so I decided for the first one) ?

Anyway, I've ordered Intel i9-7900X (14nm Skylake-X), because it significantly outscores Razen in practically all relevant to me benchmarks, Asus X299 TUF Mark 1, 8 x 16GB Corsair DDR4 3200MHz RAM, Samsung 960 Pro 512GB SSD (transfer 32GB/s - it's on PCIe bus; with hardware encryption); Corsair PSU... and Oculus Rift :-(
1) yes inferior, ..but you get it for free.. On my machine it doesn't affect single-core operation..
2) *maybe* 8x16 has more bandwidth? But I doubt it..
Congratulations!!

edit: that "hardware encryption" is that EAS instructions? It can be used for fast random number generation.

"GCC 4.6+ and Clang 3.2+ provide intrinsic functions for RdRand when -mrdrnd is specified in the flags"
I would hope it's a hardware encryption. It will probably be too slow for Monte Carlo computations, won't it? Still, good point, it will be fun to compare the results for one run.
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Looking for hardware recommendations

August 4th, 2017, 6:53 am

That seems like a good adventure...Do you fly? 
I'm not there yet though, I just drive to the beaches in my old Renaut Clio! Or occasionally rent a boat. But I'm lucky enough to live in a country with huge shoreline, so finding a beach with no mass tourism is not a big problem.
No; I once had a flying lesson in a very small plane but my 6-year son at the time sitting behind me got sick and I had to land quickly. That cured me :)
We had 2 days of sunshine, then 2 weeks rain...

1995 was a very good summer, it did not rain for 2 months. 1976 was also a good year as well

http://www.rte.ie/archives/2015/0730/71 ... r-ireland/
 
User avatar
Billy7
Posts: 262
Joined: March 30th, 2016, 2:12 pm

Re: Looking for hardware recommendations

August 5th, 2017, 12:40 am

OK, so back at base for a day or two so I tried outrun's test on my Windows 7, 4 physical, 8 logical core desktop.
This time to my surprise I got a 42% speed up with HT!

Image

But...as soon as I changed the code to have it generating and summing normal variates instead (using std::normal_distribution), the speedup went down to 29-30% again.
So I don't know, maybe a case of what fits in the CPU cache? Maybe just in very "easy" tasks it can break 30%, but for most practical tasks probably not?
 
User avatar
Billy7
Posts: 262
Joined: March 30th, 2016, 2:12 pm

Re: Looking for hardware recommendations

August 5th, 2017, 12:47 am

1995 was a very good summer, it did not rain for 2 months. 1976 was also a good year as well
I actually remember that 1995 summer... I spent it studying in London and it fooled me into believing that London actually has an unfair bad rep for its weather!
That made me stay there, only to be disappointed with every subsequent summer after that...
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: Looking for hardware recommendations

August 8th, 2017, 10:12 pm

All work and no gaming make Jill a mean girl :-) (my new workstation components and Oculus Rift :-D)
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Looking for hardware recommendations

August 8th, 2017, 10:21 pm

On second thought I prefer you send me *that* instead of the taco-sauce!
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Re: Looking for hardware recommendations

August 8th, 2017, 10:33 pm

All work and no gaming make Jill a mean girl :-) (my new workstation components and Oculus Rift :-D)
Congrats & have fun!
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: Looking for hardware recommendations

August 8th, 2017, 10:36 pm

Thanks!
On second thought I prefer you send me *that* instead of the taco-sauce!
Salsa Lizano is not some lousy taco sauce! Anyway, when you are in London, feel welcome to come for some gallo pinto and VR gaming :-)
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Looking for hardware recommendations

August 8th, 2017, 10:41 pm

Thanks!
On second thought I prefer you send me *that* instead of the taco-sauce!
Salsa Lizano is not some lousy taco sauce! Anyway, when you are in London, feel welcome to come for some gallo pinto and VR gaming :-)
I know, I was just teasing (probably emotional because of this post). Thanks for the invitation, I'm probably in London in a couple of months! I'll bring catnip :-)
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: Looking for hardware recommendations

August 10th, 2017, 1:55 am

IMG_0444.JPG
Image

Am i spamming already? :-D
My simulations run like freaking 5 x faster, not to mention the 10 cores. And I thought nothing can move me anymore (the last invention that gave me butterflies was electronic paper), but Oculus Rift experience is amazing. The immersion is so deep that when my husband approached and embraced me when I was configuring something in VR, I turned my head to him and panicked that I couldn't see him :-D
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Looking for hardware recommendations

August 17th, 2017, 9:00 am

Also, I don't think that the threading software should affect things substantially, but who knows. I use OpenMP.

OMP is very easy to use but it gives you little control over scheduling. I did an experiment on pricing 4 options using Monte Carlo just to see how it compares:

1.sequential 1 time unit (normalised)
2. OMP sections 0.9 (don't understand why..)
3. OMP loop parallel ~ 0.48 (the fastest of them all in this case).
4. C++11 threads 0.5
5. C++11 futures 0.5
6. PPL task 0.5

I don't understand why option 2 is so bad (OpenMP 2.0). But OMP is a bit old-fashioned? It doesn't scale well. And PPL is easier IMO

https://msdn.microsoft.com/en-us/library/dd492418.aspx
 
User avatar
Billy7
Posts: 262
Joined: March 30th, 2016, 2:12 pm

Re: Looking for hardware recommendations

August 18th, 2017, 2:56 pm

I always go for the simplest solution if it allows me to do what I want to do. So far I haven't faced a situation where I needed more control over scheduling than OMP gave me, though I'm sure there some. So yeah, that'd be my first choice. Old-fashioned? I don't know about that. I often see people jump on the newest technology wagon just for the sake of it it seems. At the end of the day choose whatever you like, going parallel with any solution will so significantly improve the performance, that slight differences between OMP performance and C++ 11 threads will be inconsequential. The parallel algo itself is more important. I don't know about PPL, but "easier" than OMP? How is that possible?! And OMP doesn't scale well? Could you please expand on that a little?