I need more RAM
In an experiment that I was trying after I managed to get pollard-rho factoring algorithm right, it turns out that I ran out of ram. Below were my memory stats before things didn't go well.
***@gentoo2 ~ $ cat /proc/meminfo
MemTotal: 8196252 kB
MemFree: 43720 kB
***@gentoo2 ~/source/gmp $ ./a.out
Input a number to be factored:
22964766349327374158394934836882
729742175302138572222575931764391
30841895160961323826592803808643
123157763304539153144604501945565
726378895915209595950078110112609
64956569761453380843236093912425
70049591461461009320782551308966
824222425528731569111534949127744
166427236012769418206949701929914
631287953679124328078403443589001
544785043209243005176672365124985
675566011296182335806426461484656
070802115048389659355236182068241
950344201999449825647341556766313
6842953837436975371612984118933299
5025943702457251084955979786901113
201153080673107947314499898857616
570973522270774848153523682562394
459511253374123416009099322199740
5711848497115626313770615846340179
3660981182240441579428244810758015
01388316794925034549722720218237177
98941515357314194439093370153295747
231072672730402946119202012066711932
4409064623758146438555005036265643143
11613740004222882394574001010576427
8856096541459650682547836386210032
02716989623011518264972455124547591
207054841845921140740300676916471986
974995922243980616471547017594586146
289520145321451796076268635556203929
630712935725274464512803427346600290
020957571600747966912966168394403107
609922082657201649660373439896304215
8832323677881589363722322001921
Killed
Makes me wonder if there is any memory leaks in GMP or am I doing the wrong things testing pollard rho with a composite number that is 1100+ digit in length.
Or maybe I just need more RAM. Too bad no more slots to put in more RAM. Time to code more algorithms to test out the great factoring algorithms of this decade.
Labels: victor's boring life

1 Comments:
8GiB is a lot of RAM. Try looking at what your algorithm is doing; if it is generating really large intermediate values, or many relatively few but large-enough intermediate values, you might have a problem.
If you just want to complete the computation, try increasing swap space. It will slow down, but at least it won't crash. Also, 8GiB of RAM over quad core means that each core has roughly 2GiB to play with, not counting the space that the kernel sets aside.
Post a Comment
Subscribe to Post Comments [Atom]
<< Home