Historia mundial


Historia mundial

------------------------------------------

Microsoft Windows Millennium Edition

Ayuda para el disco de inicio de emergencia

-------------------------------------------

(c) Copyright Microsoft Corporation, 2000

Este documento proporciona informacin complementaria o de ltima hora

como suplemento a la documentacin de Windows Millennium Edition

(Windows ME).

Para cerrar este archivo de Ayuda, presione ALT-A-S.

--------

CONTENIDO

--------

RESUMEN

Si Windows Millennium Edition nicamente se inicia en el modo

a prueba de errores

TIPOS DE MTODOS Y MEDIOS DE INSTALACION DE WINDOWS MILLENNIUM EDITION

Windows Millennium Edition (versin comercial)

Windows Millennium Edition (versin de actualizacin)

Cmo busca las versiones anteriores de Windows el programa de instalacin

de la versin de actualizacin de Windows Millennium Edition

Instalaciones limpias

Versiones OEM de Windows Millennium Edition

SI WINDOWS MILLENNIUM EDITION NO SE INICIA EN EL MODO A PRUEBA DE ERRORES

Usar ScanDisk para comprobar el disco duro

Usar el Comprobador del Registro de Windows

SI EL PROGRAMA DE INSTLACION SE DETIENE Y WINDOWS MILLENNIUM EDITION NO SE

INICIA EN EL MODO A PRUEBA DE ERRORES

Aviso acerca del software antivirus

El programa de instalacin deja de responder durante la deteccin de

hardware

DESINSTALAR WINDOWS MILLENNIUM EDITION

INSTALAR WINDOWS MILLENNIUM EDITION CON WINDOWS NT O WINDOWS 2000

INSTALAR WINDOWS MILLENNIUM EDITION EN UN DISCO DURO NUEVO

=======

RESUMEN

=======

Si tiene problemas para instalar o iniciar Windows Millennium Edition

intente iniciar el equipo en el modo a prueba de errores antes de

intentar los pasos que se indican en este documento.

Si puede iniciar el sistema en el modo a prueba de errores, consulte

el Solucionador de problemas de modo a prueba de errores de Windows

Millennium Edition, en la p gina de advertencia de Modo seguro.

En el modo a prueba de errores, puede utilizar las herramientas de

resolucin de problemas de Windows, como Restaurar sistema, que no

est n disponibles al iniciar el equipo desde este disco de inicio.

Para iniciar Windows en modo a prueba de errores:

1. Extraiga el disco de inicio y reinicie el equipo.

2. Cuando arranque de nuevo el equipo, presione la tecla CTRL

y mantngala as hasta que aparezca el men de inicio de

Microsoft Windows Millennium Edition.

3. En el men Inicio, elija Modo a prueba de errores (opcin 3).

4. Siga los pasos que se indican en el Solucionador de problemas del

modo a prueba de errores.

Si Windows Millennium Edition nicamente se inicia en el

modo a prueba de errores

---------------------------------------------------------

Si sigui los pasos indicados en el Solucionador de problemas del

modo a prueba de errores y, an as, no puede iniciar Windows con

normalidad, siga estos pasos:

1. Cierre este archivo de Ayuda.

2. En el smbolo del sistema, escriba:

scanreg /restore

y presione ENTRAR.

3. Seleccione la fecha de copia de seguridad mas reciente y, a

continuacin, haga clic en Restaurar.

Si realiza estos pasos y sigue sin poder reiniciar el equipo

con normalidad:

1. Utilice el disco de inicio de Windows Millennium Edition para

reiniciar el equipo y seleccione la opcin 1 en el men de

inicio y, a continuacin, haga presione ENTRAR.

2. Cierre el archivo de Ayuda.

3. Siga las instrucciones que aparecen en la pantalla para intentar

instalar de nuevo Windows Millennium Edition.

**********

IMPORTANTE: Si instal algn programa incluido con su disco duro,

asegrese de leer la documentacin que describe cmo iniciar el

equipo con un disco de inicio.

**********

======================================================================

TIPOS DE MTODOS Y MEDIOS DE INSTALACION DE WINDOWS MILLENNIUM EDITION

======================================================================

La siguiente seccin describe las diferentes versiones de Windows

Millennium Edition y sus requisitos de instalacin.

Windows Millennium Edition (versin comercial)

----------------------------------------------

Esta versin no requiere una versin anterior de Microsoft Windows.

Windows Millennium Edition (versin de actualizacin)

-----------------------------------------------------

El programa de instalacin requiere una copia anterior de

Microsoft Windows 95 Windows 98.

Cmo busca las versiones anteriores de Windows el programa de instalacin

de la versin de actualizacin de Windows Millennium Edition

--------------------------------------------------------------------------

El programa de instalacin busca en su equipo un producto que le permita

realizar la actualizacin. Si el programa de instalacin no encuentra una

versin anterior de Windows en su equipo, le pedir que inserte el medio de

