Friday, May 05, 2017

[xuzamfou] Parallel ECM

Here is a bash script to spawn several parallel instances of GMP ECM to find one factor.

command rm out.* ; nproc=4 ; for i in $(seq 1 $nproc) ; do echo The_number_to_factor  | nice -19 time -o out.time.$i ecm -c 0 -I $nproc -one 10000 > out.log.$i & done ; wait -n ; killall ecm


Use the physical number of processors, not hyperthreaded ones.  Probably bottlenecked by ALU, not memory access.  But hyperthreading might be useful when large B2.

wait -n is a nice primitive: whoever finishes first wins.

Consider --disable-aprcl during the configure step to speed up final verification of prime factors.  It is unfortunate that this cannot be disabled at run time.

No comments :