![]() |
![]() |
#1 |
"Ed Hall"
Dec 2009
Adirondack Mtns
2·2,617 Posts |
![]()
(Note: I expect to keep the first post of each of these "How I..." threads up-to-date with the latest version. Please read the rest of each thread to see what may have led to the current set of instructions.)
I will take the liberty of expecting readers to already be somewhat familiar with Google's Colaboratory sessions. There are several threads already on Colab and these should be reviewed by interested readers: Google Colaboratory Notebook? GPU72 Notebook Integration... Notebook Instance Reverse SSH and HTTP Tunnels. Colab question I do not, as of yet, have a github account, so I have not created an upload of this to github. Others may feel free to do so, if desired. The following is a manner to compile and install a working package of YAFU, complete with GMP, GMP-ECM, msieve and gnfs sievers from B2. When compiled YAFU will be capable of any of its standard factoring procedures, but the length of time to run larger factorizations via NFS in a Colab session is questionable. To use Colab, you need a Gmail account and will be required to log into that account to run a session. On to the specifics: Open a Google Colaboratory session. Sign in with your Google/Gmail account info. Choose New Python3 notebook: Code:
Menu->File->New Python3 notebook (or within popup) Edit title from Untitled... to whatever you like. Paste the following into the Codeblock: Code:
!chmod 777 /tmp !apt update !apt install g++ m4 make subversion libtool p7zip autoconf !mkdir Math %cd Math !wget "https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2" !tar -xf gmp-6.1.2.tar.bz2 !mv gmp-6.1.2 gmp %cd gmp !./configure !make ############################################ # These 4 lines are recommended, but can be commented out or removed! # ############################################ !make check !echo "Check results, then click in the" !echo "TextBox below and press Enter to continue. . ." !read continue in ############################################ !make install %cd .. !svn co svn://scm.gforge.inria.fr/svn/ecm/trunk ecm %cd ecm !libtoolize !autoreconf -i !./configure --with-gmp=/usr/local/ !make ############################################ # These 4 lines are recommended, but can be commented out or removed! # ############################################ !make check !echo "Check results, then click in the" !echo "TextBox below and press Enter to continue. . ." !read continue in ############################################ !make install %cd .. !svn co https://svn.code.sf.net/p/msieve/code/trunk ./msieve/lib/linux/x86_64 %cd msieve/lib/linux/x86_64 !make all ECM=1 NO_ZLIB=1 %cd ../../../.. !wget "https://sites.google.com/site/bbuhrow/lasieve4_64.7z" !7z e lasieve4_64.7z !mkdir b2sievers !chmod 777 gnfs-lasieve* !mv gnfs-lasieve* b2sievers/. !svn co https://svn.code.sf.net/p/yafu/code/trunk ./yafu %cd yafu !mv yafu.ini yafu.ini.orig !echo "B1pm1=100000" >yafu.ini !echo "B1pp1=20000" >>yafu.ini !echo "B1ecm=11000" >>yafu.ini !echo "rhomax=200" >>yafu.ini !echo "threads=2" >>yafu.ini !echo "pretest_ratio=0.25" >>yafu.ini !echo "ggnfs_dir=../b2sievers/" >>yafu.ini !echo "ecm_path=/usr/local/bin/ecm" >>yafu.ini !echo "xover=93" >>yafu.ini !echo "no_clk_test=1" >>yafu.ini !make x86_64 NFS=1 USE_SSE41=1 Click on the Run cell icon or use CTRL-Enter. Either watch all the scrolling text or take a break. This will run for a few minutes. If you chose to leave the checks and pauses you can review the results of the GMP and ECM check runs before continuing. To continue at these breaks, you have to click in the text entry box below the message and hit Enter as instructed. When everything is finished, if all went well, you should have a working copy of YAFU. Unfortunately, the only actual indication that all is finished is the circling of the Run cell icon stops. and the last compile line is displayed. If something failed, there may be error messages, but if all succeeded, there won't. If you'd like to fully test YAFU, I suggest using the tune option. To perform YAFU operations, first clear the current cell or start a new one and enter your command line starting with: Code:
!./yafu Code:
!./yafu "tune" Code:
!./yafu "factor(654707893555107852929579873717948947305795737637458349294603940433680534555603)" Last fiddled with by EdH on 2019-11-09 at 15:17 |
![]() |
![]() |
![]() |
#2 |
"Dylan"
Mar 2017
59410 Posts |
![]()
I managed to install yafu successfully with your script. Running ./yafu "tune" yielded the following tune_info line:
Code:
tune_info= Intel(R) Xeon(R) CPU @ 2.20GHz,LINUX64,8.46183e-06,0.208774,0.386484,0.100675,99.2542,42 |
![]() |
![]() |
![]() |
#3 |
"Ed Hall"
Dec 2009
Adirondack Mtns
2·2,617 Posts |
![]()
Excellent! Thanks for the report. My run gave a crossover of 93 digits, which I thought a bit low.
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Google Diet Colab Notebook | Corbeau | Cloud Computing | 1236 | 2023-01-26 15:57 |
Google Colaboratory reference thread | kriesel | kriesel | 22 | 2023-01-16 15:38 |
How I Compile the GPU branch of GMP-ECM in a Colaboratory Session | EdH | EdH | 15 | 2021-10-09 13:56 |
Running YAFU via Aliqueit doesn't find yafu.ini | EdH | YAFU | 8 | 2018-03-14 17:22 |
Your browsing session ended unexpectly | davieddy | Soap Box | 1 | 2010-12-31 20:03 |