la versin anterior para confirmar que puede realizar la actualizacin.

El medio puede ser un CD-ROM, un disco o una carpeta del disco duro en la

que se encuentren los archivos de instalacin. Si utiliza discos, el

programa

de instalacin podra pedirle varios de ellos.

Instalaciones limpias

----------------------

Puede utilizar la versin de actualizacin de Windows Millennium Edition

para instalar Windows Millennium Edition en un equipo que no tenga

instalada

una versin anterior de Windows, como sucede despus de formatear el disco

duro. Esta opcin se suele denominar "instalacin limpia".

Como el proceso de comprobacin de conformidad no puede encontrar una

versin

anterior, el programa de instalacin le pedir que inserte el medio de la

versin anterior para confirmar que puede realizar la actualizacin.

El medio puede ser un CD-ROM, un disco o una carpeta del disco duro en la

que

se encuentren los archivos de instalacin. Si utiliza discos, el programa

de

instalacin podra pedirle varios de ellos.

Para obtener mas informacin acerca de cmo instalar Windows Millennium

Edition en un equipo en el que no haya un sistema operativo anterior,

consulte

"Cmo instalar Windows Millennium Edition en un disco duro nuevo", al final

de este

documento.

Versiones OEM de Windows Millennium Edition

-------------------------------------------

La versin de Windows Millennium Edition para fabricantes de equipos

originales

(OEM) es una versin comercial especial a disposicin de los fabricantes de

equipos. Los OEM pueden personalizar estas versiones de Windows

Millennium Edition para su hardware y software.

Los procedimientos y requisitos de instalacin que se describen en este

documento pueden ser diferentes si dispone de una versin OEM de Windows

Millennium Edition. Para obtener mas informacin, lea la documentacin

incluida con su equipo o pngase en contacto con el fabricante del mismo.

=========================================================================

SI WINDOWS MILLENNIUM EDITION NO SE INICIA EN EL MODO A PRUEBA DE ERRORES

=========================================================================

Las siguientes condiciones pueden hacer que Windows Millennium Edition

no se inicie en el modo a prueba de errores:

- El equipo fue infectado por un virus. Utilice software antivirus

actualizado para comprobar si hay un virus y limpiar el equipo si

es necesario.

- La configuracin del CMOS del equipo no es correcta. Compruebe si

la configuracin del CMOS del equipo es correcta. Tenga en cuenta

que puede necesitar ponerse en contacto con el fabricante del

equipo para comprobar la configuracin.

- Existe un error en el hardware. Tenga en cuenta que puede necesitar

ponerse en contacto con el fabricante del equipo para obtener mas

informacin acerca del hardware.

- Existe un error en el disco duro del equipo. Consulte "Usar ScanDisk

para comprobar el disco duro".

- Existe un error en el Registro de Windows. Consulte "Usar

el Comprobador del Registro de Windows".

Usar ScanDisk para comprobar el disco duro

------------------------------------------

Si cree que existen daos en algn archivo o algn problema de otro tipo

en su disco duro, ejecute ScanDisk para comprobarlo y reparar los errores.

Para comprobar en todos los discos duros si hay errores:

1. En el smbolo del sistema, escriba:

scandisk /all

2. Presione ENTRAR.

Para realizar una comprobacin de superficie completa en todos los

discos duros y conseguir la m xima proteccin ante la prdida de datos:

1. En el smbolo del sistema, escriba:

scandisk /all /surface

2. Presione ENTRAR.

Usar el Comprobador del Registro de Windows

-------------------------------------------

Si an as no puede iniciar Windows Millennium Edition en el modo

a prueba de errores, ejecute l Comprobador del Registro de Windows

(Scanreg.exe), ya que podra haber un problema en el Registro de

Windows.

Para iniciar el Comprobador del Registro de Windows:

1. En el smbolo del sistema, escriba:

scanreg /restore

2. Presione ENTRAR.

Es posible que Scanreg no est disponible si Windows Millennium Edition

no se instal correctamente en el equipo.

=========================================================================

SI EL PROGRAMA DE INSTLACION SE DETIENE Y WINDOWS MILLENNIUM EDITION NO SE

INICIA EN EL MODO A PRUEBA DE ERRORES

=========================================================================

La siguiente seccin explica lo que puede hacer para recuperar la

instalacin de Windows despus de un error. Para obtener mas informacin

acerca de otros problemas de instalacin, consulte el archivo instalar.txt

que encontrar en la carpeta Win9X del CD de Windows Millennium Edition.

Si encuentra alguno de estos mensajes de error al ejecutar el programa de

instalacin:

- Disco de sistema no v lido

- Versin incorrecta de MS-DOS

- El archivo Command.com est daado o no se encuentra

es probable que deba actualizar los archivos del sistema en el disco de

inicio de su equipo. Algunas opciones de configuracin del CMOS o

software antivirus pueden impedir que el programa de instalacin de

