mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2010-03-07, 13:09   #287
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

22×7×19 Posts
Default

Although I sometimes use Linux, I don't run factmsieve.py in a Linux environment so I would not be certain what I should do to cater for this issue without messing up Linux uses of the program that are currently working.

However, if anyone would like to propose (and test) a fix, I will be happy to add it.

Brian
Brian Gladman is offline   Reply With Quote
Old 2010-03-07, 13:59   #288
tmorrow
 
tmorrow's Avatar
 
Jan 2004

10310 Posts
Default

There are a couple of approaches, neither one will break currently working systems once implemented correctly. Sadly, the default Linux user will suffer this problem when running factmsieve.py as it is, I'm surprised others haven't raised this problem before now.

Method 1:

Simply add ./ on the front of the msieve call. You already strip off the path and change directory to MSIEVE_PATH before invoking msieve anyway. Rather than "msieve ..." the invocation will look like "./msieve ..."

Method 2:

Append . to the PATH environment variable at the start of your program using os.putenv or something similar (I don't code in python). The change will only last for the duration of the program and for any subshells spawned.

---

Using version 55 of factmsieve.py you should be able to get away with the following 2 line changes:

Code:
Line 108

if sys.platform.startswith('win'):
  EXE_SUFFIX = '.exe'
else:
  EXE_SUFFIX = ''
  NICE_PATH = ''
  MSIEVE = './' + MSIEVE

Alter Line 297 from

  ex = ((GGNFS_PATH if exe != 'msieve' 
         else '') + exe + EXE_SUFFIX)

to

  ex = ((GGNFS_PATH if exe != MSIEVE 
         else '') + exe + EXE_SUFFIX)
I don't have a Linux system at my disposal right now or I'd try it out now for you.

Last fiddled with by tmorrow on 2010-03-07 at 14:00
tmorrow is offline   Reply With Quote
Old 2010-03-07, 14:12   #289
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

32×5×107 Posts
Default

Another small bug from my side.

The factorization run smoothly, but the final call (-nc3) I had a "problem".

Code:
-> msieve -s example/example.dat -l example/example.log -i example/example.ini -nf example/example.fb -t 4 -nc1
compressing spairs.out to spairs.save.gz
-> Running matrix solving step ...
-> msieve -s example/example.dat -l example/example.log -i example/example.ini -nf example/example.fb -t 4 -nc2
linear algebra completed 80307 of 83376 dimensions (96.3%, ETA 0h 0m)    
-> Running square root step ...
-> msieve -s example/example.dat -l example/example.log -i example/example.ini -nf example/example.fb -t 4 -nc3
-> Computing 1.26797e+09 scale for this machine...
-> procrels -speedtest> PIPE
Traceback (most recent call last):
  File "../factmsieve.py", line 2054, in <module>
    (ret, res) = run_exe(PROCRELS, '-speedtest', out_file = subprocess.PIPE)
  File "../factmsieve.py", line 300, in run_exe
    p = subprocess.Popen([ex] + args.split(' '), **al)
  File "/usr/lib/python2.6/subprocess.py", line 621, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1126, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Looks like I miss the "procrels" file, but I can't find it anywhere the Linux version among the precompiled binaries I have.
I thought the last call for factorization was msieve -nc3. Oh, well, going to look for procrels...

Luigi

Last fiddled with by ET_ on 2010-03-07 at 14:46
ET_ is offline   Reply With Quote
Old 2010-03-07, 14:47   #290
tmorrow
 
tmorrow's Avatar
 
Jan 2004

103 Posts
Default

Looks like a problem running procrels, part of the GGNFS suite. Looking at your directory listing in post #278, you don't have procrels there, in fact you are missing several of the 16+ binaries that get created when you make GGNFS - have a look again at Jeff's site.
tmorrow is offline   Reply With Quote
Old 2010-03-07, 14:52   #291
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

113178 Posts
Default

Quote:
Originally Posted by tmorrow View Post
Looks like a problem running procrels, part of the GGNFS suite. Looking at your directory listing in post #278, you don't have procrels there, in fact you are missing several of the 16+ binaries that get created when you make GGNFS - have a look again at Jeff's site.
In fact I was using Jeff's link, but it only contains 64-bit lasieves, and nothing else.
May I ask here for a precompiled procrels compiled under Linux64, or should I attempt to compile it myself from scratch?

mc5225 AT mclink DOT it
Luigi
ET_ is offline   Reply With Quote
Old 2010-03-07, 16:28   #292
10metreh
 
10metreh's Avatar
 
Nov 2008

1001000100102 Posts
Default

All procrels does is measure the speed of the computer to convert the time into "units" for the g/sXXX.txt summary file. With the old factLat.pl script, procrels converts lasieve4 relations into GGNFS postprocessing relations and then removes duplicates.
10metreh is offline   Reply With Quote
Old 2010-03-07, 16:54   #293
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

10000101002 Posts
Default

Thanks for the changes to the script - I have added them to the attached version (untested).

Brian

Last fiddled with by jasonp on 2010-07-22 at 03:27 Reason: remove old attachment
Brian Gladman is offline   Reply With Quote
Old 2010-03-07, 16:54   #294
tmorrow
 
tmorrow's Avatar
 
Jan 2004

103 Posts
Default

ET, have a crack at building the project yourself, it doesn't take long and will give you the complete suite of GGNFS utilities. Read the doco for how to build it or find instructions in this and related forums. Here's what I do in short:

Code:
1. Download the latest source code trunk.tar.gz from
   http://ggnfs.svn.sourceforge.net/vie...s/trunk.tar.gz.
2. Start a bash command shell.
3. Untar the source code "tar xvf trunk.tar.gz".
4. Rename the trunk directory "mv trunk ggnfs".
5. cd ggnfs and run "make" to see the targets that can be run. Decide on one.
6. Make ggnfs - E.g. "make noncona"  [takes around 3 minutes]
7. Binaries live in ggnfs/bin
8. If you have all the utilities you can create the doco with "make doc".
   Documentation lives in ggnfs/doc.

Last fiddled with by tmorrow on 2010-03-07 at 16:58
tmorrow is offline   Reply With Quote
Old 2010-03-07, 23:50   #295
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

12CF16 Posts
Default

Thank you all

Compiling GGNFS suite was easier than I thought, and the whole suite works like a charm.

Luigi
ET_ is offline   Reply With Quote
Old 2010-03-08, 21:01   #296
yoyoyogi
 
Feb 2010

7 Posts
Default

Hi,

The second attempt with my factoring task resulted with the same error:

polynomial selection complete
error: polynomial is missing or corrupt
Msieve Error: return value -1. Terminating...


While this process was executing, I was able to acquire another machine to perform the same operation. This third attempt resulted with a different error after polynomial selection, but it seemed similar to the last two attempts:
...
batch 5000 493552291
batch 5000 499641341
batch 5000 505718911
polynomial selection complete
error generating or reading NFS polynomials
elapsed time 297:51:11
Traceback (most recent call last):
File "C:\ggnfs\factmsieve.py", line 1960, in <module>
run_msieve_poly(fact_p)
File "C:\ggnfs\factmsieve.py", line 890, in run_msieve_poly
fb_to_poly()
File "C:\ggnfs\factmsieve.py", line 857, in fb_to_poly
with open(NAME + '.fb', 'r') as in_f:
IOError: [Errno 2] No such file or directory: 'example.fb'
siever terminated

C:\ggnfs\example>


I've attached a zip containing all contents of my 'example' folder for attempt #3 as well.

It seems as though the polynomial selection process is performing, but the results are not being written to a file. Any idea what could be going wrong?

Thanks for the help,
-Yogesh
Attached Files
File Type: zip example.zip (1.3 KB, 68 views)
yoyoyogi is offline   Reply With Quote
Old 2010-03-08, 21:37   #297
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

21416 Posts
Default

I don't think these are errors in factmsieve.py since it seems to be behaving nomally.

It seems that msieve does its work but is unable to write its output to a file. What is the host operating system? Are you sure that the binaries are set up with the correct write permissions?

Brian
Brian Gladman is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Msieve & ggnfs on MacOS xilman Msieve 8 2017-05-20 00:12
Factorizing with MSIEVE, GGNFS & Factmsieve.py Romuald Msieve 24 2015-11-09 20:16
Infinite loop for ggnfs or msieve Greebley Aliquot Sequences 4 2013-02-06 19:28
Error running GGNFS+msieve+factmsieve.py D. B. Staple Factoring 6 2011-06-12 22:23
A new driver? (or type of driver?) 10metreh Aliquot Sequences 3 2010-02-15 15:57

All times are UTC. The time now is 01:24.


Sat Jul 17 01:24:52 UTC 2021 up 49 days, 23:12, 1 user, load averages: 1.03, 1.09, 1.18

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, 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.