View Single Post
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