![]() |
|
|
#1 |
|
∂2ω=0
Sep 2002
República de California
103·113 Posts |
Microsoft adds Linux Bash Shell and Ubuntu Binaries to Windows 10 | The Hacker News
So let's say I have some multithreaded code which is currently GCC/Posix-builds-only. Will this allow me to build with the usual Posix pthread/thread-affinity support under Win10? Because while MSYS et al. are fine as far single-threaded builds go, || builds are a huge hurdle there. |
|
|
|
|
|
#2 |
|
I moo ablest echo power!
May 2013
29·61 Posts |
Want me to try compiling something? I use the Bash shell in Windows pretty regularly for sieving and prp testing and am able to compile and use, for instance, multithreaded instances of sr1sieve and sr2sieve.
|
|
|
|
|
|
#3 | |
|
∂2ω=0
Sep 2002
República de California
103×113 Posts |
Quote:
gcc -c -O3 -DUSE_SSE2 -DUSE_THREADS ../util.c |
|
|
|
|
|
|
#4 |
|
I moo ablest echo power!
May 2013
176910 Posts |
Looks like it works right out of the box:
Code:
Using 1 threads in carry step 100 iterations of M3888517 with FFT length 196608 = 192 K Res64: 579D593FCE0707B2. AvgMaxErr = 0.240951102. MaxErr = 0.300781250. Program: E17.0 Res mod 2^36 = 67881076658 Res mod 2^35 - 1 = 21674900403 Res mod 2^36 - 1 = 42893438228 Clocks = 00:00:00.510 Code:
Using 2 threads in carry step 100 iterations of M3888517 with FFT length 196608 = 192 K Res64: 579D593FCE0707B2. AvgMaxErr = 0.240951102. MaxErr = 0.300781250. Program: E17.0 Res mod 2^36 = 67881076658 Res mod 2^35 - 1 = 21674900403 Res mod 2^36 - 1 = 42893438228 Clocks = 00:00:00.339 Last fiddled with by wombatman on 2017-07-22 at 00:29 |
|
|
|
|
|
#5 |
|
∂2ω=0
Sep 2002
República de California
2D7716 Posts |
Sweet! Note you should replace USE_SSE2 with one of
USE_AVX USE_AVX2 USE_AVX512 depending on what the most-recent one of those instruction sets your hardware supports. Binary won't beat Prime95 (yet), but on at least 2 recent platforms (AMD Ryzen and Skylake Xeon, at least Google Cloud's version thereof) it should be pretty close, though optimal jobs/threads-per-job combos to maximize total throughput on the given CPU will often be different between the 2 programs. (On David Stanfill's Ryzen I get best total throughput for my code by running one 1-threaded job per physical core, after building for AVX2, obviously). |
|
|
|
|
|
#6 |
|
I moo ablest echo power!
May 2013
29·61 Posts |
Duly noted!
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Connecting to the bash shell in Windows 10 | wombatman | Software | 10 | 2018-04-09 02:10 |
| Bash on Ubuntu on Windows | henryzz | Software | 11 | 2017-07-28 21:24 |
| shutdowns with win10 | wildrabbitt | Hardware | 4 | 2016-04-01 17:51 |
| Please take a look my shell Script in Unix | tinhnho | Programming | 2 | 2005-09-21 20:20 |
| Shell script puzzle #1 | Xyzzy | Linux | 5 | 2004-01-26 10:31 |