mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2016-02-22, 18:00   #1
mrft2
 
Feb 2016

2·7 Posts
Default FactorTroll II x64

Hi
I made a small one click gui factoring tool for windows I was hoping some one would like to try out.
The tool is using msieve's mpqs (siqs) modified to support multi threading and lenstra ecc methode also modified to use multi thread. It's compiled to a windows x64 executable using visual studio 2012.

Here is a link to the download page: https: // www.dropbox.com/s/<<blocked>>/FactorTool2x64_v1.15.rar?dl=0

I think the tool is more or less self explaining.
Any feedback would be appreciated.
Thank you.

Last fiddled with by Batalov on 2016-02-22 at 20:04 Reason: links to blind binaries are against this forum's policy; blocked temporarily
mrft2 is offline   Reply With Quote
Old 2016-02-22, 19:05   #2
mrft2
 
Feb 2016

E16 Posts
Default

And here is a screenshot of it.

Screenshot1
Screenshot2

Last fiddled with by mrft2 on 2016-02-22 at 19:29
mrft2 is offline   Reply With Quote
Old 2016-02-22, 19:32   #3
bgbeuning
 
Dec 2014

3·5·17 Posts
Default

Source code would be good.
Most people do not trust random binary files on the internet.
bgbeuning is offline   Reply With Quote
Old 2016-02-22, 19:44   #4
mrft2
 
Feb 2016

2·7 Posts
Default

Quote:
Originally Posted by bgbeuning View Post
Source code would be good.
Most people do not trust random binary files on the internet.
I agree on that and myself would follow the same rule.
But I was not planing on giving out the source code yet. It would need some cleanup and some nice comment first.

But I have uploaded the exe to virus total and here is the link to it:
VirusTotal malware check

Hop it will be a bit more trustworthy.
mrft2 is offline   Reply With Quote
Old 2016-02-22, 20:02   #5
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

2×4,663 Posts
Default

Quote:
Originally Posted by mrft2 View Post
Hi
I made a small one click gui factoring tool for windows I was hoping some one would like to try out.
The tool is using msieve's mpqs (siqs) modified (??) to support multi threading and lenstra ecc methode also modified to use multi thread. It's compiled to a windows x64 executable using visual studio 2012.
msieve is naturally supporting multi threading and ECC. What have you modified?
How is this different from yafu?

Btw, if you don't demonstrate the source, then you are in violation of msieve's license.
It also doesn't pass the self-preservation test for most people, and for safety of those who don't have self-preservation instinct we will for now block your download links until you address the questions (and post the source).
Batalov is offline   Reply With Quote
Old 2016-02-22, 20:12   #6
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Quote:
Originally Posted by Batalov View Post
msieve is naturally supporting multi threading and ECC. What have you modified?
How is this different from yafu?

Btw, if you don't demonstrate the source, then you are in violation of msieve's license.
No it doesn't, Msieve's "license" does not have any restrictions or terms.
Quote:
Originally Posted by Batalov View Post
It also doesn't pass the self-preservation test for most people, and for safety of those who don't have self-preservation instinct we will for now block your download links until you address the questions (and post the source).
That is very true.

Don't fear OP, every new member who posts links gets the same treatment, this is not personal or an attack on your work. Once we have some trust you'll be fine.
Dubslow is offline   Reply With Quote
Old 2016-02-22, 20:14   #7
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3,371 Posts
Default

Quote:
Originally Posted by Batalov View Post
msieve is naturally supporting multi threading and ECC. What have you modified?
How is this different from yafu?
Msieve doesn't natively support multi-threading for either siqs or ecm (i.e., -t 8 runs the same as -t 1).

