mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2014-12-08, 19:33   #1
D. B. Staple
 
D. B. Staple's Avatar
 
Nov 2007
Halifax, Nova Scotia

23×7 Posts
Default Build Instructions for Ubuntu 14.04

I'm trying to write a script that will take an empty directory on Ubuntu 14.04 and perform all the steps needed to get GGNFS + Msieve + factmsieve.py playing nicely together. Here is what I have:
Code:
#!/bin/bash

# Compile msieve:
  sudo apt-get install libgmp-dev
  wget http://downloads.sourceforge.net/project/msieve/msieve/Msieve%20v1.52/msieve152.tar.gz
  tar xzvf msieve152.tar.gz
  pushd msieve-1.52
  make all
  popd

# Compile GGNFS:
  sudo apt-get install subversion
  svn checkout svn://svn.code.sf.net/p/ggnfs/code/trunk ggnfs-code
  pushd ggnfs-code
  make x86_64
  popd

# Configure factmsieve.py:
  # Download factmsieve.77.zip from http://www.mersenneforum.org/showthread.php?t=12981&page=65
  wget "http://www.mersenneforum.org/attachment.php?attachmentid=10171&d=1377631047" -O factmsieve.77.zip
  unzip -o factmsieve.77.zip
  chmod +x factmsieve.py
  cp factmsieve.py factmsieve_original.py
  sed -i '1i #!/usr/bin/env python' factmsieve.py
  sed -i "s/GGNFS_REL_PATH = '..\/bin\/x64\/Release\/'/GGNFS_REL_PATH = '.\/'/g" factmsieve.py
  sed -i "s/MSIEVE_REL_PATH = '..\/..\/msieve\/bin\/x64\/Release\/'/MSIEVE_REL_PATH = '.\/'/g" factmsieve.py
  sed -i 's/NUM_CORES = 4/NUM_CORES = 6/g' factmsieve.py
  sed -i 's/USE_CUDA = True/USE_CUDA = False/g' factmsieve.py
  diff factmsieve_original.py factmsieve.py

