Go Back > Extra Stuff > Blogorrhea > Dylan14

Closed Thread
Thread Tools
Old 2021-01-17, 15:18   #1
Dylan14's Avatar
Mar 2017

24×37 Posts
Default pkgbuild reference thread

This thread is intended to serve as reference material for the status of PKGBUILDS for software used by the various people on the forum. It is particularly useful for those that run Arch or derivatives, or for those that want to package the software onto a different Linux distribution, so people can use it without having to worry about compilation.

Table of contents:
1. Introduction (this post)

GIMPS related:
2. mprime (
3. mlucas (
4. gpuowl (
5. mfaktc (
6. mfakto
7. cudapm1
8. CUDALucas

Prime finding (general stuff):
9. LLR
10. pfgw64
11. mtsieve
12. srsieve (sr1, sr2, sr5)

13. etc tbd

Last fiddled with by Dylan14 on 2021-01-19 at 23:42 Reason: add links
Dylan14 is offline  
Old 2021-01-17, 15:32   #2
Dylan14's Avatar
Mar 2017

10010100002 Posts
Default mprime

There are two packages for this program, both maintained by the AUR user graysky: mprime and mprime-bin. Both packages are on the latest stable build, which at the time of posting is 30.3b6.

The first package, mprime builds the program from scratch, which includes building the gwnum library (but it does not include it as part of the compiled package itself, which would be useful for those who want to build llr or pfgw from source). Included in the package is a patch file which basically fixes the make flags so that the program can successfully compile.
A downside to this is that the version of mprime built can't communicate with the work server, as to protect against fake result submission from modified clients.

The second package, mprime-bin, is the precompiled version of the program, which is available on the main site. This can communicate with the work server. It's recommended to choose a directory to run mprime, or to set the appropriate options in the config files to ensure proper operation.
Dylan14 is offline  
Old 2021-01-17, 15:45   #3
Dylan14's Avatar
Mar 2017

11208 Posts
Default mlucas

There is a package for this program, developed by me here. The program does not require any dependencies (outside of the standard ones in the base-devel group, which is needed to build stuff in the AUR).

The PKGBUILD for this program follows the same procedure recommended by Ernst to build the package from source. First, it checks /proc/cpuinfo to see what instructions the program supports (SSE2, AVX, AVX2, AVX512, and SIMD for ARM chips), and then compiles the code. Next, it checks if there are any errors by grepping build.log for error. If no such instances exist then it proceeds with linking and package the resulting executable up.

To get the program to compile properly, a patch is needed: sysctl-missing.patch, which is needed since sysctl.h is not included in version 5.5+ of the Linux Kernel.
In version 19 of the program, an additional patch was needed. This was to get rid of a reference to the fp pointer in the file Mlucas.c. Leaving it in there would cause the linker to complain. This has since been corrected in version 19.1, and therefore this patch is no longer needed.

Last fiddled with by Dylan14 on 2021-02-15 at 20:46 Reason: update to reflect v19.1
Dylan14 is offline  
Old 2021-01-19, 23:26   #4
Dylan14's Avatar
Mar 2017

59210 Posts
Default gpuowl

There is a package for this program, developed by me here. This program requires two dependencies: gmp and ocl-icd (both of which are available on the main Arch repos).

The file uses the stable tag version of the program and not the latest git commit. Otherwise, it is a straightforward build process.

A git version of this package could also be developed, however, this would require several changes to the PKGBUILD. Namely, the source would have to change from the current archive link to git+, checksums would have to be skipped, a pkgver() function would be needed to get the correct version, and possibly other changes. Also, I am not sure if the current git version is that much different from the stable 7.2 version.
Dylan14 is offline  
Old 2021-01-19, 23:41   #5
Dylan14's Avatar
Mar 2017

24·37 Posts
Default mfaktc

There is a package for this program, developed by me here. This requires two dependencies: nvidia (the NVIDIA driver) and cuda (CUDA build environment), for the building of the program.

There is a patch needed to make the program build with the correct CC versions. This is contained in the file makeandparams.patch. The current version of CUDA at the time of this post (11.2) supports CC's 3.5-8.6. As new versions come out the NVCCFLAGS included in this patch file will need to be updated.
Also, the location of the CUDA toolkit has to be specified to be /opt/cuda/, instead of /usr/local/cuda/.

In addition, I changed the params.h file to allow the GPU_SIEVE_SIZE to go up to 2047.

Also provided is a default mfaktc.ini file, which is installed to /etc/mfaktc/mfaktc.ini. The user is advised to copy this into the directory in which he wants to run mfaktc in.

On occasion, a maximum CUDA version has to be specified since the driver may lag behind the CUDA toolkit. When this happens the user has 2 options: 1. Either downgrade CUDA and add cuda to the IgnorePkg line in /etc/pacman.conf until the driver catches up, or 2. Install the nvidia-beta driver from the AUR.
Dylan14 is offline  
Closed Thread

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reference material discussion thread kriesel kriesel 85 2022-05-15 23:27
new participant reference kriesel kriesel 9 2022-02-17 12:55
Mlucas-specific reference thread kriesel kriesel 20 2021-11-18 19:22
Google Colaboratory reference thread kriesel kriesel 20 2021-11-11 02:55
NFS reference Jushi Math 2 2006-08-28 12:07

All times are UTC. The time now is 04:21.

Thu Jul 7 04:21:39 UTC 2022 up 84 days, 2:22, 0 users, load averages: 1.42, 1.93, 1.79

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