Windows instale en su equipo los archivos de sistema correctos.

Para sustituir los archivos de sistema:

1. Utilice el disco de inicio de Windows Millennium Edition para

reiniciar el equipo y seleccione la opcin 1 en el men de

inicio y, a continuacin, haga presione ENTRAR.

2. Cierre el archivo de Ayuda.

3. Siga las instrucciones que aparecer n en la pantalla para ejecutar

el programa de instalacin.

4. Si se le pide, seleccione "Usar modo protegido".

Aviso acerca del software antivirus

-----------------------------------

Si hay algn programa antivirus en ejecucin durante la instalacin,

es posible que impidan que el programa de instalacin actualice

correctamente los archivos del sistema.

**********

IMPORTANTE: Durante la instalacin, es posible que aparezca un mensaje

de advertencia, que le informa de que cambi el registro de arranque

u otros archivos. Si aparece ese mensaje, DEBE ACEPTAR los cambios o

el programa de instalacin no podr actualizar los archivos importantes

que utiliza Windows Millennium Edition para iniciar el equipo.

**********

El programa de instalacin deja de responder durante la deteccin de

hardware

----------------------------------------------------------------------------

-

Si el programa de instalacin deja de responder durante la deteccin

del hardware del equipo, apague el equipo, espere unos segundos y

encindalo de nuevo. Es posible que necesite hacerlo varias veces.

Si se le pide, seleccione "Usar modo protegido" al iniciarse el programa

de instalacin. El programa de instalacin podra dejar de responder

durante varios de los mdulos de deteccin y omitir las reas en las que

se produzcan errores para poder finalizar correctamente.

**********

IMPORTANTE: Utilice el interruptor del equipo para apagarlo por

completo. No utilice el botn de reinicio ni presione CTRL+ALT+SUPR

para reiniciar el equipo.

**********

Si, an as, el programa de instalacin no finaliza correctamente,

puede que sea necesario iniciar el equipo en el modo a prueba de

errores para que pueda ver los temas de Ayuda acerca de la

deteccin de hardware.

======================================

DESINSTALAR WINDOWS MILLENNIUM EDITION

=======================================

Si los pasos anteriores no funcionan, puede probar a desinstalar

Windows Millennium Edition y volver a la versin anterior de Windows.

Para desinstalar Windows Millennium Edition, debi elegir guardar

la informacin de desinstalacin durante en el programa de instalacin

de Windows Millennium Edition. La informacin de desinstalacin se

guarda en los archivos Winundo.dat y Winundo.ini. Si elimina estos

archivos no podr desinstalar Windows Millennium Edition.

**********

IMPORTANTE: no intente desinstalar Windows Millennium Edition si la

informacin de particin de su disco duro cambi desde la ltima

instalacin correcta de Windows Millennium Edition.

Windows Millennium Edition crea una copia de seguridad de la

informacin de la particin del disco duro en el archivo

Suhdlog.dat al terminar una informacin correcta, y Uninstal.exe

restaura en el disco duro la informacin de particin que encuentra

en Suhdlog.dat. Si la informacin de particin del disco duro cambi

desde la ltima instalacin correcta (en concreto, desde que se cre

Suhdlog.dat), es posible que pierda parte de los datos, o todos

ellos, al intentar desinstalar Windows Millennium Edition.

**********

Para desinstalar Windows Millennium Edition:

1. Utilice el disco de inicio de Windows Millennium Edition para

reiniciar el equipo y seleccione la opcin 1 en el men de

inicio y, a continuacin, haga presione ENTRAR.

2. Cierre el archivo de Ayuda.

3. En el smbolo del sistema, escriba cada una de las siguientes

lneas y presione ENTRAR despus de cada una de ellas.

smartdrv

:

cd\\command

uninstal.exe

NOTA: es la letra de la unidad en la que se encuentra

la carpeta Windows (la predeterminada es C). es el nombre

de la carpeta de Windows (el predeterminado es "Windows").

4. Escriba S cuando se le pregunte si desea continuar.

Este proceso puede durar varios minutos.

NOTA: SmartDrive (Smartdrv.exe) no es necesario para ejecutar

Uninstal.exe, pero acelera mucho el proceso.

=================================================================

INSTALAR WINDOWS MILLENNIUM EDITION CON WINDOWS NT O WINDOWS 2000

=================================================================

No puede instalar Windows Millennium Edition sobre una versin de

Windows 2000 o Windows NT, pero ambas pueden coexistir en un mismo

sistema.

No obstante, por motivos de compatibilidad, se recomienda que

instale cada versin en un disco duro o particin diferente.

Si Windows NT ya est instalado, el programa de instalacin de

Windows Millennium Edition se agregar al men de inicio de Windows NT

para permitir alternar entre el inicio de Windows Millennium Edition

y de Windows NT.

===========================================================

INSTALAR WINDOWS MILLENNIUM EDITION EN UN DISCO DURO NUEVO

