![]() |
![]() |
#1 |
"Ed Hall"
Dec 2009
Adirondack Mtns
22×32×101 Posts |
![]()
(Note: I expect to keep the first post of each of these "How I Install..." 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.)
This thread will explain the steps I use to install* YAFU onto a computer which is already running Ubuntu. This procedure should work for other linux distributions as well but the only other one I've currently tested is Debain. *In this instance "install" is referring to the acquiring and compilation of the YAFU package only. The binary will have to be called using its respective path. I will expect the user of these steps to be able to use the sudo command. I will use a directory called Math for these installations. You may elect to replace "Math" with your own choice. These instructions can be used as a reference only, if you want, but I will provide specifics that work for me. If you follow these steps as I provide them, you should end up with a working installation. First, follow the procedures in: How I Install GMP onto my Ubuntu Machines , How I Install GMP-ECM onto my Ubuntu Machines , How I Install msieve onto my Ubuntu Machines and How I Install ggnfs onto my Ubuntu Machines (This is optional to compiling YAFU, but sievers are necessary to run NFS routines.) If you have already installed the following packages, you can skip the next two steps, although performing them wouldn't hurt anything. Open a terminal and Enter: Code:
sudo apt-get update After the update completes and the user prompt reappears, type: Code:
sudo apt-get install g++ m4 zlib1g-dev make p7zip subversion Special Note on the following procedure(s): There are two branches available for YAFU. The "wip" branch and the "trunk" branch. The wip branch is the development branch and has all the latest work. This is the branch you should use if you want to stay at the leading edge of YAFU. However, if you have troubles with the installation, or just want a stable running package, you should use the trunk branch. I will note any differences in the installation steps with wip/trunk designations. To download the "wip" YAFU package: Code:
svn co https://svn.code.sf.net/p/yafu/code/branches/wip $HOME/Math/yafu Code:
svn co https://svn.code.sf.net/p/yafu/code/trunk $HOME/Math/yafu Code:
cd Math/yafu Code:
. . . #CC = gcc-7.3.0 (This edit is only needed in the "wip" Makefile.) . . . # modify the following line for your particular msieve installation . . . else LIBS += -L../msieve endif . . . Run the following in your terminal: Code:
lscpu Run the following in your terminal: Code:
echo $HOME Code:
which ecm Code:
/usr/local/bin/ecm Code:
threads=<# of CPUs reported above> ggnfs_dir=<$HOME string returned>/Math/ggnfs/bin/ ecm_path=/usr/local/bin/ecm For the "wip" version, run the following in the terminal: Code:
make NFS=1 Code:
make NFS=1 USE_SSE41=1 Code:
make NFS=1 USE_AVX2=1 Code:
make NFS=1 USE_SSE41=1 USE_AVX2=1 For the "trunk" version, run the following in the terminal: Code:
make x86_64 NFS=1 Code:
make x86_64 NFS=1 USE_SSE41=1 Code:
make x86_64 NFS=1 USE_AVX2=1 Code:
make x86_64 NFS=1 USE_SSE41=1 USE_AVX2=1 Test your installation and calculate tune data with the following command: Code:
./yafu "tune" Code:
cd ~/ Last fiddled with by EdH on 2020-09-28 at 18:09 |
![]() |
![]() |
![]() |
#2 |
"Ben"
Feb 2007
3,373 Posts |
![]() |
![]() |
![]() |
![]() |
#3 |
"Ed Hall"
Dec 2009
Adirondack Mtns
22·32·101 Posts |
![]()
Excellent! Thank you B2.
Are sse4_1 and avx2 mutually exclusive? |
![]() |
![]() |
![]() |
#4 |
Apr 2018
116 Posts |
![]()
What's about ggnfs? Does yafu need it?
|
![]() |
![]() |
![]() |
#5 |
Romulan Interpreter
Jun 2011
Thailand
52×7×53 Posts |
![]()
Yes, if you want to factor anything over 110 digits, you will need external ggnfs and path to it in yafu ini
|
![]() |
![]() |
![]() |
#6 |
"Nuri, the dragon :P"
Jul 2016
Good old Germany
11·73 Posts |
![]()
Invalid option "B1pm1" while starting "tune".
Looks like somethink went wrong. After several hours following your posts. At least GMP, ECM and msieve worked. Any idea how I can fix that issue, so that yafu will work on my server? |
![]() |
![]() |
![]() |
#7 | |
"Ed Hall"
Dec 2009
Adirondack Mtns
E3416 Posts |
![]() Quote:
Code:
$ which ecm Code:
ecm: /usr/local/bin/ecm (If you get a different location, try that in your yafu.ini file in the next step.) Next, make sure your yafu.ini file has the following line: Code:
ecm_path=/usr/local/bin/ecm Debian: Code:
$ make $ make check $ su Password: ************** # make install exit $ Code:
$ make $ make check $ sudo make install [sudo] password for user: ************** $ Last fiddled with by EdH on 2019-09-15 at 15:20 |
|
![]() |
![]() |
![]() |
#8 |
"Nuri, the dragon :P"
Jul 2016
Good old Germany
11·73 Posts |
![]()
I´ve restarted the process but still got the same result.
ECM is in the correct path, same as ggnfs. This what I see when I open yafu.ini. Code:
B1pm1=100000 B1pp1=20000 B1ecm=11000 rhomax=1000 threads=4 pretest_ratio=0.25 %ggnfs_dir=..\ggnfs-bin\Win32\ ggnfs_dir=/home/user/Math/ggnfs/bin/ %ggnfs_dir=../../ggnfs-bin/ %ecm_path=..\gmp-ecm\build.vc10\x64\Release\ecm.exe ecm_path=/usr/local/bin/ecm At least I´m happy that ggnfs went fine without problems. ![]() |
![]() |
![]() |
![]() |
#9 | |
"Ben"
Feb 2007
D2D16 Posts |
![]() Quote:
./yafu "ecm(rsa(256),100)" -v -threads 2 -B1ecm 1000000 |
|
![]() |
![]() |
![]() |
#10 |
"Nuri, the dragon :P"
Jul 2016
Good old Germany
11×73 Posts |
![]() |
![]() |
![]() |
![]() |
#11 |
"Ed Hall"
Dec 2009
Adirondack Mtns
22·32·101 Posts |
![]()
The next thing I would try is to use the trunk version of YAFU:
First, rename your current yafu directory to yafu-orig: Code:
mv ~/Math/yafu ~/Math/yafu-orig Code:
svn co https://svn.code.sf.net/p/yafu/code/trunk $HOME/Math/yafu Change: Code:
else OBJ_EXT = .o INC += -I../gmp/include LIBS += -L../gmp/lib/linux/x86_64 INC += -I../gmp-ecm/include/linux LIBS += -L../gmp-ecm/lib/linux/x86_64 Code:
else OBJ_EXT = .o INC += -I/usr/local/lib/ LIBS += -L/usr/local/lib/ #INC += -I../gmp-ecm/include/linux #LIBS += -L../gmp-ecm/lib/linux/x86_64 Code:
# modify the following line for your particular msieve installation ifeq ($(MIC),1) LIBS += -L../msieve/lib/phi else LIBS += -L../msieve endif LIBS += -lmsieve -L../msieve Code:
cp ~/Math/yafu-orig/yafu.ini ~/Math/yafu/yafu.ini Code:
cat /proc/cpuinfo Code:
make x86_64 NFS=1 USE_SSE41=1 USE_AVX2=1 And, finally test: Code:
./yafu "tune" Last fiddled with by EdH on 2019-09-15 at 15:19 |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How I Install CADO-NFS onto my Ubuntu Machines | EdH | EdH | 3 | 2019-06-24 03:42 |
How I Install GMP-ECM onto my Ubuntu Machines | EdH | EdH | 12 | 2019-04-16 09:28 |
How I Install msieve onto my Ubuntu Machines | EdH | EdH | 0 | 2018-02-23 14:43 |
How I Install ggnfs onto my Ubuntu Machines | EdH | EdH | 0 | 2018-02-22 03:31 |
How I Install GMP onto my Ubuntu Machines | EdH | EdH | 0 | 2018-02-21 23:48 |