Search Criteria
Package Details: cado-nfs-git 20260529.60854e865-1
Package Actions
| Git Clone URL: | https://aur.archlinux.org/cado-nfs-git.git (read-only, click to copy) |
|---|---|
| Package Base: | cado-nfs-git |
| Description: | Implementation of the Number Field Sieve (NFS) algorithm for factoring integers |
| Upstream URL: | https://gitlab.inria.fr/cado-nfs/cado-nfs |
| Licenses: | LGPL-2.1-or-later |
| Conflicts: | cado-nfs |
| Provides: | cado-nfs |
| Submitter: | jdetrey |
| Maintainer: | AquilaIrreale |
| Last Packager: | AquilaIrreale |
| Votes: | 4 |
| Popularity: | 0.000000 |
| First Submitted: | 2015-12-07 12:57 (UTC) |
| Last Updated: | 2026-06-02 17:57 (UTC) |
Dependencies (15)
- fmt (fmt-gitAUR)
- gmp (gmp-hgAUR)
- hwloc
- python
- python-flask
- python-requests
- sqlite (sqlite-fossilAUR)
- cmake (cmake3AUR, cmake-gitAUR) (make)
- curl (curl-gitAUR, curl-c-aresAUR) (make)
- git (git-gitAUR, git-glAUR, git-wd40AUR) (make)
- gmp-ecm (make)
- inetutils (inetutils-gitAUR) (make)
- curl (curl-gitAUR, curl-c-aresAUR) (optional) – for cado-nfs-client.py
- gmp-ecm (optional) – for JL DLP polynomial selection
- perl (perl-gitAUR) (optional) – for bwc.pl
Latest Comments
« First ‹ Previous 1 2 3 4 5 Next › Last »
ccorn commented on 2021-08-15 18:48 (UTC)
Yes, that matches mine. Interestingly, setting
_march=haswellon mysandybridgeproduces the samecado_config.h(except for theC*FLAGSstrings of course), but results in incompatible binaries.AquilaIrreale commented on 2021-08-15 18:04 (UTC) (edited on 2021-08-15 18:04 (UTC) by AquilaIrreale)
Ok, so...
x86-64-v4is clearly too high a target to run on sandybridge CPUs, but on the other hand when I tried to compile it with the lowerx86-64-v2andx86-64-v3it just wouldn't build... neither would it if I set the various-msse4.2,-mavxetc. manually with the basic-march=x86-64. From what I readv2is very similar in terms of capabilities tosandybridge, andv3is tohaswell.About SIMD instructions,
-march=x86-64does have-msse2but it seems cado wants the higher stuff. In my trials, it always failed trying to compile intrinsics that relate to the AVX instruction set. Of course as I said, manually enabling-msse4.2and-mavxproved no solution.It does compile (and work) with
-march=sandybridgeon my i7 4790K which should be ahaswell, being the next major architecture right aftersandybridgeit would be strange otherwise... but still... it may be thatsandybridgeis the baseline architecture for this package, being the lowest "phisical" architecture to have AVX andx86-64-v2not working for some reason.Anyhow, this is the resulting
cado_config.h, looking about right I thinkccorn commented on 2021-08-15 16:41 (UTC) (edited on 2021-08-15 17:03 (UTC) by ccorn)
They are set somewhere, though the patch superficially suggests otherwise. The configuration produces a file
$srcdir/cado-nfs/build/$USER/cado_config.h. If you inspect that, you will find that theHAVE_*macros are set according to your-marchspec. Which is why building with-march=x86-64-v4can be done on mysandybridgeplatform, except that the produced binaries cannot be run there. However, CADO-NFS seems to require some form of SIMD datatype, and themakepkgdefault-march=x86-64apparently provides none, which causes build attempts to fail.Out of curiosity, I'd like to know whether anyone of you can build with
-march=sandybridge, and how this would change yourcado_config.h.AquilaIrreale commented on 2021-08-15 13:54 (UTC) (edited on 2021-08-15 17:30 (UTC) by AquilaIrreale)
Alright, let's set
-marchtonativefor now then, after all, binary portability is not of primary importance here on the AUR and at least it'll work in most cases.Still, I do not like this very much, there must be something wrong with the build system, and at the moment I don't have the time to check it thoroughly: what's the point of checking for availability of certain instruction sets such as AVX, setting flags in the form of
HAVE_AVX, and then trying to use those instruction sets anyways even when compiling for platforms that do not have those instructions? In the patch for issue #30019, if-marchis detected during configuration,HAVE_*feature flags are not set at all, which depending on how they are used by the build system may mean they are wrongly assumed false. In any case, I would have expected such flags to trigger some kind of conditional compilation to build a portable version of the software when specific platform features are not available, and if that's not the case at least to stop the build early since it clearly can't be completed. The factx86-64-v4compiles but crashes at runtime is quite baffling too.Anyhow that's the way it is, for now at least.
@ccorn I followed the outline of your patch but implemented it a little differently to account for
IFSin the word splitting ofC*FLAGS.I also removed
i686andpentium4from the arch array, since they clearly cannot be supported for the time being.ccorn commented on 2021-08-13 17:27 (UTC)
If I understand the issue correctly, previous builds were effectively
-march=nativebecause the auto-configuration examined the build machine and added SIMD support flags according to its capabilities. The recent patch now prevents this if-marchis specified.Thus, previous builds have been tuned to the build system even if that has not been explicit. So far, I have not seen a bug report about that. Therefore, I conclude that
-march=nativeis the major use case. After all, factorization projects tend to be long-running, and not tuning the builds would result in wasting lots of time, energy, and money.ccorn commented on 2021-08-13 16:48 (UTC)
For me,
x86-64-v4does not work: The built programs crash in the polynomial selection stage for a simple 90-digit factorization test. I triedx86-64-v3which did not work either.However,
-march=nativeand-march=sandybridgedo work for me. My build machine has Xeon E5-2670 which aresandybridgeplus AES. It has AVX, but not AVX2.If
sandybridgedoes not work for you even ifx86-64-v4does, I suppose that the specified-marchmust be close to-march=native. Which would make-march=nativethe only sensible choice (and the only one consistent with morearchentries thanx86_64), but then the built package will not be usable on older-generation platforms.There is a related issue and a related patchset.
By the way, I have chosen to also set
CXXFLAGSand delete other-marchspecs:AquilaIrreale commented on 2021-08-13 07:38 (UTC)
@Dylan14 thank you for your feedback, it seems the current version of cado-nfs uses Intel intrinsics that depend on very recent versions of the AVX instruction set on x86_64.
For now, I found out what I think the baseline architecture to have those instructions is, so that binary packages built with this PKGBUILD can still be somewhat redistributable (although owners of older x86_64 CPUs are screwed for now).
When I am a little less busy I am gonna check the build system to see if there's some flag to enable more portable code to support those older architectures.
AquilaIrreale commented on 2021-08-11 14:21 (UTC) (edited on 2021-08-11 14:22 (UTC) by AquilaIrreale)
@Dylan14 could you please compile the current PKGBUILD with
LC_ALL=C makepkg -Land send me the resulting log file?Dylan14 commented on 2021-08-11 01:15 (UTC)
@Aquilalrreale - no changes to my /etc/makepkg.conf.
AquilaIrreale commented on 2021-08-10 21:46 (UTC)
@Dylan14 are you building the package with the standard /etc/makepkg.conf or have you made changes to it? In a regular Arch's makepkg.conf -march should be set by default to x86_64, which I believe matches -march=auto on your CPU platfom. Can you double-check your config file is not setting it wrong it in the first place? Overriding this specific compiler flag inside the build script is usually not good practice.
« First ‹ Previous 1 2 3 4 5 Next › Last »