Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-mathematics/factmsieve/files: factmsieve-76.patch
Date: Fri, 30 Nov 2012 07:25:26
Message-Id: 20121130072515.93A0520C65@flycatcher.gentoo.org
1 patrick 12/11/30 07:25:15
2
3 Added: factmsieve-76.patch
4 Log:
5 Initial import, ebuild by me
6
7 (Portage version: 2.2.0_alpha143/cvs/Linux x86_64, unsigned Manifest commit)
8
9 Revision Changes Path
10 1.1 sci-mathematics/factmsieve/files/factmsieve-76.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/factmsieve/files/factmsieve-76.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/factmsieve/files/factmsieve-76.patch?rev=1.1&content-type=text/plain
14
15 Index: factmsieve-76.patch
16 ===================================================================
17 --- factmsieve.py 2010-12-02 13:59:20.000000000 +0800
18 +++ factmsieve.py.new 2012-11-30 15:06:50.566116187 +0800
19 @@ -1,3 +1,4 @@
20 +#!/usr/bin/env python2
21 # factmsieve.py - A Python driver for GGNFS and MSIEVE
22 #
23 # Copyright (c) 2010, Brian Gladman
24 @@ -56,9 +57,12 @@
25 import time, subprocess, gzip, glob, math, tempfile, datetime
26 import atexit, threading, collections, multiprocessing, platform
27
28 +# need to save pwd
29 +CUR_DIR=os.path.realpath(os.curdir)
30 +
31 # Set binary directory paths
32 -GGNFS_PATH = '../../bin/x64/Release/'
33 -MSIEVE_PATH = '../../../msieve/build.vc10/x64/Release/'
34 +GGNFS_PATH = '/usr/bin/'
35 +MSIEVE_PATH = '/usr/bin/'
36
37 # Set the number of CPU cores and threads
38 NUM_CORES = 4
39 @@ -69,7 +73,7 @@
40 # number of linear algebra threads to launch
41 LA_THREADS = NUM_CORES * THREADS_PER_CORE
42
43 -USE_CUDA = True
44 +USE_CUDA = False
45 GPU_NUM = 0
46 MSIEVE_POLY_TIME_LIMIT = 0
47
48 @@ -103,8 +107,8 @@
49
50 # default parameter files
51
52 -DEFAULT_PAR_FILE = GGNFS_PATH + 'def-par.txt'
53 -DEFAULT_POLSEL_PAR_FILE = GGNFS_PATH + 'def-nm-params.txt'
54 +DEFAULT_PAR_FILE = '/usr/share/doc/ggnfs/def-par.txt'
55 +DEFAULT_POLSEL_PAR_FILE = '/usr/share/doc/ggnfs/def-nm-params.txt'
56
57 # temporary files
58
59 @@ -258,7 +262,8 @@
60 # write string to log(s):
61
62 def write_string_to_log(s):
63 - with open(LOGNAME, 'a') as out_f:
64 + # XXX hax
65 + with open(CUR_DIR+'/'+LOGNAME, 'a') as out_f:
66 print(date_time_string() + s, file = out_f)
67
68 def output(s, console = True, log = True):
69 @@ -357,8 +362,9 @@
70 msd = os.path.abspath(os.path.join(cwd, MSIEVE_PATH))
71 os.chdir(msd)
72 rel = os.path.relpath(cwd)
73 + LOGNAME_m=LOGNAME+"_m"
74 dp = os.path.join(rel, DATNAME)
75 - lp = os.path.join(rel, LOGNAME)
76 + lp = os.path.join(rel, LOGNAME_m)
77 ip = os.path.join(rel, ININAME)
78 fp = os.path.join(rel, FBNAME)
79 args = ('-s {0:s} -l {1:s} -i {2:s} -nf {3:s} '