===========================================================

Consulte el documento "Instalar Windows Millennium Edition en un disco

duro nuevo", que encontrar en :\Win9x\Cleanhd.Txt.

Tambin puede resultarle til el archivo lame del programa de instalacin.

Se encuentra en :\Win9X\instalar.txt.

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other

You can compare your computer's speed with other users by checking the

site http://www2.tripnet.se/~nlg/mersenne/benchmk.htm. If you are

much slower than comparable machines, download Microsoft's WinTop

kernel toy to find programs (such as AOL) that are stealing all of

prime95's CPU cycles. You can download the software free at

http://www.microsoft.com/windows/downloads/contents/powertoys/w95procwatcher

You can get a report of your PrimeNet server account status on the web

(http://entropia.com/primenet/status.shtml). Type your UserID and

password into the web form, and click "Get Account Report". You can

get your UserID and password from the Test/User Information

dialog box.

Information about running a local PrimeNet server is also available.

See http://entropia.com/primenet. If you have any questions about the

PrimeNet server, you can send e-mail to primenet@entropia.com.

The first time you run this program it will perform an hour long

self-test to make sure the Lucas-Lehmer code is running properly

on your system. There are 16 different self-tests, one for each

FFT size. You can run all 16 self-tests with Options/Self Test

menu choice. This is not required.

If you have overclocked your machine, I highly recommend running the

torture test for a couple of days. The longer you run the torture test

the greater the chance that you will uncover an error caused by

overheating.

Depending on the exponent being tested, the program may decide that it

would be wise to invest some time checking for small factors before

running a Lucas-Lehmer test. Furthermore, the program may start factoring

exponents before a previous Lucas-Lehmer test completes. This is normal!

The program will resume the Lucas-Lehmer test when the factoring

completes.

For manual users, once you've started testing a range there is no advantage

in downloading a new database. After your range completes, you can

download

a new database before you start your next range.

You can configure this program to have different properties at different

times of the day and/or to not run during certain times of the day.

Unfortunately, you must manual edit the prime.ini file. Let's say you

want to install the program on a friend's machine and he runs a screen

saver at night. He also runs a disk defragmenter at midnight on weekdays.

This prime.ini file will run the program at a higher priority than his

screen saver at night and on weekends. It also sleeps for an hour when

his defragmenter starts running. Finally, at night fewer save files are

generated to allow his disk to stay powered down longer.

UserID=foo

Time=1-5/8:30-17:30

Priority=1

DiskWriteTime=30

Time=1-5/1:00-8:30,1-5/17:30-24:00,6-7/0:00-24:00

Priority=5

DiskWriteTime=240

The 1-5 refers to days of the week, with Monday=1 and Sunday=7. The

time portion refers to the hours of the day based on a 24-hour clock.

You do not need to specify days of the week (e.g. Time=1-7/0:00-8:00

is the same as Time=0:00-8:00). Unpredictable results will occur if

there are overlapping time intervals. Also note that any options that

appear in the Time= sections should not appear earlier in the prime.ini

file and you can no longer edit these options from theuser interface.

SETTING UP A PROXY SERVER

-------------------------

Create a file in the same local folder as Prime95.exe, called

"primenet.ini".

Add these text lines, substituting the appropriate proxy server URL and

port:

[PrimeNet Proxy]

ProxyHost=http://proxy.megacorp.com:8080

If the proxy is secured by a userid/password, add the following two text

lines, substituting the appropriate values:

ProxyUser=whatever_the_userid_is

ProxyPass=whatever_the_password_is

After the first time PrimeNet is contacted through a secure proxy, the

proxy

password is encoded and a new parameter 'ProxyMask=1' set. To change the

password, simply change the ProxyPass= value, and either delete the

ProxyMask

text line or set ProxyMask=0.

PROGRAM OUTPUT

--------------

On screen you will see:

Factored M400037 through 17517*2^32 (pass 3 of 16). Clocks: 24235224=0.121

sec.

This means prime95 is in the third pass of a 16 pass process to

find a small factor of 2^400037-1.

Iteration: 941400 / 1667747. Clocks: 21889762 = 0.109 sec.

This means prime95 just finished the 941400th iteration of a

Lucas-Lehmer primality test. The program must execute 1667747

iterations to complete the primality test. The average iteration

took 21889762 "clock cycles" or 0.109 seconds.

The results file and screen will include lines that look like:

M2645701 has a factor: 13412891051374103

This means to 2^2645701-1 is not prime. It is divisible

by 13412891051374103.

M2123027 no factor to 2^57, WS1: 14780E25

This means 2^2123027-1 has no factors less than 2^57. The Mersenne

number may or may not be prime. A Lucas-Lehmer test is needed

to determine the primality of the Mersenne number. WS1 is

the program version number. 14780E25 is a checksum to guard

against email transmission errors.

M1992031 is not prime. Res64: 6549369F4962ADE0. WT1:

B253EF24,1414032,00000000

This means 2^1992031-1 is not prime - a Lucas-Lehmer test says so.

The last 64 bits of the last number in the Lucas-Lehmer sequence

is 6549369F4962ADE0. At some future date, another person will verify

this 64-bit result by rerunning the Lucas-Lehmer test. WT1 is the

program version number. B253EF24 is a checksum to guard against

email

transmission errors. 1414032 can be ignored it is used as part

of the double-checking process. The final 00000000 value is a set

of 4 counters. These count the number of errors that occurred during

the Lucas-Lehmer test.

M11213 is prime! WS1: 579A579A

This means 2^11213-1 is a Mersenne prime! WS1 is the program

version number. 579A579A is a checksum to guard against email

transmission errors.

RUNNING PRIME95 ON SEVERAL COMPUTERS

------------------------------------

The easiest way to do this is to first set up prime95 on one computer.

Next copy all the files to the second computer. Delete the local.ini

file and worktodo.ini files. These files contain information that

is specific to the first computer. Start prime95 on the second

computer and optionally use Test/User Information to

give the second computer a unique computer ID. Repeat this process

for all the computers you wish to run prime95 on.

If you do not follow the instruction above, be sure you use

Test/User Information to give each computer the same

userid and password. Failure to do this will result in all

your work being "credited" to different user IDs.

TEST MENU

---------

The PrimeNet menu choice lets you configure the type of work you get

from the server. The "Use PrimeNet..." option can be turned on to

switch from the manual method to the automatic method.

The "Request whatever..." box should be left checked. However, if you

are running a slow computer and don't mind waiting several months for

a single Lucas-Lehmer test to complete OR you are running a faster

computer and would rather do factoring, then uncheck this box and

choose a different type of work to do. The "Days of work to get" should

be changed based on how often you connect to the Internet. As long as

you connect at least once in the given time period, prime95 will have

an uninterrupted stream of work. However, the program will not checkout

more than 20 exponents no matter what "Days of work to get" is set at.

The Manual Operation menu choice allows you to select a range of

exponents to work on. You may also use this menu choice to add

to your existing work (e.g. when you are running low on exponents

to test).

The User Information menu choice lets you change your name and email

address. Your name will be used in credits and "top producers"

web pages. Your email address will be used to send you warnings if

an exponent you have reserved is about to expire and to send you a

newsletter once every few months. Select the no email checkbox to

stop the server from sending expiration warnings. The userid you

use will appear in the status pages on the PrimeNet server. You can

also set the ComputerID field if you have several computers and want

to keep track of which computers produced which results.

The Vacation/Holiday menu choice lets prime95 update the expected

completion

dates on the PrimeNet server. This will prevent one of your exponents

from being reassigned while you're gone. Also, if you are taking a

long vacation, prime95 will get extra exponents to test. For example,

if you are leaving immediately for a 6 week vacation, connect to the

Internet and choose 42 days. If you are leaving in two days for a 6

week vacation, then set choose 44 days. Primenet will send the new

completion dates whenever you connect to the Internet over the next 2 days.

The Status menu choice will tell you what exponents you are working on.

It will also estimate how long that will take and

your chances of finding a new Mersenne prime.

The Continue menu choice lets you resume prime95 after you have stopped it.

The Stop menu choice lets you stop the program. When you continue,

you will pick up right where you left off. This is the same as hitting

the ESC key.

ADVANCED MENU

-------------

You should not need to use the Advanced menu. This menu choice is

provided only for those who are curious to play with. To avoid confusion

for novice users, all the choices in the Advanced menu have been grayed.

Please read this section if you want to know what the Advanced menu choices

do. To turn on the Advanced menu, use the Advanced Password dialog box

and enter a value of 9876. Also note that many of the menu choices are

grayed while testing is in progress. Choose Test/Stop to activate

these menu choices.

The Test choice can be used to run a Lucas-Lehmer test on one Mersenne

number. Enter the Mersenne number's exponent - this must be a prime

number between 7 and 5259999.

The Time choice can be used to see how long each iteration of a Lucas-

Lehmer

test will take on your computer and how long it will take to test a

given exponent. For example, if you want to know how long a Lucas-Lehmer

test will take to test the exponent 876543, choose Advanced/Time and

enter 876543 for 100 iterations. A Pentium will automatically time

and compute the results. 486 owners will need to time how long the

operation

takes by hand, divide that time by 100 and multiply by 876543 to compute

how

long a full Lucas-Lehmer test will take.

The ECM choice lets you factor small Mersenne exponents using the

Elliptic Curve Method of factoring. Select a few exponents and bounds

to factor from the http://www.mersenne.org/ecm.htm web page.

Note: You do not reserve exponents to work on, several people can

do ECM factoring on the same exponent. The program uses a random

number generator to select elliptic curves to test. You must email

results to me at woltman@magicnet.net - primenet does not support ECM

factoring. You can also edit the worktodo.ini file directly. For example:

ECM=751,3000000,0,100,0,0,0

The first value is the exponent. The second value is bound #1. The

third value is bound #2 - leave it as zero. The fourth value is the

number of curves to test. The fifth value is the number of curves

completed.

The sixth value is the specific curve to test - it is only used in

debugging. The seventh value is 0 for 2^N-1 factoring, 1 for 2^N+1

factoring.

The Clear Primes choice can be used to remove one or more exponents from

the

database. You might do this for two reasons:

1) Let's say you're testing range 1234000 to 1234999. If I send you some

