mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Lone Mersenne Hunters

Reply
 
Thread Tools
Old 2005-01-31, 18:59   #12
leifbk
 
leifbk's Avatar
 
May 2004
Oslo, Norway

23×3×5 Posts
Default

Quote:
Originally Posted by garo
ric beat me to the response there! Also, leif can you tell me what the error message was while compiling? I have successfully compiled decomp.c on Solaris and Linux. Did you use the -lm flag to tell it to use the math library?
First, I must say that I'm no 1337 C haxx0r

I changed the includes because of undeclared atoi() and isdigit():

Code:
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <malloc.h>
#include <memory.h>
#include <string.h>
Then I got "DECOMP.C:371: error: `main' must return `int'" and I replaced void main() with int main().

Now I get:

Code:
leif@balapapa lmh $ gcc -lm DECOMP.C -o decomp
DECOMP.C: In function `int isprime(long unsigned int)':
DECOMP.C:26: warning: converting to `long unsigned int' from `double'
/tmp/ccsu5CHE.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
What now?
leifbk is offline   Reply With Quote
Old 2005-02-01, 10:44   #13
garo
 
garo's Avatar
 
Aug 2002
Termonfeckin, IE

24·173 Posts
Default

This is what my includes look like: These are the original DECOMP.C includes.

Code:
#include <stdio.h>
#include<stdlib.h>
#include <math.h>
#include <malloc.h>
#include <memory.h>
#include <string.h>
#include <ctype.h>
And this is what compiling gives me:
Code:
gcc -o a.out DECOMP.C -lm
DECOMP.C: In function `int isprime(long unsigned int)':
DECOMP.C:25: warning: assignment to `long unsigned int' from `double'
DECOMP.C:25: warning: argument to `long unsigned int' from `double'
BTW, both atoi and isdigit are standard C library functions so I don't understand why you should have trouble if stdlib is included.
garo is offline   Reply With Quote
Old 2005-02-01, 11:49   #14
leifbk
 
leifbk's Avatar
 
May 2004
Oslo, Norway

23·3·5 Posts
Default

Okay. I'm at work now, so I'll make a fresh start. I cut and pasted your includes and commented out the originals:

Code:
leif@bombadil lmh $ gcc -o decomp DECOMP.C -lm
DECOMP.C: In function `int isprime(long unsigned int)':
DECOMP.C:36: warning: converting to `long unsigned int' from `double'
DECOMP.C: At global scope:
DECOMP.C:381: error: `main' must return `int'
Then I make the change from "void main" to "int main":

Code:
leif@bombadil lmh $ gcc -o decomp DECOMP.C -lm
DECOMP.C: In function `int isprime(long unsigned int)':
DECOMP.C:36: warning: converting to `long unsigned int' from `double'
/tmp/cc01U5sU.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
As you probably know, Gentoo is a "from source" distribution. Thus, my gcc (both here and at home) is in almost daily use for patching and upgrading, and hardly chokes on anything.

I'm suspecting a gcc version problem here:

Code:
leif@bombadil lmh $ gcc --version
gcc (GCC) 3.3.5  (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I suppose that there's a way to set a flag for backwards compatibility?



regards, Leif.
leifbk is offline   Reply With Quote
Old 2005-02-01, 15:09   #15
garo
 
garo's Avatar
 
Aug 2002
Termonfeckin, IE

276810 Posts
Default

Correct. A google search revealed the following:

Edit your Makefile and add "-lstdc++" as shown below to the end of the
variable named "STATIC_LIBS"

STATIC_LIBS= $(GD_STATIC) $(OGR_STATIC) -lstdc++

Since you are not using a makefile just add the -lstdc++ flag to the compile line.
garo is offline   Reply With Quote
Old 2005-02-01, 17:48   #16
leifbk
 
leifbk's Avatar
 
May 2004
Oslo, Norway

23×3×5 Posts
Default

Quote:
Originally Posted by garo
Correct. [...] Since you are not using a makefile just add the -lstdc++ flag to the compile line.
Yezz!!!

It still won't accept a "void main", so I have to change that to "int main", but that's trivial.

Besides, both stdlib.h and ctype.h are missing from the version in decomp.zip and have to be added manually.

Humble wish: May I suggest that somebody with a little more knowledge about C than what I've got, updates the source so it compiles cleanly with recent versions of gcc?

regards, Leif.
leifbk is offline   Reply With Quote
Old 2005-09-12, 17:02   #17
Citrix
 
Citrix's Avatar
 
Jun 2003

65C16 Posts
Default

Can Prime95 work on +1 numbers. I just want to find some factors for run.

Citrix
Citrix is offline   Reply With Quote
Old 2006-03-08, 07:28   #18
Riza
 
Mar 2006

11 Posts
Default

Can anybody write me, what a factoring work, I can let do at a

P 200 @ 340 MB RAM and

K6 400 @ 512 MB RAM?

Please write, what is to copy in Worktodo.ini.

The result I send to?

Thanks
Riza is offline   Reply With Quote
Old 2007-06-25, 01:27   #19
antiroach
 
antiroach's Avatar
 
Jun 2003

22×61 Posts
Default

Is it worthwhile for AMD (athlon xp) processors to factor numbers upto 2^64? If not when does it become inefficient for Athlon XP processors to perform this type of factoring?
antiroach is offline   Reply With Quote
Old 2007-06-25, 03:55   #20
1997rj7
 
1997rj7's Avatar
 
Sep 2003

359 Posts
Default

Athlon XPs are very efficient up to 2^64. They are not good above 2^64 because they lack SSE2.
1997rj7 is offline   Reply With Quote
Old 2007-06-25, 08:26   #21
antiroach
 
antiroach's Avatar
 
Jun 2003

22×61 Posts
Default

i've done work at LMH before when the software still had a prime.ini file. Im currently using the newest (?) version of mprime (25.3.2).
When i use the FactorOverride=xx command in the prime.txt file it doesnt seem to take effect and it tries to factor the number upto 70 bits. what am i doing wrong?
antiroach is offline   Reply With Quote
Old 2007-06-25, 12:27   #22
tmorrow
 
tmorrow's Avatar
 
Jan 2004

11001112 Posts
Default

Hmm! Version 25.3 is very much an alpha version still. George is distributing it to test the v4 and v5 servers on trial factoring above 79.3 million and on multicore machines and odd internet settings. Refer to http://www.mersenneforum.org/showthread.php?t=8415 and http://www.mersenneforum.org/showthread.php?t=8431. That client may be specially configured to factor those high exponents (just guessing).

I've only had experience with v24.14 which seems to work fine and is still the recommended stable client.

Just out of curiosity, what exponent were you trial factoring?
tmorrow is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where should I start? christian_ Information & Answers 9 2016-01-22 19:28
Before you start... jasonp Operation Kibibit 65 2013-09-03 22:06
Where to start Jellyfish420 Homework Help 46 2013-02-06 13:51
how to start with P-1? ValerieVonck Marin's Mersenne-aries 8 2006-04-29 22:21
How to start? OmbooHankvald Factoring 15 2005-09-03 13:42

All times are UTC. The time now is 13:12.


Fri Jul 7 13:12:24 UTC 2023 up 323 days, 10:40, 0 users, load averages: 0.97, 1.03, 1.08

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