![]() |
|
|
#45 |
|
"Ben"
Feb 2007
3×5×251 Posts |
Ok, I got it to compile using your command line. Apparently going to object files first and then linking is a problem.
Running ./ecm ecm uses the ecm class's main function as an entry point, where you had a couple batch factor calls commented out. I know practically zero java, but took a guess, uncommented one of the calls, and ran it. The program ran for a while but produced no output at all. I then borrowed the system.out.println syntax from somewhere else in the code and added the following to line 1295 of ecm.java (just below the call to SIQS.FactoringSIQS) Code:
System.out.println("Time in siqs = "+timeSIQS);
Code:
input alpertron yafu-1.17 10^59+213 7.35 4.04 10^71-1 75.9 32.3 10^79+5923 543.9 200.1 Code:
gcj expression.java ecm.java Siqs.java -O3 -fno-bounds-check -fno-store-check -lgij -o ecm The OS is 64 bit ubuntu-9. Last fiddled with by bsquared on 2010-03-16 at 04:52 Reason: extra info |
|
|
|
|
|
#46 |
|
Aug 2002
Buenos Aires, Argentina
101111100112 Posts |
I changed the source code in order to be able to start the applet as an application, so now java ecm shows the factorization panel.
The result of the compilation with gcj using the parameters you cite above cannot execute. I receive the same message: "The application failed to initialize properly (0xc0000005). Click on OK to terminate the application." So I updated the file ecm.zip with the new source codes so you can try it by downloading from the Web server. |
|
|
|
|
|
#47 |
|
Aug 2002
Buenos Aires, Argentina
152310 Posts |
After reading the gcj documentation I used the command line:
Code:
gcj --main=ecm expression.java ecm.java Siqs.java -O3 -fno-bounds-check -fno-store-check -o ecm Code:
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: at java.awt.Toolkit.getDefaultToolkit(fake:0) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(fake:0) at java.awt.Window.<init>(fake:0) at java.awt.Frame.<init>(fake:0) at ecm.main(fake:0) Caused by: java.lang.ClassNotFoundException: at java.lang.Class.forName(fake:0) at java.awt.Toolkit.getDefaultToolkit(fake:0) ...4 more |
|
|
|
|
|
#48 |
|
"Ben"
Feb 2007
1110101101012 Posts |
|
|
|
|
|
|
#49 |
|
Aug 2002
Buenos Aires, Argentina
1,523 Posts |
I've just downloaded ecm.zip from the Web server ( http://www.alpertron.com.ar/ecm.zip) and unzipped it into a new directory. I compiled the three files and the command java ecm command works successfully on Windows XP.
It is possible that the old ecm.zip was cached in your computer. Please delete that file (or erase the browse cache) and then download it again. FYI, these are the timestamps of the different files. You can have the times changed since you are in another time zone (here it is UTC-3). Code:
16/03/2010 09:07 233.330 ecm.java 14/03/2010 23:29 22.427 expression.java 15/03/2010 15:05 141.575 Siqs.java Last fiddled with by alpertron on 2010-03-16 at 14:10 |
|
|
|
|
|
#50 |
|
Oct 2004
Austria
2·17·73 Posts |
Small feature request: Please increase the size of the window where the applet says "factoring: <bignum>" and gives the number of ECM curves and the probability to find a factor of certain size (if it exists). When I enter a big number (say ~250 digits) just to run a quick ECM and to see which factors are in the databases which are accessed by your applet, the output exceeds the window size and thus I don't see the probability estimation (and for bigger numbers not even the curve count).
|
|
|
|
|
|
#51 |
|
Aug 2002
Buenos Aires, Argentina
1,523 Posts |
If you try to factor big numbers, you can use the scroll bar in order to see these probabilities. I selected the applet size in order to be shown correctly on 800x600 pixels.
|
|
|
|
|
|
#52 |
|
Nov 2005
22·33 Posts |
@ alpertron I made the experience for my java SIQS that the code produced by gjc is not faster then executing it in the JVM 1.6 (even with no bouns check) see http://www.mersenneforum.org/showpos...2&postcount=42.
How were your timings? The applet uses Threads. Does YAFU also uses parallelization? |
|
|
|
|
|
#53 |
|
Nov 2008
2×33×43 Posts |
There is an option in yafu.ini to use more than 1 thread: threads=<number>.
|
|
|
|
|
|
#54 | |
|
"Ben"
Feb 2007
3×5×251 Posts |
Quote:
Code:
Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux Thread model: posix gcc version 4.1.2 20080704 (Red Hat 4.1.2-44) adding -fno-bounds-check -fno-store-check actually made the binary *slower*, as I recall. Here are some timings, in seconds. Code:
input gcj -O3 java ecm 10^59+213 6.5 7.9 10^71-1 65.5 74 Last fiddled with by bsquared on 2010-04-06 at 13:32 |
|
|
|
|
|
|
#55 |
|
Aug 2002
Buenos Aires, Argentina
1,523 Posts |
Just search the string int numberThreads = 1; in the file ecm.java and then change the number of threads.
BTW I was able to reduce the memory requirement by half when using ECM (but the timings were not changed). This is important because the applets are limited on the amount of memory they can use. The next step is to replace trial division in SIQS by Pollard Rho and to change the single large prime SIQS variation to the double large prime SIQS which appears to make the algorithm a lot faster for inputs larger than 75 digits. Last fiddled with by alpertron on 2010-04-06 at 15:02 |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Java applet alternative | a1call | Programming | 19 | 2019-11-08 22:31 |
| New online applet for factorization | ET_ | Lone Mersenne Hunters | 69 | 2014-06-01 17:34 |
| A strange applet: | 3.14159 | Miscellaneous Math | 7 | 2010-06-01 01:29 |
| Faster factorization applet | alpertron | Factoring | 14 | 2006-01-01 04:00 |
| Binomial Expansion Applet | jinydu | Lounge | 2 | 2004-05-05 08:33 |