mail saying that a factor has been found for M1234567, then you use

Clear Primes to remove 1234567 from your database so that you

won't have to run a Lucas-Lehmer test on it.

2) You downloaded a new database after checking all the exponents

between 1234000 and 1234300. You can use Clear Primes

to remove the exponents between 1234000 and 1234300.

Do not use the Factor menu choice. If you're running Lucas-Lehmer tests

on a range or just factoring a range - use Test/Manual Operation.

The program will know the optimal amount of factoring to perform. Having

said that, if you insist on using this menu choice, you can look for

factors

less than 2^62 of any Mersenne numbers with an exponent less than

10,000,000.

Let's say you're writing a factoring program for a UNIX machine and want to

check its results. Use both this menu choice and your UNIX program to

search for small factors on a set of Mersenne numbers and compare the

results.

Round off checking. This option will slow the program down by about 15%.

This option displays the smallest and largest "convolution error". The

convolution error must be less than 0.49 or the results will be incorrect.

There really is no good reason to turn this option on.

The Priority menu is used to adjust the priority prime95 runs at.

You should not need to change this. You might raise the priority

if you (or your coworker) just cannot live without your screen

saver (bad idea), or if you are running some ill-behaved program

that is using CPU cycles for no good reason.

The Manual Communication menu choice should only be used if the

