![]() |
![]() |
#1 |
"Ed Hall"
Dec 2009
Adirondack Mtns
126138 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.)
YAFU2 was introduced in April 2021 and details can be found here. This thread will explain the steps I use to install* YAFU2 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 Fedora. The original YAFU is still available and the prior thread How I install YAFU onto my Ubuntu Machines is still valid. *In this instance "install" is referring to the acquiring and compilation of YAFU2 and associated packages 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 git YAFU2 is dependent on two "new" packages by the same author, called ytools and ysieve, which must be retrieved and compiled prior to building YAFU2. Start in a terminal in the Math directory: Code:
cd $HOME/Math Code:
git clone https://github.com/bbuhrow/ytools Code:
CC = gcc-7.3.0 Code:
CC = gcc Code:
cd ytools Code:
make Move back to the Math directory Code:
cd .. Code:
git clone https://github.com/bbuhrow/ysieve Code:
cd ysieve Code:
make Now it's time to retrieve and build YAFU2, which I will now only refer to as YAFU. Move into the Math directory Code:
cd .. Code:
git clone https://github.com/bbuhrow/yafu Code:
INC += -I../ysieve -I../ytools LIBS += -L../ysieve -L../ytools INC += -I../gmp_install/gmp-6.2.0/include LIBS += -L../gmp_install/gmp-6.2.0/lib INC += -I../ecm_install/include/ LIBS += -L../ecm_install/lib/ INC += -I../msieve/zlib LIBS += -L../msieve/ Code:
INC += -I../ysieve -I../ytools LIBS += -L../ysieve -L../ytools INC += -I/usr/local/include/ LIBS += -L/usr/local/include/ #INC += -I../ecm_install/include/ #LIBS += -L../ecm_install/lib/ INC += -I../msieve/zlib LIBS += -L../msieve/ Code:
lscpu Run the following in your terminal: Code:
which ecm Code:
/usr/local/bin/ecm Code:
% threads=1 ggnfs_dir=..\..\ggnfs-bin\x64\ ecm_path=..\..\gmp-ecm\bin\mingw\ecm.exe Code:
threads=<# of CPUs reported above> ggnfs_dir=../ggnfs/bin/ ecm_path=/usr/local/bin/ecm Code:
make NFS=1 Last fiddled with by EdH on 2023-04-08 at 19:22 |
![]() |
![]() |
![]() |
#2 |
Mar 2010
22×3×5 Posts |
![]()
Ed - I have an AMD 3950X. I saw your note that you updated all your machines to 2.07. What extra flags did you use when compiling?
|
![]() |
![]() |
![]() |
#3 | |
"Ed Hall"
Dec 2009
Adirondack Mtns
5·1,103 Posts |
![]() Quote:
Edit: My CPUs are AMD Phenom(tm) II X4 B95 Processors and are ancient. Last fiddled with by EdH on 2021-09-20 at 02:25 |
|
![]() |
![]() |
![]() |
#4 |
"James Heinrich"
May 2004
ex-Northern Ontario
101778 Posts |
![]()
Thanks for this guide.
First small thing I ran into, under ytools: changing CC = gcc-7.3.0 to CC = gcc- didn't work for me, I tried CC = gcc and that seemed to work (I think?) ![]() I do get some warnings when I use USE_AVX2=1 but I'll just skip that for now (just using NFS=1 USE_SSE41 and that seems ok). Last fiddled with by James Heinrich on 2021-09-26 at 21:33 |
![]() |
![]() |
![]() |
#5 | ||
"Ed Hall"
Dec 2009
Adirondack Mtns
5×1,103 Posts |
![]() Quote:
Quote:
Glad it was helpful. Thanks for the feedback. |
||
![]() |
![]() |
![]() |
#6 |
Mar 2010
22×3×5 Posts |
![]()
Ed - any updates to this procedure? I just tried it and get errors:
/usr/bin/ld: top/cmdParser/calc.o: in function `feval': .../Math/yafu/top/cmdParser/calc.c:3000: undefined reference to `fftmul' /usr/bin/ld: ./libysiqs.a(SIQS.o): in function `siqs_static_init': .../Math/yafu/factor/qs/SIQS.c:2448: undefined reference to `nextRoots_32k_avx2_intrin' Suggestions? |
![]() |
![]() |
![]() |
#7 | |
"Ben"
Feb 2007
EB416 Posts |
![]() Quote:
Code:
COMMON_SRCS = \ top/aprcl/mpz_aprcl.c \ factor/factor_common.c \ factor/rho.c \ factor/squfof.c \ factor/trialdiv.c \ arith/arith.c \ arith/fftmul.c \ arith/monty.c \ factor/gmp-ecm/tinyecm.c \ factor/gmp-ecm/micropm1.c \ factor/gmp-ecm/microecm.c Last fiddled with by bsquared on 2023-03-13 at 19:40 |
|
![]() |
![]() |
![]() |
#8 |
Mar 2010
22×3×5 Posts |
![]()
Thanks, that correction and a change of flags did the trick. Love the speed increase from v1!
Last fiddled with by Mr. Odd on 2023-03-14 at 15:06 |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How I Install CADO-NFS onto my Ubuntu Machines | EdH | EdH | 8 | 2023-04-18 17:40 |
How I Install ggnfs onto my Ubuntu Machines | EdH | EdH | 6 | 2022-10-15 13:41 |
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 GMP onto my Ubuntu Machines | EdH | EdH | 0 | 2018-02-21 23:48 |