mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Msieve (https://www.mersenneforum.org/forumdisplay.php?f=83)
-   -   Python Driver for GGNFS and MSIEVE (https://www.mersenneforum.org/showthread.php?t=12981)

Brian Gladman 2010-03-07 13:09

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

tmorrow 2010-03-07 13:59

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 = ''
[B]MSIEVE = './' + MSIEVE[/B]

Alter Line 297 from

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

to

ex = ((GGNFS_PATH if exe != [B]MSIEVE[/B]
else '') + exe + EXE_SUFFIX)[/CODE]

I don't have a Linux system at my disposal right now or I'd try it out now for you.

ET_ 2010-03-07 14:12

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

[/code]

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

tmorrow 2010-03-07 14:47

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.

ET_ 2010-03-07 14:52

[QUOTE=tmorrow;207654]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.[/QUOTE]

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? :smile:

mc5225 AT mclink DOT it
Luigi

10metreh 2010-03-07 16:28

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.

Brian Gladman 2010-03-07 16:54

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

Brian

tmorrow 2010-03-07 16:54

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
[url]http://ggnfs.svn.sourceforge.net/viewvc/ggnfs/trunk.tar.gz[/url].
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.
[/CODE]

ET_ 2010-03-07 23:50

Thank you all :smile:

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

Luigi :bow:

yoyoyogi 2010-03-08 21:01

1 Attachment(s)
Hi,

The second attempt with my factoring task resulted with the same error:
[I]
polynomial selection complete
error: polynomial is missing or corrupt
Msieve Error: return value -1. Terminating...[/I]

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:
...
[I]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]

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

Brian Gladman 2010-03-08 21:37

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


All times are UTC. The time now is 22:43.

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