# Consolodate binaries:
  cp -pr ggnfs-code/bin/* .
  mv msieve-1.52/* .

# Create example input file and run test calculation:
  echo "n: 2881039827457895971881627053137530734638790825166127496066674320241571446494762386620442953820735453" > example.n
  time ./factmsieve.py example
Polynomial selection runs OK, but I get the following when sieving starts:
Code:
Mon Dec 08 12:10:10 2014 -> Return value -11. Updating job file and terminating...
I've attached the entire example and log file. If someone could give me a hand then I'd appreciate it.
Attached Files
File Type: zip example.zip (162.5 KB, 322 views)
D. B. Staple is offline   Reply With Quote
Old 2014-12-08, 21:47   #2
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Default

Does installing libgmp-dev actually install the necessary GMP library files?
Dubslow is offline   Reply With Quote
Old 2014-12-08, 22:15   #3
D. B. Staple
 
D. B. Staple's Avatar
 
Nov 2007
Halifax, Nova Scotia

23×7 Posts
Default

Quote:
Does installing libgmp-dev actually install the necessary GMP library files?
As far as I can tell, yes. Without that package, Msieve will not compile, and GCC will complain that gmp.h is missing. Once that package is installed, Msieve compiles. I can also say that installing libgmp-dev allows me to compile an old GMP-based code of mine using -lgmp. When I remove that package, gcc complains that gmp.h is missing for my code as well.
D. B. Staple is offline   Reply With Quote
Old 2014-12-09, 16:23   #4
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

152B16 Posts
Default

This may be totally useless to you, but in case it's of interest, I have a manual install that includes GGNFS and msieve on its way to setting up Aliqueit, shown here:

Steps to Install and set up Aliqueit on an Ubuntu... Computer
EdH is offline   Reply With Quote
Old 2014-12-09, 16:32   #5
D. B. Staple
 
D. B. Staple's Avatar
 
Nov 2007
Halifax, Nova Scotia

23×7 Posts
Default

That doesn't look useless at all. In fact, it looks very similar to what I've been doing. Can I ask which versions of GGNFS, Msieve, and factmseive.py you tested this with?
D. B. Staple is offline   Reply With Quote
Old 2014-12-10, 15:47   #6
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

5,419 Posts
Default

Quote:
Originally Posted by D. B. Staple View Post
That doesn't look useless at all. In fact, it looks very similar to what I've been doing. Can I ask which versions of GGNFS, Msieve, and factmseive.py you tested this with?
The last time I was running this software was quite a while ago, but I just installed everything this morning on a Pentium 4, 64-bit Ubuntu 14.04 64-bit machine to test it and it seems to be functioning with msieve r975, gmp 6.0.0a, ecm 6.4.4, today's d/l of ggnfs-master.zip and factmsieve.py 0.76. My link for factmsieve.py is broken, so I need to change that to get version 0.77, but I have several copies of 0.76 handy. I had no glitches (other than the broken link) and am running a small portion of sequence 4788 to test the installation. Everything seems to be running as it should, but I'll update later, after it adds some lines. Also, I am using the sieves from ggnfs in this test, instead of the better ones referenced on my page.
EdH is offline   Reply With Quote
Old 2014-12-10, 19:50   #7
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

5,419 Posts
Default Update to previous post...

My machine ran several ggnfs factorizations without any hitches. Aliqueit ran several lines of an early section of 4788 with composites around 95 digits. Msieve QS was invoked to find some minor factors and it was used to perform poly selection, whereby factmsieve.py then ran the ggnfs steps to complete the larger jobs. All performed well.
EdH is offline   Reply With Quote
Old 2014-12-10, 22:41   #8
D. B. Staple
 
D. B. Staple's Avatar
 
Nov 2007
Halifax, Nova Scotia

3816 Posts
Default

Thank you very much. I am trying to reproduce your work now. I'll also try to isolate the issue with my original instructions. Two questions: Firstly, what version of Python are you using? Secondly, can you share your copy of version 0.76 factmsieve.py? I am suspicious that the issue might be related to factmsieve.py compatibility.
D. B. Staple is offline   Reply With Quote
Old 2014-12-11, 01:12   #9
D. B. Staple
 
D. B. Staple's Avatar
 
Nov 2007
Halifax, Nova Scotia

23×7 Posts
Default

OK, the issue was with GGNFS. The version that you pointed to on GitHub (https://github.com/radii/ggnfs) contains bug fixes and updates that are not in the trunk release on SourceForge (http://sourceforge.net/p/ggnfs/code/HEAD/tree/). I find this a bit strange, because the code on SourceForge (r440) shows modifications from 2013, while the code on GitHub has had no commits since 2011. However:
1) The code from GitHub works for me, while the SourceForge code does not.
2) As I said, there are bug fixes in the GitHub code that aren't in the SF code, for example, this commit fixes a bug that's still live in the SourceForge code.

Does anyone know what's going on here? Was there a fork in GGNFS development?
D. B. Staple is offline   Reply With Quote
Old 2014-12-11, 02:49   #10
D. B. Staple
 
D. B. Staple's Avatar
 
Nov 2007
Halifax, Nova Scotia

23·7 Posts
Default

For reference, here are build instructions. Starting from a fresh install of Ubuntu Server 14.04.1 LTS 64-bit, the following will get you up and running with GGNFS (GitHub commit 3490572ca8, Apr. 23, 2011), Msieve (SF SVN revision 975, Sep. 30, 2014), and factmsieve.py (version 0.77, MersenneForum.org, Aug 27, 2013).

Thank you EdH for your help working this out.

Code:
#!/bin/bash

# Install some dependencies
sudo apt-get install g++ subversion m4 wget zlib1g-dev make libgmp-dev gmp-ecm libecm-dev unzip

# Download & compile GGNFS
wget https://github.com/radii/ggnfs/archive/master.zip
unzip master.zip
mv ggnfs-master ggnfs
pushd ggnfs
make x86_64
popd

# Download & compile Msieve
svn co https://svn.code.sf.net/p/msieve/code/trunk msieve
pushd msieve
make all NO_ZLIB=1 ECM=1
popd

# Download & configure factmsieve.py
# factmsieve.77.zip comes from http://www.mersenneforum.org/showthread.php?t=12981&page=65
wget "http://www.mersenneforum.org/attachment.php?attachmentid=10171&d=1377631047" -O factmsieve.77.zip
unzip -o factmsieve.77.zip
chmod +x factmsieve.py
cp factmsieve.py factmsieve_original.py
sed -i '1i #!/usr/bin/env python' factmsieve.py
sed -i "s/GGNFS_REL_PATH = '..\/bin\/x64\/Release\/'/GGNFS_REL_PATH = '.\/ggnfs\/bin\/'/g" factmsieve.py
sed -i "s/MSIEVE_REL_PATH = '..\/..\/msieve\/bin\/x64\/Release\/'/MSIEVE_REL_PATH = '.\/msieve\/'/g" factmsieve.py
sed -i 's/NUM_CORES = 4/NUM_CORES = 6/g' factmsieve.py
sed -i 's/USE_CUDA = True/USE_CUDA = False/g' factmsieve.py
diff factmsieve_original.py factmsieve.py

# Create example input file and run test calculation
echo "n: 2881039827457895971881627053137530734638790825166127496066674320241571446494762386620442953820735453" > example.n
time ./factmsieve.py example
D. B. Staple is offline   Reply With Quote
Old 2014-12-11, 05:25   #11
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

152B16 Posts
Default

Sorry I wasn't more readily available, but glad you got it worked out. I remember having the same issue with ggnfs, now that you bring it up. I had totally forgotten that until you mentioned it.
EdH is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Broadwell new instructions tha Hardware 6 2014-07-18 00:08
Useless SSE instructions __HRB__ Programming 41 2012-07-07 17:43
Project instructions MooooMoo Twin Prime Search 9 2006-06-06 13:30
Instructions to manual LLR? OmbooHankvald PSearch 3 2005-08-05 20:28
Instructions please? jasong Sierpinski/Riesel Base 5 10 2005-03-14 04:03

All times are UTC. The time now is 18:28.


Fri Mar 31 18:28:36 UTC 2023 up 225 days, 15:57, 0 users, load averages: 0.36, 0.68, 0.82

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

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