![]() |
|
|
#1 |
|
Aug 2016
Paraiba, Brazil
3 Posts |
Hi,
Does anybody know if there is a port of Mlucas (or Prime95) for Android? I've trying to compile the code at Mlucas page (http://www.mersenneforum.org/mayer/README.html), but for that I would need to change the way it handles I/O files. I'm trying to create a simple function that takes the input (a single line from worktodo.ini), ie: Test=345E1363B28941213C54A61A8724EFF3,74365037,75,1 And returns the output to be sent to the server. The main for mlucas.c seems very complex and I thought there might be someone that could help in building this function or at least giving some hints on what should I be looking for. Thanks. Last fiddled with by ewmayer on 2017-07-03 at 00:47 Reason: url updated to reflect ftp-site migration |
|
|
|
|
|
#2 |
|
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
978710 Posts |
There is a free program on GooglePlay. It does not take a worktodo file.
https://play.google.com/store/apps/d...s.lltest&hl=en |
|
|
|
|
|
#3 | |
|
"Kieren"
Jul 2011
In My Own Galaxy!
2×3×1,693 Posts |
Quote:
|
|
|
|
|
|
|
#4 |
|
Sep 2003
1010000110012 Posts |
Limited battery life is the bane of all mobile devices. LL testing on your phone makes no sense, unless it's just a front end and the actual calculating is done in the cloud.
|
|
|
|
|
|
#5 |
|
Aug 2016
Paraiba, Brazil
38 Posts |
We are planning to use it when certain conditions are met, such as: Phone is charging, has network connection and is at a minimum 95% battery level.
Regarding the code, we plan to use only JNI code and not Java, this will probably make the code more efficient, this is one of the reasons we are trying to port the code from Mlucas page instead of creating a new on based on Java. |
|
|
|
|
|
#6 | |
|
Aug 2010
Republic of Belarus
2·89 Posts |
Quote:
![]() It's very-very-very easy implemation but it working fine and you can compare result (for example http://www.mersenne.org/report_expon...exp_hi=&full=1). So just run it java SimpleLucas and type 15259. I also accept ideas how i can improve this code.
Last fiddled with by Lorenzo on 2016-08-22 at 21:29 |
|
|
|
|
|
|
#7 |
|
Aug 2010
Republic of Belarus
2·89 Posts |
btw, here https://github.com/tbuktu/bigint you can find more faster BigInteger implementation.
|
|
|
|
|
|
#8 |
|
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
23×3×5×72 Posts |
I think that the ideal would be to get a gmplib based biginteger library to do the math. I doubt that arm chips are good enough to be worthwhile yet. Before putting much effort into phones I would try something like a raspberry pi to see how fast it runs based upon both gmplib and mlucas. I expect gmplib would beat mlucas on a non-x86 platform due to lack of assembly for mlucas. mlucas may win for extremely large numbers due to being tuned for that.
I suspect even double checks may take a year or more to finish. |
|
|
|
|
|
#9 |
|
Romulan Interpreter
Jun 2011
Thailand
258B16 Posts |
You joking. Say 5 years for a 40M test with the fastest version in the linked table (which please mind, it is not implemented yet, according with the text, only the one which is slower is available - "This code has been merged into OpenJDK 8 except for the Schönhage-Strassen"). That is 2.3 seconds (in the table) to multiply a 10M digits (33M), therefore multiply 40M iterations with about (interpolation) 3.5, and divide by 3600 (seconds), 24 (hours), 365 (days) etc. Add a bit for interruptions, you may not run continuously..
Assuming you keep your mobile so long... edit: And assuming the 3.5ms version become available. OpenJDK 8 actual implementation lists 18 seconds instead of 2.3. You will need to hang on your current phone 20 years or so, to finish that DC assignment! May God help you find it prime!
Last fiddled with by LaurV on 2016-08-23 at 14:11 |
|
|
|
|
|
#10 | ||
|
Aug 2010
Republic of Belarus
2·89 Posts |
Quote:
So actually i found out many algorithms for LL-test on different languages. Here is the list of 57 implementation of LL-test https://rosettacode.org/wiki/Lucas-Lehmer_test But I didn't find no one implementation of LL-test with FFT and multiply matrixs. Except CudaLucas and clFFT but they very complicated for understand. ![]() Quote:
|
||
|
|
|
|
|
#11 | |
|
Aug 2016
Paraiba, Brazil
112 Posts |
Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Android app recommendations | Uncwilly | Lounge | 11 | 2020-10-07 12:40 |
| Is there An Android or Iphone version of Prime95 | king | Information & Answers | 1 | 2018-02-14 07:01 |
| GMP-ECM for Android | yoyo | GMP-ECM | 6 | 2016-01-19 20:04 |
| handwriting on Android questions | jasong | jasong | 2 | 2013-02-21 00:04 |
| Android | henryzz | Lounge | 7 | 2011-01-19 18:21 |