automatic detection of an Internet connection is not working for you.

Using this option means you have to remember to communicate with the

server every week or two (by using this same menu choice).

The Quit GIMPS menu choice is used when you no longer want this computer

to work on the GIMPS project. You may rejoin at a later date.

If you are a PrimeNet user your unfinshed work will be returned to the

server. If you are a manual user, you need to send me email containing

your results.txt file and a note saying you are quitting.

OPTIONS MENU

------------

The CPU menu choice lets you tell the program what kind of CPU you

have. The program will normally figure this information out for you.

This information is used to give accurate time estimates in the

Test/Status menu choice. It is also used, to choose between integer

based factoring (Cyrix and 486) and floating point based factoring

(Pentium and Pentium Pro). No matter what you choose, the program

uses the same code to run the Lucas-Lehmer primality test. If you have

an AMD K5 or Cyrix M2 chip, choose Cyrix 6x86.

The Preferences menu choice lets you control how often a line is

written to the main window. Also how often a line is written to

the results file. It also lets you change how often

intermediate files (to guard against power failure an crashes)

are created. You can control how often the program checks to

see if you are connected to the Internet. The program polls

whenever it has new data to send to or work to get from the PrimeNet

server. If you are low on disk space, you can select one intermediate

file instead of two. However, if you crash in the middle of writing

the one intermediate file, you may have to restart an exponent from

scratch. You can also tell the program to be quiet, rather than

beeping like crazy, if a new Mersenne prime is found.

The Self Test choice lets you run a sixteen-hour self test. Passing the

self-test does not guarantee that you will not run into any hardware

problems later on, but it does give you some confidence that the program

is working properly.

The Torture Test choice will run a continuous self test. This is great

for testing machines for hardware problems.

The Tray Icon choice will cause prime95 to have a small icon on the taskbar

when it is minimized. You can activate the program by double-clicking on

the small icon. If you place the cursor over the small icon, a tooltip

will

display the current status.

The No Icon choice is only enabled if the Advanced Menu is activated

with the password. Using this menu choice means there will be no

prime95 icon on the taskbar once you minimize the program (making it very

hard to reactivate!) If you turn this feature on and want to turn it

back off, edit prime.ini and change the line "HideIcon=1" to "HideIcon=0",

then reboot.

Checking the Windows 95 Service menu choice will install prime95

as a service. The program will be run automatically whenever

you reboot your machine. You will not need to place a shortcut to

prime95 in the startup menu.

COMMAND LINE ARGUMENTS

----------------------

These command line arguments can be used to schedule prime95.exe to

run only at certain times of the day or at a different priority. Note

that raising the program's priority will not make it run any faster

on an idle machine.

-Tdd:hh:mm This tells the program to terminate itself after

the specified number of days, hours, and minutes.

The days and hours are optional. For example,

use Windows 95 Plus Pack's scheduler to run the

program on your co-worker's machine for 12 hours

every evening with the -T12:00 argument.

-An This is used to run two or more copies of prime95

