mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2017-07-21, 21:45   #1
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

263768 Posts
Default Microsoft adds Linux Bash Shell and Ubuntu Binaries to Win10

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.
ewmayer is offline   Reply With Quote
Old 2017-07-21, 23:22   #2
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

32·193 Posts
Default

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.
wombatman is offline   Reply With Quote
Old 2017-07-22, 00:15   #3
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

2×13×443 Posts
Default

Quote:
Originally Posted by wombatman View Post
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.
Sure, how about Mlucas v17? If this functions as hoped, you should be able to simply follow the Linux build instructions. Suggest trying on a single sample source file, though, e.g. (this assumes you're in an obj dir which you created within .../src):

gcc -c -O3 -DUSE_SSE2 -DUSE_THREADS ../util.c
ewmayer is offline   Reply With Quote
Old 2017-07-22, 00:29   #4
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

32·193 Posts
Default

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
with -nthread 2:

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
Oh, and grep'ing for "error" in build.log returned nothing.

Last fiddled with by wombatman on 2017-07-22 at 00:29
wombatman is offline   Reply With Quote
Old 2017-07-22, 00:43   #5
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

263768 Posts
Default

Quote:
Originally Posted by wombatman View Post
Looks like it works right out of the box:
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).
ewmayer is offline   Reply With Quote
Old 2017-07-22, 01:52   #6
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

6C916 Posts
Default

Duly noted!
wombatman is offline   Reply With Quote
Reply

Thread Tools


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

All times are UTC. The time now is 03:00.

Sat Sep 26 03:00:11 UTC 2020 up 16 days, 11 mins, 0 users, load averages: 1.44, 1.60, 1.52

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.