mersenneforum.org Could use some scripting help (windows)
 Register FAQ Search Today's Posts Mark Forums Read

 2012-11-16, 18:57 #1 Greebley     May 2009 Dedham Massachusetts USA 84310 Posts Could use some scripting help (windows) Currently, I have a very primitive way of submitting sequences to the database (this is a *.bat file on windows). For example: aliqueit -c 60 6261388 aliqueit -s 0 6261388 aliqueit -c 60 6261822 aliqueit -s 0 6261822 .... Each number is listed separately (I create the list using emacs macros so long lists isn't an issue). This has some major weaknesses for new sequences like ones over 6 million. The biggest problem is that I hit the 3000 limit, I am not submitting the sequences to the database at all I was thinking of splitting out the sends to the data base from the running of the sequences, but to do that I really need a way to know if I am at the 3000 limit and I need a loop like the following pseudo-code: for each item in a list: Check if we are at the 3000 limit. if so wait 5 min and try again If not at the limit, submit the sequence (using aliqueit -s or some other method) It also occurs to me that submitting from 0 each time is sending too much. An enhancement is to find the length of the sequence in the database and send only the needed part (which may be nothing in which case I can skip the sequence). I could use the current index/length for: aliqueit -s I don't know how expensive it is to find the length of a sequence vs sending the whole thing, but I am thinking finding the length is cheaper. I do know the number of database queries is quite large if I submit from 0 each time. I could look up how to loop in a batch file from the internet, but I have no idea how to find if I am at the limit (optional: or find the length of the sequence from the database). I was wondering if anyone has done this already, or can help me do this. I will be away next week for thanksgiving and I can't respond right away, so thanks in advance for any help anyone can offer. I do have perl, but am not proficient in it if that is better than a batch file. Last fiddled with by Greebley on 2012-11-16 at 18:57
 2012-11-16, 19:53 #2 Dubslow Basketry That Evening!     "Bunslow the Bold" Jun 2011 40 1 and sys.argv[1] == '-R': R = True first = list.split()[0] for seq, ind in [line.split() for line in list.splitlines()]: if not (R and seq == first): os.system('wget --cache=off "http://factordb.com/elf.php?seq={}&type=1" -O {}.elf'.format(seq, seq)) os.system('taskset fe nice -n 19 ~/yafu/ali/aliqueit -y {} -d 120'.format(seq)) os.system('~/yafu/ali/aliqueit -s {} {}'.format(ind, seq))`

 Similar Threads Thread Thread Starter Forum Replies Last Post stebbo Software 5 2016-09-17 08:45 ixfd64 Lounge 23 2013-04-13 11:12 Unregistered Information & Answers 14 2010-04-10 21:47 frmky GMP-ECM 4 2005-09-30 18:42 antiroach Factoring 12 2004-04-26 19:17

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

Mon Mar 8 22:14:27 UTC 2021 up 95 days, 18:25, 0 users, load averages: 2.10, 2.25, 2.07