mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   CADO-NFS (https://www.mersenneforum.org/forumdisplay.php?f=170)
-   -   CADO NFS (https://www.mersenneforum.org/showthread.php?t=11948)

thome 2009-05-28 16:23

[quote=R.D. Silverman;175100]I will not be using the make files. I will do this under VC++ and use
windoze .dsw files..........

This will take some time.. I have little enough of it.[/quote]

I have zero experience with windows, but I feel that it's a lot of work (not to discourage you -- much the contrary). Note that cmake claims to be able to build VC++ project files, so maybe you could try that.

E.

thome 2009-05-28 19:08

[quote=frmky;175023]
Having said all of this, it worked for a small example but when I tried a larger example, all of the algsqrt's failed with "condition (nab & 1) == 0 failed" or "the squares do not agree modulo n!" so there are probably one or more of the parameters that are completely inappropriate for larger numbers.[/quote]

There are some known issues with snfs factorizations. sqrt code is probably over-zealous on some assumptions.

If you still have an example polynomial which fails, we can try to address the problem you encounter.

E.

frmky 2009-05-30 07:20

[QUOTE=thome;175123]There are some known issues with snfs factorizations. sqrt code is probably over-zealous on some assumptions.

If you still have an example polynomial which fails, we can try to address the problem you encounter.

E.[/QUOTE]

I must be doing something wrong, then, as a GNFS case just failed the same way. I can post the relations for you to download if you've got a fast enough connection to download a total of 1GB.

fivemack 2009-05-31 15:03

I'm running through a medium SNFS example I have lying around (fibonacci(1039)); the matrix comes out as

[code]
Renumbering columns (including sorting w.r.t. weight)
Sorting columns by decreasing weight
small_nrows=5582216 small_ncols=5582056
Writing sparse representation to file
#T# writing sparse: 80.00
# Weight(M_small) = 259518490
Writing index file
#T# writing index file: 6.20
[/code]

versus

[code]
Mon May 18 09:14:02 2009 matrix is 4854784 x 4855032 (1383.4 MB) with weight 336557789 (69.32/col)
Mon May 18 09:14:02 2009 sparse part has weight 314102671 (64.70/col)
Mon May 18 09:14:02 2009 matrix includes 64 packed rows
[/code]

However, I wanted to see which of the bw routines was the sensible one to use on i7 for a matrix of this size, so did

[code]
nfsslave2@cow:/scratch/fib1039/with-cado$ /home/nfsslave2/cado/cado-nfs-20090528-r2167/build/cow/linalg/bwc/u128_bench snfs.small
[/code]

and got
[code]
Using implementation "sliced"
no cache file snfs.small-sliced.bin
T0 Building cache file for snfs.small
code BUG() : condition x >> 16 == 0 failed in push at /home/nfsslave2/cado/cado-nfs-20090528-r2167/linalg/bwc/matmul-sliced.cpp:108 -- Abort
Aborted
[/code]

What am I doing wrong?

Chris Card 2009-05-31 18:06

[QUOTE=Jeff Gilchrist;174895]Anyone have success building this? I keep getting errors during the build process. Seems quite complex with pthreads and MPI versions available.[/QUOTE]

I tried to build it on Linux with gcc 4.4.0, and I got a couple of errors:
1./home/chris/cado-nfs-20090528-r2167/utils/ularith.h: In function ‘ularith_sqr_ul_2ul’:
/home/chris/cado-nfs-20090528-r2167/utils/ularith.h:386: error: ‘%’ constraint used with last operand
which was easily fixed by changing "%0" to "0" and
2. /home/chris/cado-nfs-20090528-r2167/utils/modredc_15ul.c: In function ‘modredc15ul_isprime’:
/home/chris/cado-nfs-20090528-r2167/utils/modredc_15ul.c:274: error: expected declaration or statement at end of input
which has got me stumped because I can't even see an implementation of modredc15ul_isprime anywhere, let alone in that file.

Chris

akruppa 2009-05-31 18:54

The _isprime() functions is defined in modredc_2ul_common.c and gets renamed according to the modulus width that is used for the arithmetic. From the first error I take it that you're doing a 32 bit build (and with gcc 4.4.0, no less - good luck!). It's probably just a missing bracket in the asm macros, I'll look.

EDIT: modredc_2ul_common.c needs a } in line 915, after line "mod_intcmp (n, c5783688565841) != 0;"

Edit2: Tom, your question is strictly Manu's territory.

Alex

fivemack 2009-05-31 21:32

I'm not very good on French nicknames; is Manu Emmanuel Thomé?

Is there actually any point in people outside the development team attempting to run this code on reasonably-sized (days rather than minutes or weeks of linalg) examples yet?

thome 2009-06-02 11:09

[quote=fivemack;175421]I'm not very good on French nicknames; is Manu Emmanuel Thomé?[/quote]

yes.

[quote=fivemack;175421]
Is there actually any point in people outside the development team attempting to run this code on reasonably-sized (days rather than minutes or weeks of linalg) examples yet?[/quote]

absolutely.

For the problem you encounter, the fix is quite trivial. The ``good'' low-level code for matrix multiplication is not (yet) the default one. The default, a.k.a. ``sliced'' variant, chokes on matrices having zero blobs larger than 4096*65536. In order to use the better, faster variant called ``bucket'', add bwc_mm_impl=bucket to the params file. Or change the default in linalg/bwc/matmul.c.

E.

thome 2009-06-02 11:15

[quote=fivemack;175400]
However, I wanted to see which of the bw routines was the sensible one to use on i7 for a matrix of this size, so did

[code]
nfsslave2@cow:/scratch/fib1039/with-cado$ /home/nfsslave2/cado/cado-nfs-20090528-r2167/build/cow/linalg/bwc/u128_bench snfs.small
[/code]and got
[code]
Using implementation "sliced"
no cache file snfs.small-sliced.bin
T0 Building cache file for snfs.small
code BUG() : condition x >> 16 == 0 failed in push at /home/nfsslave2/cado/cado-nfs-20090528-r2167/linalg/bwc/matmul-sliced.cpp:108 -- Abort
Aborted
[/code]What am I doing wrong?[/quote]

More in detail. You're doing it right. It's just that this particular variant can't cope with this matrix. It's a good thing to try out the different options with the *_bench programs (in that particular case, u128_bench uses sse-2).

Some defaults are set in matmul-bucket.cpp, you might also try to change them a bit -- notably the CUTOFF2 value, which is perhaps still a bit large. Such changes require to rebuild the cached matrix file called mat.h#.v#-something.bin ; so before re-running uXXX_bench, rm that file first.

E.

joral 2009-06-02 15:26

I'm running into a different issue, attempting to run the process manually.

When I try to run the linear algebra, I get an error about

fopen(mat.info)

saying there is not such file. This is from memory, but I can get the exact error when I get home.

Is there some other process that I missed?

thome 2009-06-02 19:18

[quote=joral;175637]I'm running into a different issue, attempting to run the process manually.

When I try to run the linear algebra, I get an error about

fopen(mat.info)

saying there is not such file. This is from memory, but I can get the exact error when I get home.

Is there some other process that I missed?[/quote]

this is a shortcoming in the perl driver script, which I'm going to fix. A program called ``balance'' must have been run prior to reaching the point which reads mat.info (presumably ``u64n_prep''). ``balance'' populates the working directory with the matrix files. Unfortunately, the driver script is very crude and is content with an existing, yet empty subdir as a proof of completion for ``balance''. So pending a less crude behaviour from the bwc.pl script (which should come RSN), you may either:

- rmdir the empty directory (something like /path/to/matrix-<number>x<number>) and rerun bwc.pl with the same command line.

- run bwc.pl with ``:balance'' instead of ``:complete'' first. This will add the missing files.

This being said, unless you've really try to run the stuff manually and got it wrong, there's a possibility that the ``balance'' program wasn't found because of a nasty shell variable expansion problem which has been fixed last week. So I'll refresh the snapshot anyway, there's good chance your problem will be fixed.

E.


All times are UTC. The time now is 20:39.

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