from the same directory. Using this switch causes prime95

to use a different set of filenames for the INI files,

the results file, the log file, and the spool file.

Just use a different value of n for each copy of

prime95.exe you start.

-Wdirectory This tells prime95 to find all its files in a different

directory than the executable.

POSSIBLE HARDWARE FAILURE

-------------------------

If the message, "Possible hardware failure, consult the readme file.",

appears in the results file, then prime95's error-checking has

detected a problem. Prime95 will continue from the last save file.

If you do not get the message, "Disregard last error...", then the

problem is not reproducible - a definite sign of hardware problems.

How can this be when none of your other programs have problems? The answer

is that prime95 stresses your machine more than any other program you

run. The operating system usually shuts down the floating-point unit

when no programs are using it. Prime95 continuously uses the FPU,

consuming

more electricity and generating more heat. If the CPU is not properly

cooled,

errors can occur. Prime95 also constantly accesses main memory - up to

60MB per second. This constant activity will detect memory problems that

other programs do not. This is why Cray Research has used a program

similar

to this one as part of its supercomputer diagnostics package for over a

decade.

Could it be a software problem? If the error is ILLEGAL SUMOUT, then

there is a good chance that this is a software problem. A device driver

or VxD may not be saving and restoring CPU state correctly. The good news

is that prime95 recovers very well from ILLEGAL SUMOUT errors.

Try seeing if the problem occurs only when a specific device is active

or a specific program is running.

How can you track down the hardware problem? Unfortunately, this is not

easy. To see if your CPU is overheating, run prime95 for several hours.

Open the box. Is the CPU too hot to touch? If so, a heat sink or

CPU fan should solve the problem. Memory problems are not as easy to

diagnose. My only advice is to try swapping memory SIMMs with a coworker's

or friend's machine. If the errors go away, then you can be confidant

that the original problems were memory related.

What can you do if you are unwilling or unable to find the hardware

problem?

If you are only getting an error once in a while, then your results are

probably OK. The error-checking code is not infallible, so your results

will need to be double-checked. If you are getting several errors during

each primality test, then I would recommend using your machine to factor

Mersenne numbers.

LUCAS-LEHMER DETAILS

--------------------

This program uses the Lucas-Lehmer primality test to see if 2**p-1 is

prime.

The Lucas sequence is defined as:

L[1] = 4

L[n+1] = (L[n]**2 - 2) mod (2**p - 1)

2**p-1 is prime if and only if L[p-1] = 0.

This program uses a discrete weighted transform (see Mathematics of

Computation, January 1994) to square numbers in the Lucas-Lehmer sequence.

DISCLAIMER

----------

THIS PROGRAM AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF

ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO

THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A

PARTICULAR PURPOSE.

THANKS

------

Happy hunting and thanks for joining the search,

George Woltman

woltman@magicnet.net

Welcome to the Great Internet Mersenne Prime Search!

In case you ever forget, the URL is http://www.mersenne.org/prime.htm.

My email address is woltman@magicnet.net.

For networking questions, contact Scott Kurowski at primenet@entropia.com.

FILE LIST

---------

readme.txt This file.

prime95.exe The program to factor and run Lucas-Lehmer tests on

Mersenne numbers.

rpcnet.dll Communicates with the Internet PrimeNet server using RPCs.

httpnet.dll Communicates with the Internet PrimeNet server using HTTP.

whatsnew.txt A list of new features in prime95.exe.

prime.ini A file containing your preferences. The menu choices

and dialog boxes are used to change your preferences.

local.ini Like prime.ini, this file contains more preferences.

The reason there are two files is discussed later.

worktodo.ini A list of exponents the program will be factoring

and/or Lucas-Lehmer testing.

results.txt Prime95.exe writes its results to this file.

prime.log A text file listing all messages that have been sent

to the PrimeNet server.

prime.spl A binary file of messages that have not yet been sent to

the PrimeNet server.

pnnnnnnn & Intermediate files produced by prime95.exe to resume

qnnnnnnn computation where it left off.

database This optional binary file is downloaded separately. You only

need this file if you are not using the PrimeNet server.

It contains all the Mersenne exponents that still need testing.

WHAT IS THIS PROGRAM?

---------------------

This program is used to find Mersenne Prime numbers. See

http://www.utm.edu/research/primes/mersenne.shtml for a good

description of Mersenne primes. Mersenne numbers can be proved

composite (not prime) by either finding a factor or by running

a Lucas-Lehmer primality test.

INSTRUCTIONS

------------

There are two ways to use this program. The automatic way uses

a central server, which we call the PrimeNet server, to get work to do

and report your results. Anyone with Internet access, including AOL,

CompuServe, and dial-up ISP users should use this method. You do not

need a permanent connection to the Internet.

The second method is the manual method. It requires a little more work

and monitoring. I recommend this for computers with no Internet access

or with some kind of firewall problem that prevents the automatic method

from working.