But it's not clear whether the OP modified msieve's source or if his programs runs msieve in a multithreaded wrapper somehow (I have a self-preservation instinct, I guess, and haven't downloaded the program to test it).
bsquared is offline   Reply With Quote
Old 2016-02-22, 20:20   #8
mrft2
 
Feb 2016

E16 Posts
Default

Quote:
Originally Posted by Batalov View Post
msieve is naturally supporting multi threading and ECC. What have you modified?
How is this different from yafu?
Last time I checked yafu is a command line tool. This is a windows one click tool.
I find it pretty easy to see the different.

Quote:
Originally Posted by Batalov View Post
Btw, if you don't demonstrate the source, then you are in violation of msieve's license.
It also doesn't pass the self-preservation test for most people, and for safety of those who don't have self-preservation instinct we will for now block your download links until you address the questions (and post the source).
Here is what the msiev source says in it's comment:
"This source distribution is placed in the public domain by its author,
Jason Papadopoulos. You may use it for any purpose, free of charge,
without having to notify anyone. I disclaim any responsibility for any
errors.
Optionally, please be nice and tell me if you find this source to be
useful. Again optionally, if you add to the functionality present here
please consider making those additions public too, so that others may
benefit from your work."

My interpretasjon of this was that I could use it in a tool without sharing the source code.
mrft2 is offline   Reply With Quote
Old 2016-02-22, 20:23   #9
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Quote:
Originally Posted by mrft2 View Post
Last time I checked yafu is a command line tool. This is a windows one click tool.
I find it pretty easy to see the different.

The functionality is identical, except that yafu is more advanced than Msieve in some ways (multithreaded SIQS instead of single threaded MPQS, and also built in and automated factoring control, something Msieve does not have).

It would have been far simpler for you to write a trivial GUI-wrapper around Yafu then to try to reinvent the wheel.
Dubslow is offline   Reply With Quote
Old 2016-02-22, 20:29   #10
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3,371 Posts
Default

Quote:
Originally Posted by Dubslow View Post
The functionality is identical, except that yafu is more advanced than Msieve in some ways (multithreaded SIQS instead of single threaded MPQS, and also built in and automated factoring control, something Msieve does not have).

It would have been far simpler for you to write a trivial GUI-wrapper around Yafu then to try to reinvent the wheel.
Unless his goal was to reinvent the wheel (which can be fun, even if useless)

A nit point: msieve also implements siqs...
but as of now it is 1.5 to 2x slower than yafu.
bsquared is offline   Reply With Quote
Old 2016-02-22, 20:34   #11
mrft2
 
Feb 2016

1410 Posts
Default

Quote:
Originally Posted by bsquared View Post
Msieve doesn't natively support multi-threading for either siqs or ecm (i.e., -t 8 runs the same as -t 1).

But it's not clear whether the OP modified msieve's source or if his programs runs msieve in a multithreaded wrapper somehow (I have a self-preservation instinct, I guess, and haven't downloaded the program to test it).
My modification is done in the function:
uint32 factor_mpqs(msieve_obj *obj, mp_t *n, factor_list_t *factor_list)

It will use CreateThread and make multiple threads and then start sieving on a small range.
After three small ranges it can calculate an estimation polynomial to estimate the number of full relation it will need based on the total number of relations calculated by msieve.

Here is the code that makes it multi threaded if that helps:

Code:
static BOOL create_threads(msieve_obj *obj, mp_t *n, uint32 multiplier, sieve_param_t *params, THREADARGS *targs, HANDLE *hThread, uint32 tot_rels_found, uint32 full_rels_found, uint32 number_of_threads, const fb_t *factor_base, const uint32 *modsqrt_array)
{
	uint32 i;
	for(i = 0; i < number_of_threads; i++)
	{
		msieve_obj *tobj = (msieve_obj *)malloc(sizeof(msieve_obj));
		if(NULL == tobj)
		{
			return FALSE;
		}
		memcpy(tobj, obj, sizeof(msieve_obj));
		tobj->flags = (MSIEVE_FLAG_SKIP_QS_CYCLES | MSIEVE_FLAG_SIEVING_IN_PROGRESS | MSIEVE_FLAG_LOG_TO_STDOUT);
		tobj->flags |= (obj->flags & MSIEVE_FLAG_USER_ABORT);
		tobj->seed1 = get_rand(&obj->seed1, &obj->seed2);
		tobj->seed2 = get_rand(&obj->seed1, &obj->seed2);

		memset(&tobj->savefile, 0, sizeof(savefile_t));
		sprintf_s(targs[i].szSaveFile, sizeof(targs[i].szSaveFile), "%s%d", obj->savefile.name, i+1);
		DeleteFile(targs[i].szSaveFile); //Make sure we don't read som old gurba
		savefile_init(&tobj->savefile, targs[i].szSaveFile);
		savefile_open(&tobj->savefile, SAVEFILE_APPEND);

		targs[i].factor_base   = (fb_t *)xmalloc(params->fb_size * sizeof(fb_t));
		targs[i].modsqrt_array = (uint32 *)xmalloc(params->fb_size * sizeof(uint32));
		if(NULL == targs[i].factor_base || NULL == targs[i].modsqrt_array)
		{
			free(tobj);
			return FALSE;
		}
		memcpy(targs[i].factor_base, factor_base, (params->fb_size * sizeof(fb_t)));
		memcpy(targs[i].modsqrt_array, modsqrt_array, (params->fb_size * sizeof(uint32)));		
		
		InitializeCriticalSection(&targs[i].crit_lock_thread);
		targs[i].obj               = tobj;
		targs[i].params            = params;
		targs[i].multiplier        = multiplier;
		targs[i].number_of_threads = number_of_threads;
		targs[i].tot_rels_found    = tot_rels_found;
		targs[i].full_rels_found   = full_rels_found;
		add_point(&tobj->pstat, tot_rels_found, full_rels_found);
		mp_copy(n, &targs[i].n);
	}
	memset(hThread, 0, sizeof(HANDLE) * MAX_THREADS);
	for(i = 0; i < number_of_threads; i++)
	{
		DWORD tid;
		hThread[i] = CreateThread(NULL, 0, MsieveThread, &targs[i], 0, &tid);
		printstatus("Thread Created [%d]", i+1);
		Sleep(200);
		SetThreadPriority(hThread[i], THREAD_PRIORITY_IDLE);
	}

	Sleep(100);	
	return TRUE;
}
mrft2 is offline   Reply With Quote
Reply

Thread Tools


All times are UTC. The time now is 04:54.

Fri Feb 26 04:54:58 UTC 2021 up 85 days, 1:06, 0 users, load averages: 2.09, 2.32, 2.53

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.