![]() |
|
|
#1 |
|
"Jason Goatcher"
Mar 2005
3×7×167 Posts |
I'm going to buy a Core 2 Quad when the price goes down, with 2GB of RAM. If I'm not mistaken 60-digit numbers take about 1.5GB of RAM if you don't split everything up. Here's my problem.
1,280MB of RAM(1024+256) for a maximum of 4 cores, 60-digit curves, and the assumption that, since it's Windows XP, the computer will be reset about every 2-3 weeks. Basically, I'm trying to max out the number of curves done, while allowing for all those parameters. I'm considering the possibility I should do Stage 1 and Stage 2 separately, in which case I'm hoping someone can help me figure out a way that no more than two cores are doing Stage 2 at once(with the max RAM at 1,280), and with as little babysitting as possible. Is it possible to set up a script to facilitate this? Because, if someone could do this, the program would (1) deserve it's own web page, and (2) the person would get instant geek cred for the accomplishment. |
|
|
|
|
|
#2 | |
|
Dec 2003
23·33 Posts |
Quote:
I have found that a B1 of about 5e8 is the most efficient when searching for 60 bit factors on a AMD CPU using up to 3,7 GiB RAM. Test different B1 values on your CPU with -v to find she sweet spot where expected time to find a 60 digit factor is lowest. Beware of local minima. For the scripts to work on Windows you'll need Cygwin. Put your input number in a file num.inp and run three copies of the first script with num as parameter and one copy of the second script with the same num as parameter. Usually step 1 will take more than three times longer than step 2. If you run a longer step 2, step 2 will lag behind and you'll accumulate save files. Check ecm-<num>.*.out to see if you have found any factors. When step 2 is done, the save file will change name from .save to .done. Count the files to check how many curves you have completed. The .done files can be used to continue a curve to a higher B1 later. I have rewritten the scrips to make them presentable and more robust, and may have introduced bugs. step1.sh Code:
#!/bin/bash
num=$1
if [ ! -s "$num.inp" ]; then
echo "Usage $0 num where num.inp is a file containing the number to factor"
exit 1
fi
declare -i i=`ls ecm-$num.*.done 2>/dev/null | wc -w`
while ((i=i+1)); do
while [ -f ecm-$num.$i.save ]; do
((i=i + 5))
done;
ecm -inp $num.inp -save ecm-$num.$i.save 5e8 5e8 > ecm-$num.$i.out 2>&1
done
Code:
#!/bin/bash
num=$1
if [ ! -s "$num.inp" ]; then
echo "Usage $0 num where num.inp is a file containing the number to factor"
exit 1
fi
declare -i i=`ls ecm-$num.*.done 2>/dev/null | wc -w`
while ((i=i+1)); do
while [ -s ecm-$num.$i.done ]; do ((i=i+1)); done
while [ ! -s ecm-$num.$i.save ]; do
# Perhaps ecm has crashed or run ot of disk space during step 1?
# We want to avoid letting an empty save file block progress.
# If there are more than 15 save files we assume that the process
# creating it has died becore completion, and make a new one.
# Otherwise just run step 1 on a higher $i.
test `ls ecm-$num.*.save 2>/dev/null | wc -w` -gt 15 && rm ecm-$num.$i.save
declare -i j=$i
while [ -f ecm-$num.$j.save ]; do ((j=j+1)); done
ecm -inp $num.inp -save ecm-$num.$j.save 5e8 5e8 > ecm-$num.$j.out 2>&1
done
ecm -resume ecm-$num.$i.save 5e8 >> ecm-$num.$i.out
mv ecm-$num.$i.save ecm-$num.$i.done
done
|
|
|
|
|
|
|
#3 |
|
"Jason Goatcher"
Mar 2005
3·7·167 Posts |
If I may ask some ignorant questions. Please correct me anywhere I'm wrong.
I'm assuming these are run from within cygwin. Do I need to use a special editor, or will either Notepad or Wordpad suffice? Also, I noticed some stuff was indented, do I need to imitate this, or is that just to make it friendlier to curious eyes? |
|
|
|
|
|
#4 | |
|
Dec 2003
23×33 Posts |
Quote:
It is just to make the scripts more readable. |
|
|
|
|
|
|
#5 |
|
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
984410 Posts |
|
|
|
|
|
|
#6 |
|
"Jason Goatcher"
Mar 2005
66638 Posts |
The last time I tried those scripts I was a bit manic, so I edited like crazy. Has anyone ever run those scripts successfully, edited or unedited?
If a mod reads this, please change the title of the thread to "Running Stages 1 and 2 separately". Thanks. |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ECM - why 3 curves? | James Heinrich | PrimeNet | 3 | 2017-11-14 13:59 |
| JKL-ECM: ECM using Hessian curves | CRGreathouse | Software | 1 | 2017-09-06 15:39 |
| B1 and # curves for ECM | Walter Nissen | Factoring | 36 | 2014-02-16 00:20 |
| Curves needed | henryzz | GMP-ECM | 3 | 2007-12-21 16:13 |
| 160 digit factor found of 366 digit (PRP-1) | AntonVrba | Factoring | 7 | 2005-12-06 22:02 |