If you are running this program at your place of employment, you should

first GET PERMISSION from your network administrator or boss. This is

especially true if you are installing the software on several machines.

Some companies are reluctant to run any software they are not familiar

with.

INSTRUCTIONS FOR THE AUTOMATIC METHOD

-------------------------------------

1) Download and unzip prime95.zip. You've probably done this already

since you are reading this file.

2) Connect to the Internet.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address.

Optionally enter a user ID and password. An easy-to-remember user ID

will be helpful if you plan to visit the PrimeNet server's web page

to view reports on your progress. If you do not enter a user ID or if

you pick a user ID that is already in use, then the server will assign

a user ID.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, leave the "Use Primenet..." checkbox

checked. Do not turn this checkbox off even if you disconnect

from the Internet. Check the "Use a dial-up..." checkbox

if you use a modem to connect to the Internet. Note that prime95

will not dial-up to connect to the Internet, rather it waits

for a time when you are already connected to contact the server.

Click OK. Prime95 will now contact the PrimeNet server to get some

work for your computer to do.

4) If you cannot contact the PrimeNet server, then a firewall may be

preventing the RPCs from getting to the server. In this case, you

may want to try the HTTP-based DLL. Choose "Use HTTP-based DLL"

from the Test/Primenet dialog.

4a) If you now get the error message "Unable to load HTTPNET.DLL", then

you are probably missing WININET.DLL. This DLL is shipped with

Microsoft's Internet Explorer. It is also installed by default in

later versions of Windows 95 and Windows NT. You can download and

install WININET.DLL from Scott Kurowski's web site. See

http://entropia.com/ips/faq.html#wininet for details.

4b) If the http-based DLL will not connect to the server, then

you will have to use the manual method described below. There have

been reports that the http-based DLL does not work in all

MS IE 3.0 environments - we are working on making this DLL work in

as many different environments as possible.

4c) If a proxy server is the cause of your connection troubles, see the

later section on "SETTING UP A PROXY SERVER".

5) Create a shortcut to prime95.exe and place it in the startup folder.

Alternatively, you can install prime95.exe as a Windows 95 service

using the Options menu. Prime95 will now run every time you boot

your computer.

MANUAL METHOD INSTRUCTIONS #1

-----------------------------

1) Use the Web (http://entropia.com/ips/manualtests.html) to create

a userid for yourself and to get a set of exponents to work on.

Copy these exponents to a file called worktodo.ini

2) Run prime95.exe. You will see 3 dialog boxes:

2a) In the first dialog box, enter your name and email address. Click OK.

2b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

2c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

3) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

4) Once a month or when done with your exponents, use the web pages

again to send the file "results.txt" to the PrimeNet server.

It is important to do this so the exponents you are testing are

not reassigned to someone else.

MANUAL METHOD INSTRUCTIONS #2

-----------------------------

1) Download and unzip database.zip (http://www.mersenne.org/range2.htm).

2) Use the Web (http://www.mersenne.org/range2.htm) to select a range of

exponents to test. Send me e-mail on the range you've chosen.

This prevents others from testing the same range.

3) Run prime95.exe. You will see 3 dialog boxes:

3a) In the first dialog box, enter your name and email address. Click OK.

3b) In the second dialog box, change the CPU type and speed if necessary.

Fill in roughly how many hours a day you leave your computer running.

Click OK.

3c) In the third dialog box, uncheck "Use PrimeNet to get work and report

results", click OK.

4) Choose Test/Manual Operation from the menus. Enter the type of work

and range of exponents you selected in step 2.

5) Create a shortcut to prime95.exe and place it in the startup folder.

Prime95 will now run every time you boot your computer.

6) Once a month or when done with your range, send the file "results.txt"

to

woltman@magicnet.net. It is important to do this so the exponents

you've tested can be removed from the master list.

NOTES

-----

Let prime95.exe run at all times. It runs at the lowest possible priority,

making use of all your idle CPU cycles. It should not interfere with your

normal work. Let the program run overnight and on weekends. Never turn

your computer off. Turn off your monitor to conserve energy. NOTE:

Running your computer non-stop could increase your electric bill by $30

per year or more.

It can take many CPU days to test a large Mersenne number. This program

can be safely interrupted by using the ESC key to write intermediate

results

to disk. This program also saves intermediate results to disk every 30

minutes

in case there is a power failure.

To fully utilize a dual Pentium machine, you must run two copies of

prime95.exe. Run one copy of prime95 as described above. Run the second

copy of prime95.exe with the -A1 switch. Place two shortcuts in the

startup folder (one with no switch and one with the -A1 switch).

Dual processor machines can also improve performance by setting

processor affinity in Windows NT. To do this, do the following:

1) Run Windows NT task manager

2) Click on the processes tab

3) Find your PRIME95 processes

4) Right click on the processes and pick Processor Affinity.

5) Set the flag on CPU 0 for one process and CPU 1 for the other</