mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2020-01-02, 14:52   #12
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

1100110110112 Posts
Default

Quote:
Originally Posted by EdH View Post
I would have sworn my earlier sessions with Colab showed AVX512 for their Xeon CPUs when I checked. Now, none of my recent sessions have. The CPU type just says Xeon CPU @ 2.00GHz. It does give me a family, etc. for the CPU(s), but no name. Is there a way to find that via the command line?

If I can, I'll set up a Colab AVX-ECM example in my "How I . . ." series.
Not sure if this applies across all distros, but at least for CentOS/RedHat you can do:
cat /proc/cpuinfo

which will list the cpuflags, e.g.:

Code:
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
 pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp 
lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf 
eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 
xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave 
avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt ssbd 
mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle 
avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx 
smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 
cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_
window hwp_epp hwp_pkg_req pku ospke md_clear spec_ctrl intel_stibp flush_l1d
AVX-ECM needs avx512f and avx512dq

Last fiddled with by bsquared on 2020-01-02 at 15:01 Reason: hopefully easier to read list
bsquared is offline   Reply With Quote
Old 2020-01-02, 14:59   #13
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3·1,097 Posts
Default

Speaking of cpu features, can't wait for systems with avx512ifma to become available. Should get a good speed boost with that feature.
bsquared is offline   Reply With Quote
Old 2020-01-02, 15:01   #14
GP2
 
GP2's Avatar
 
Sep 2003

22×3×5×43 Posts
Default

Quote:
Originally Posted by chris2be8 View Post
How can you check if a CPU supports avx512? Eg one of my systems is a Ryzen 5 2600, /proc/cpuinfo says it supports avx and avx2, but so do some older systems.
grep flags /proc/cpuinfo should show which specific subsets of the AVX-512 instruction set are supported. For instance, the CPU I use has avx512f avx512dq avx512cd avx512bw avx512vl. For the meanings, see Wikipedia.
GP2 is offline   Reply With Quote
Old 2020-01-02, 15:33   #15
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

246216 Posts
Default

Quote:
Originally Posted by bsquared View Post
cat /proc/cpuinfo
I just happen to have an SSH session into a Colab session open right now.

Code:
root@InstanceSSH:~# cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 85
model name	: Intel(R) Xeon(R) CPU @ 2.00GHz
stepping	: 3
microcode	: 0x1
cpu MHz		: 2000.168
cache size	: 39424 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat md_clear arch_capabilities
bugs		: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs
bogomips	: 4000.33
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 85
model name	: Intel(R) Xeon(R) CPU @ 2.00GHz
stepping	: 3
microcode	: 0x1
cpu MHz		: 2000.168
cache size	: 39424 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat md_clear arch_capabilities
bugs		: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs
bogomips	: 4000.33
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:
chalsall is offline   Reply With Quote
Old 2020-01-02, 15:35   #16
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3×1,097 Posts
Default

Quote:
Originally Posted by chalsall View Post
I just happen to have an SSH session into a Colab session open right now.

Code:
root@InstanceSSH:~# cat /proc/cpuinfo 

flags		: ... avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl ...
Nice!
bsquared is offline   Reply With Quote
Old 2020-01-02, 16:16   #17
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3×1,097 Posts
Default

I bolted on a simplified version of yafu's front end calculator:

Code:
./avx-ecm "fib(791)/13/677/216416017" 8 1000000 1
starting process 418960
commencing parallel ecm on 478538644094177490260709299559653477212580778084175536200356719720677713018603842152898226485988725658355447208677180777716686530734249077491242934517377
ECM has been configured with DIGITBITS = 52, VECLEN = 8, GMP_LIMB_BITS = 64
Choosing MAXBITS = 624, NWORDS = 12, NBLOCKS = 3 based on input size 508
cached 3001134 primes < 49999991
Input has 508 bits, using 1 threads (8 curves/thread)
Processing in batches of 100000000 primes
Initialization took 0.1045 seconds.
Cached 5761455 primes in range [2 : 99999989]

commencing curves 0-7 of 8
Building curves took 0.0006 seconds.
commencing Stage 1 @ prime 2
accumulating prime 997693
Stage 1 completed at prime 999983 with 2001925 point-adds and 194143 point-doubles
Stage 1 took 6.8980 seconds

found factor 272602401466814027129 in stage 1 in thread 0, vec position 3, with sigma = 1465376940087886860


commencing stage 2 at p=1000003, A=1000230
w = 1155, R = 480, L = 16, umax = 9240, amin = 433
Stage 2 took 4.9852 seconds
performed 3188920 pair-multiplies for 5682957 primes in stage 2
performed 95044 point-additions and 53 point-doubles in stage 2

found factor 272602401466814027129 in stage 2 in thread 0, vec position 3, with sigma = 1465376940087886860

found factor 272602401466814027129 in stage 2 in thread 0, vec position 4, with sigma = 16373433592041433963

found factor 272602401466814027129 in stage 2 in thread 0, vec position 7, with sigma = 12457157968472999552
Process took 11.9819 seconds.
So now you should be able to use +,-,*,/,^,%,# (primorial), ! (factorial), as well as fib(), luc(), >>, <<, binary ops (xor,and,not,or), and a few other things.
bsquared is offline   Reply With Quote
Old 2020-01-02, 17:34   #18
PhilF
 
PhilF's Avatar
 
Feb 2005
Colorado

5×103 Posts
Default

Sorry, duplicate post...

Last fiddled with by PhilF on 2020-01-02 at 17:35
PhilF is offline   Reply With Quote
Old 2020-01-02, 18:29   #19
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×52×79 Posts
Default

Quote:
Originally Posted by GP2 View Post
grep flags /proc/cpuinfo should show which specific subsets of the AVX-512 instruction set are supported.
For the lazy:
Code:
egrep -o 'avx512[^ ]*' /proc/cpuinfo | sort -u
CRGreathouse is offline   Reply With Quote
Old 2020-01-02, 23:17   #20
mathwiz
 
Mar 2019

7×13 Posts
Default

FWIW, I'm getting segfaults with the current master branch. Was a bug introduced?
mathwiz is offline   Reply With Quote
Old 2020-01-03, 00:37   #21
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3·1,097 Posts
Default

Quote:
Originally Posted by mathwiz View Post
FWIW, I'm getting segfaults with the current master branch. Was a bug introduced?
Probably... can you let me know what command line was giving you problems? It has been working for me but I haven't done a lot of testing either.
bsquared is offline   Reply With Quote
Old 2020-01-03, 02:33   #22
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

329110 Posts
Default

Quote:
Originally Posted by bsquared View Post
Probably... can you let me know what command line was giving you problems? It has been working for me but I haven't done a lot of testing either.
I see now after testing on a different system with gcc that it doesn't work at all. I committed a fix (was missing a couple libraries in the new calc front end). Tested on linux with icc, with mingw on windows/msys2, and on windows-subsystem-for-linux/gcc.



Quote:
Originally Posted by bsquared View Post

+ parameterization seems not exactly compatible with gmp-ecm: looking into it

I'm not exactly sure what's going on with the parameterization... this program finds factors when it seems like it shouldn't for some sigma and conversely doesn't find factors when gmp-ecm does for some sigma. On average though the factor-finding rate seems about the same.
Also fixed this. Was a simple overflow when trying to set random sigma values into an mpz_t.
bsquared is offline   Reply With Quote
Reply

Thread Tools


All times are UTC. The time now is 07:44.

Wed Sep 30 07:44:13 UTC 2020 up 20 days, 4:55, 0 users, load averages: 0.98, 1.11, 1.15

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.