mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2013-04-18, 11:07   #1
Antonio
 
Antonio's Avatar
 
"Antonio Key"
Sep 2011
UK

32×59 Posts
Default File Splitting Utility

I looked for a program to split a newPgen output file to share between multiple instances of LLR, but I couldn't find one.

I present here a little utility to take a text file and split it into multiple (2 to 7) output files, for anyone who may be interested.

The selected (single) output file name will be appended with a digit (1 to 7) depending on the number of files requested. i.e. 'split' would become 'split.1', 'split.2', 'split.3' etc.

By default the first line of the input file is copied to all output files, so that the output files are still valid npg format.

After the first line is written the remaining input file lines are copied such that, for example for 3 output files,

output file 1 will contain input file lines 1, 2, 5, 8...
output file 2 will contain input file lines 1, 3, 6, 9...
output file 3 will contain input file lines 1, 4, 7, 9...

Antonio
Attached Files
File Type: exe File_split.exe (109.1 KB, 102 views)
Antonio is offline   Reply With Quote
Old 2013-04-18, 11:11   #2
axn
 
axn's Avatar
 
Jun 2003

22·33·47 Posts
Default

Quote:
Originally Posted by Antonio View Post
I looked for a program to split a newPgen output file to share between multiple instances of LLR, but I couldn't find one.
NewPGen itself can do this!

Services > Primality test on several machines...
axn is online now   Reply With Quote
Old 2013-04-18, 12:04   #3
Antonio
 
Antonio's Avatar
 
"Antonio Key"
Sep 2011
UK

32×59 Posts
Default

Quote:
Originally Posted by axn View Post
NewPGen itself can do this!

Services > Primality test on several machines...
Whoops .. didn't see that, thanks.

Oh well....at least I learned some new programming skills doing it.
Antonio is offline   Reply With Quote
Old 2013-04-18, 12:28   #4
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

12D016 Posts
Default

Quote:
Originally Posted by Antonio View Post
Whoops .. didn't see that, thanks.

Oh well....at least I learned some new programming skills doing it.
You are not alone... I did the same a couple years ago...

Luigi
ET_ is offline   Reply With Quote
Old 2013-04-18, 12:34   #5
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

11000110100002 Posts
Default

Quote:
Originally Posted by Antonio View Post
I looked for a program to split a newPgen output file to share between multiple instances of LLR, but I couldn't find one.
If all instances are on the same box or all boxes can talk to one another, use PRPNet. It would make your life easier as you won't have to manage all of those instances.

Last fiddled with by rogue on 2013-04-18 at 12:34
rogue is offline   Reply With Quote
Old 2013-04-18, 14:22   #6
Antonio
 
Antonio's Avatar
 
"Antonio Key"
Sep 2011
UK

53110 Posts
Default

Quote:
Originally Posted by rogue View Post
If all instances are on the same box or all boxes can talk to one another, use PRPNet. It would make your life easier as you won't have to manage all of those instances.
Thanks for the info, will take a look in a couple of weeks, when I get back home.
Antonio is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Splitting Work over Dual Boot justinstevens42 Information & Answers 3 2018-02-07 12:51
Utility of integer factorization. jwaltos Other Mathematical Topics 8 2015-05-22 12:20
Splitting P-1 stages TheMawn Information & Answers 3 2013-10-13 00:07
Faster factoring with binary splitting? __HRB__ Software 3 2009-01-03 16:27
Prime Shuffle Utility HiddenWarrior Programming 6 2004-11-04 05:21

All times are UTC. The time now is 08:21.


Tue Jul 27 08:21:12 UTC 2021 up 4 days, 2:50, 0 users, load averages: 2.29, 1.89, 1.80

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