Steps to install and set up Aliqueit on an Ubuntu computer
This is the step-by-step procedure I use to install Ubuntu onto a PC and set it up to run Aliqueit. This procedure has worked for both 32-bit and 64-bit installations. It is very specific to Ubuntu and I will use the user name math with a folder named Mathwork and another folder named Aliqueit within Mathwork for this text. I will also be adding and renaming other folders within these.
Note 1: I accept no responsibility for the accuracy of, or how you use the information provided. Proceed at your own risk!
Note 2: I use factmsieve.py instead of factMsieve.pl to run the ggnfs code. I do, however, provide steps for setting up either.
1. ONLY PERFORM THIS STEP IF YOU ARE DELETING A PRIOR OS OR INSTALLING A NEW HARD DRIVE (OR, YOU ARE FAMILIAR WITH INSTALLING FOR DUAL-BOOT) - THIS CAN/WILL DESTROY A PREVIOUS OPERATING SYSTEM!! Install Ubuntu (I used 10.04.1 at the time of the original writing of this procedure, but have since then used these steps for 11.04.)
2. Update Ubuntu (System>Administration>Update Manager)
3. Open a terminal and check Perl and Python:
- a. type perl -v Enter
- b. type python Enter
- 1. Check that version is >= 2.6
- 2. Use CTRL+D to exit.
4. Check for and install, if needed (System>Administration>Synaptic Package Manager):
- a. gmp-ecm
- b. libecm-dev
- c. g++
- d. zlib1g-dev
- e. subversion
- f. wget (If you plan to download elf files from the db, this is currently the easiest method.)
5. Create a folder called Mathwork within the math folder.
6. Create a folder within the Mathwork folder called Aliqueit.
7. Download the following packages:
- a. aliqueit. The current version can be found at mklasson.com :: Aliquot sequences.
- b. YAFU. The current version can be found at YAFU's SourceForge page. (If necessary, use "View all files" to navigate to the linux version.) Note: For linux 32-bit systems, use version 1.20.2.zip found at Yafu's Home Page.
- c. GGNFS. To acquire the latest source code I use Subversion to download it from SourceForge.net. Open a terminal and type (or copy/paste) the following (then Enter):
svn co https://ggnfs.svn.sourceforge.net/svnroot/ggnfs /home/math/Mathwork/ggnfs
- Special Note: I have run into some trouble with the 64-bit lasieve4I files created from the above download, so for a 64-bit installation, in addition to the above, you sould retrieve bsquared's static built set from this location: linux 64-bit ggnfs binaries
- d. Msieve. To acquire the latest source code I use Subversion to download it from SourceForge.net. Open a terminal and type (or copy/paste) the following (then Enter):
svn co https://msieve.svn.sourceforge.net/svnroot/msieve /home/math/Mathwork/msieve
- e. ecm.py. This is optional, but allows ecm to use more than one CPU core. To find the latest version, search this thread at mersenneforum.org.
- f. factmsieve.py. This is optional. You can use factMsieve.pl (Perl script), found within the GGNFS files, if preferred. To use factmsieve.py (Python script) download the latest version from Factoring Large Composite Numbers. Look in the paragraph titled "MSIEVE and GGNFS in Combination using PYTHON (factmsieve.py)" for the link.
8. Set up/compile the software:
- a. Open Aliqueit...zip and move down through the levels until you reach the page with the src directory. Extract at least, src (folder) and, aliqueit.ini into the Aliqueit folder. Make sure "Re-create folders" is checked.
- 1. In a terminal, navigate to Aliqueit/src/aliqueit.
- 2. Type make Enter
- 3. When the compilation is finished, copy aliqueit into the Aliqueit folder.
- b. Open yafu....zip and extract the appropriate yafu for your system into the Aliqueit folder. (note exact name) In a file manager, right-click on the yafu icon in the Aliqueit folder and choose properties. Choose the Permissions tab. Make sure "Allow executing file as program" is checked.
- c. Open ecm-py....zip and extract the script into the Aliqueit folder. If necessary, rename the script to ecm.py.
- d. (optional) Open factmsieve.py....zip and extract factmsieve.py into the Aliqueit folder.
- e. In a terminal navigate to the ggnfs/trunk folder.
- 1. type make Enter
- 2. a series of choices will be displayed. If you don't know what your CPU is, use cat /proc/cpuinfo at the prompt to find out.
- 3. type make target Enter (based on your cpu)
- If you are setting up a 64-bit installation, you should now perform the following:
- Unpack the static binaries from bsquared into the ggnfs/trunk/bin folder, overwriting any that may already be there.
- f. In a terminal navigate to the msieve/trunk folder
- 1. type make Enter
- 2. choose the correct target(s) for your system
- 3. type make target(s) Enter
- Note for later:If msieve gives an illegal instruction type error when tested later, come back to this step and do the follwoing:
- a. Open the Makefile with a text editor
- b. Change -march=k8 to -march=native
- c. type make clean Enter
- d. type make target(s) Enter
- g. **If you plan to use factmsieve.pl instead of factmsieve.py, copy it from the ggnfs/trunk/tests folder into the Aliqueit folder and place a copy of msieve into the ggnfs/trunk/bin folder.
9. Setting up aliqueit.ini, ecm.py, factMsieve.pl and/or factmsieve.py:
- a. Open aliqueit.ini with a text editor:
- 1. Comment/Uncomment the appropriate ggnfs_clean_cmd.
- 2. Comment/Uncomment the appropriate null_device.
- 3. Comment/Uncomment the appropriate prefer_yafu.
- 6. Modify - ecm_cmd = ecm (Note that some linux distros use gmp-ecm.)
- 7. Modify - ecmpy_cmd = python /home/math/Mathwork/Aliqueit/ecm.py
- 8. Modify - yafu_cmd = /home/math/Mathwork/Aliqueit/yafu.... (Match name to version.)
- 9. Modify - msieve_cmd = /home/math/Mathwork/msieve/trunk/msieve
- 10a. Modify - ggnfs_cmd = python "/home/math/Mathwork/Aliqueit/factmsieve.py"
- 10b. Modify - ggnfs_cmd = perl "/home/math/Mathwork/Aliqueit/factMsieve.pl"
- 11. Modify - use_ecm.py = (appropriately)
- 12. ** See note below ** Modify - use_msieve_polyfind = (appropriately)
- 13. Save aliqueit.ini
- b. Open ecm.py with a text editor:
- 1. Modify ECM_PATH = '/usr/bin/'
- 2. Modify ECM_THREADS = (appropriately)
- 3. Modify ECM = (appropriately)
- 4. Save ecm.py
- c. Open factMsieve.pl with a text editor:
- 1. Modify $GGNFS_BIN_PATH="/home/math/Mathwork/ggnfs/trunk/bin";
- 2. Save factMsieve.pl
- d. Open factmsieve.py with a text editor:
- 1. Modify - GGNFS_PATH = '/home/math/Mathwork/ggnfs/bin/'
- 2. Modify - MSIEVE_PATH = '/home/math/Mathwork/msieve/trunk/'
- 3. Modify - NUM_CORES = (appropriate number)
- 4. Modify - USE_CUDA = (appropriately)
- 5. Modify any other appropriate items for your system
- 6. Save factmsieve.py
** Special Note about msieve poly searching: With older versions of msieve, I experienced a never-ending poly search when gnfs was called. The solution I used was to set gnfs to invoke the poly selection, use factmsieve v75 (or later) and set the "MSIEVE_POLY_TIME_LIMIT" to 30. This should not be needed for newer versions of msieve.
Testing your installation:
You should now be able to run aliquot sequences using aliqueit and all the associated packages. The following is a procedure to do just that, based on the above installation:
1. choose a number and check it in the db and reservations thread at factordb.com and Aliquot Sequences - mersenneforum.org, respectively.
2. open a terminal
3. type cd Mathwork/Aliqueit Enter
4. use wget to retrieve the elf for the number - type (or copy/paste) wget "http://factordb.com/search.php?se=1&aq=#####&action=all&text=Text&raw=1" -O alq_#####.elf Enter (use your chosen number in place of #####)
5. type ./aliqueit ##### Enter (or, you can add options based on your choices for the number - see aliqueit.txt)
Automating Aliqueit:
If you would like to run Aliqueit on several numbers, this can be accomplished via a bash script. Here is a simple example:
---start of script---
#!/bin/bash
cd /home/math/Mathwork/Aliqueit
alq=4788
wget 'http://www.factordb.com/elf.php?seq='${alq}'&type=1' -O /home/math/Mathwork/Aliqueit/alq_${alq}.elf
/home/math/Mathwork/Aliqueit/aliqueit -d 180 $alq
/home/math/Mathwork/Aliqueit/aliqueit -s 0 $alq
alq=######
wget 'http://www.factordb.com/elf.php?seq='${alq}'&type=1' -O /home/math/Mathwork/Aliqueit/alq_${alq}.elf
/home/math/Mathwork/Aliqueit/aliqueit -d 120 -c 95 -b -e $alq
/home/math/Mathwork/Aliqueit/aliqueit -s 0 $alq
---end of script---
You can choose individual parameters for each Aliqueit run within the specific calls. To add more sequences to work on, simply copy/paste the last set of lines and edit appropriately.
If you find errors or wish to make comments about this page, please post on the Aliquot Sequences - mersenneforum.org forum page.
- - - - - - - - - - - - - - - - - - - - - - - - - - -