Bitcoin Forum
June 17, 2024, 06:48:21 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3] 4 5 6 7 8 »  All
  Print  
Author Topic: [XPM] Primecoin High Performance Linux Compilation Guide  (Read 43535 times)
ivanlabrie
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000



View Profile
July 20, 2013, 12:00:27 AM
 #41

I've gotten that before, I reinstalled ubuntu after panicking lol
ivanlabrie
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000



View Profile
July 20, 2013, 12:01:55 AM
 #42

I'll keep trying, had the same kind of problems with the other methods I tried, and eventually I managed to compile succesfully.
1GB swap is likely not enough, try moving to 2GB (just add another swap file) . From what I understand the optimize flag -O2 can easily eat up 2GB of free ram by itself.

Thanks! I'mma try right away.
ivanlabrie
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000



View Profile
July 20, 2013, 01:14:41 AM
 #43

Well, it certainly looks like an out of memory issue. Not sure how that's possible with a swap file. And yes, there are still bugs causing random crashes. They were present in Sunny King's original release and I haven't had the time to iron them out.

I'll keep trying, had the same kind of problems with the other methods I tried, and eventually I managed to compile succesfully.

Same thing, even with 2gb of swap. :/
Gonna revert to ecoinomist's method if I can't get this to run.
More than 512mb ram is prohibitive, costs wise...how much better is this method mikaelh?
LlamaMaster
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
July 20, 2013, 02:18:47 AM
 #44

Is there any way to set the sievesize parameter for the windows client?
ivanlabrie
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000



View Profile
July 20, 2013, 03:15:30 AM
 #45

Is there any way to set the sievesize parameter for the windows client?

Create a conf file, add a line that reads: sievesize=x (replace x by 1000000 or 2000000, or whatever)
eCoinomist
Member
**
Offline Offline

Activity: 112
Merit: 10


Independent Analyst


View Profile WWW
July 20, 2013, 05:12:43 AM
 #46

Ok, I'm not sure if this is just luck or not, but my simple linux XPM compiling using the same HP5 client seems to yield a lot more blocks:


VS. this compilation guide (exact spec and number of machines as above, only compiled differently):


maco
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
July 20, 2013, 06:39:10 AM
Last edit: August 07, 2013, 05:27:32 AM by maco
 #47

Attempting with it, but no success thus far. Here is my errors:

EDIT: This was mainly a RAM issue. Since primecoin doesn't need a lot of ram, except only when compiling the make.
I was using 512 MB to lower my cost, but 1024MB would do... or Solution B) setup a SWAP file, you can ask me how and I will help you.

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make: *** [obj/alert.o] Error 4

This happens during the make file .unix any thoughts?  

and... I did try swap - Here is my error:

root@:~/primecoin/src# sudo dd if=/dev/zero of=/swapfile bs=64M count=16
dd: opening â/swapfileâ: Text file busy

root@:~/primecoin/src# sudo mkswap /swapfile
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=9f78b9b8-39b1-4087-9d56-77cefc172fa8

root@:~/primecoin/src# sudo swapon /swapfile
swapon: /swapfile: swapon failed: Device or resource busy
ivanlabrie
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000



View Profile
July 20, 2013, 06:48:17 AM
 #48

@eCoinomist

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make: *** [obj/alert.o] Error 4

This happens during the make file .unix any thoughts?

Lacking ram, try a swap file...

I'm getting this after running the daemon: ivanlabrie@ivanlabrie2:~$ primecoind --daemon
ivanlabrie@ivanlabrie2:~$ Primecoin server starting
: Error opening block database.
Do you want to rebuild the block database now?

What's wrong?
Used ecoinomist's guide, and the auto restart script as well...I think I should reinstall ubuntu and start from scratch.
mikaelh (OP)
Sr. Member
****
Offline Offline

Activity: 301
Merit: 250


View Profile
July 20, 2013, 07:06:30 AM
Last edit: July 20, 2013, 07:30:19 AM by mikaelh
 #49

@mikaelh

How do I know the custom gmp for my CPU is working as it should be if I've already installed primecoind? Thanks.  Smiley

Assuming that you have 'lsof' installed and that primecoind is running, you can type:
Code:
lsof -n |grep libgmp.so

And then check that the library path says /usr/local/lib/libgmp.so.10.

Another alternative that doesn't require running primecoind:
Code:
ldd /usr/local/bin/primecoind |grep libgmp.so
mikaelh (OP)
Sr. Member
****
Offline Offline

Activity: 301
Merit: 250


View Profile
July 20, 2013, 07:08:30 AM
 #50

When I type: ./configure --enable-cxx

I get this error:


checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin
 (see config.log for reasons).


Am I missing something?

Install the 'm4' package that's required to compile libgmp.
mikaelh (OP)
Sr. Member
****
Offline Offline

Activity: 301
Merit: 250


View Profile
July 20, 2013, 07:17:45 AM
 #51

@eCoinomist

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make: *** [obj/alert.o] Error 4

This happens during the make file .unix any thoughts?

Lacking ram, try a swap file...

I'm getting this after running the daemon: ivanlabrie@ivanlabrie2:~$ primecoind --daemon
ivanlabrie@ivanlabrie2:~$ Primecoin server starting
: Error opening block database.
Do you want to rebuild the block database now?

What's wrong?
Used ecoinomist's guide, and the auto restart script as well...I think I should reinstall ubuntu and start from scratch.

I think you somehow managed to link against a different version of Berkeley DB. It's probably an older library not understanding a newer database format.

You can try removing a specific version of libdb:
Code:
apt-get remove libdb5.1 libdb5.1++ libdb5.1++-dev libdb5.1-dev

And then recompile.
mikaelh (OP)
Sr. Member
****
Offline Offline

Activity: 301
Merit: 250


View Profile
July 20, 2013, 07:19:18 AM
 #52

# apt-get install build-essential libssl-dev libboost-all-dev libdb5.3++-dev -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libdb5.3++-dev
E: Couldn't find any package by regex 'libdb5.3++-dev

Any fixes for this?

Older versions of Ubuntu may not provide libdb5.3++-dev.
relm9
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1000



View Profile
July 20, 2013, 07:41:01 AM
 #53

I'm getting this immediately on startup

Quote
************************
EXCEPTION: N5boost21thread_resource_errorE
boost::thread_resource_error
primecoin in AppInit(

Any ideas? Running CentOS here. Bitcoin and Litecoin run fine on the same machine. RAM shouldn't be an issue - have 64GB. The weird thing is it ran fine once - had it going for 3 days straight. I restarted the process today and now getting that error. I tried clearing the ~/.primecoin folder as well.
mikaelh (OP)
Sr. Member
****
Offline Offline

Activity: 301
Merit: 250


View Profile
July 20, 2013, 07:47:39 AM
 #54

I'm getting this immediately on startup

Quote
************************
EXCEPTION: N5boost21thread_resource_errorE
boost::thread_resource_error
primecoin in AppInit(

Any ideas? Running CentOS here. Bitcoin and Litecoin run fine on the same machine. RAM shouldn't be an issue - have 64GB. The weird thing is it ran fine once - had it going for 3 days straight. I restarted the process today and now getting that error. I tried clearing the ~/.primecoin folder as well.

Never seen that one before. Is that the only error you're getting?
ivanlabrie
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000



View Profile
July 20, 2013, 07:50:29 AM
 #55

sudo apt-get remove libdb5.1 libdb5.1++ libdb5.1++-dev libdb5.1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'libdb5.1++' is not installed, so not removed
Package 'libdb5.1++-dev' is not installed, so not removed
Package 'libdb5.1-dev' is not installed, so not removed

Seems like that's not the case...512mb ram, 1.1gb swap.
Does hdd encryption mess with this?
relm9
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1000



View Profile
July 20, 2013, 07:51:11 AM
 #56

I'm getting this immediately on startup

Quote
************************
EXCEPTION: N5boost21thread_resource_errorE
boost::thread_resource_error
primecoin in AppInit(

Any ideas? Running CentOS here. Bitcoin and Litecoin run fine on the same machine. RAM shouldn't be an issue - have 64GB. The weird thing is it ran fine once - had it going for 3 days straight. I restarted the process today and now getting that error. I tried clearing the ~/.primecoin folder as well.

Never seen that one before. Is that the only error you're getting?

Yup. It's really strange :\ I did a recompile with the latest version just now and still getting it.
tonyback
Sr. Member
****
Offline Offline

Activity: 280
Merit: 250



View Profile
July 20, 2013, 07:51:33 AM
 #57

Thank you for this guide
mikaelh (OP)
Sr. Member
****
Offline Offline

Activity: 301
Merit: 250


View Profile
July 20, 2013, 08:21:36 AM
 #58

sudo apt-get remove libdb5.1 libdb5.1++ libdb5.1++-dev libdb5.1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'libdb5.1++' is not installed, so not removed
Package 'libdb5.1++-dev' is not installed, so not removed
Package 'libdb5.1-dev' is not installed, so not removed

Seems like that's not the case...512mb ram, 1.1gb swap.
Does hdd encryption mess with this?

No, HDD encryption should not mess with this (even if you have it enabled). In general there are two common cases for block database errors:
1) Incompatible database format
2) Corrupted database

In the second case you can try removing database files from the .primecoin folder. Remove all files except primecoin.conf, wallet.dat and maybe peers.dat.
eCoinomist
Member
**
Offline Offline

Activity: 112
Merit: 10


Independent Analyst


View Profile WWW
July 20, 2013, 08:36:10 AM
 #59

Anyone having problems with my guide, just reinstall the whole Ubuntu 13.04 OS from fresh start. The guide is designed to work perfectly on fresh install of any Ubuntu 13.04. Even if you get client crash, it will be restarted automatically with cron job every minute, so downtime is really minimal.

If you get error on make file compiling, it's likely due to lack of RAM and you need to run the swap command.

If for whatever reason you can't get fresh Ubuntu install, run these before following my guide:
Code:
cd
rm -rf gmp-5.1.2.tar.bz2 gmp-5.1.2
rm -rf primecoin-0.1.1-hp5.tar.bz2 primecoin-0.1.1-hp5 primecoin
sudo apt-get remove python-software-properties screen python-rrdtool python-pygame python-scipy python-twisted python-twisted-web python-imaging build-essential libglib2.0-dev libglibmm-2.4-dev python-dev autoconf automake ncurses-dev sysstat gcc-mingw32 libmysql++-dev cloog-ppl build-essential automake gcc libevent-dev libmemcached-dev libcurl4-openssl-dev zlib1g-dev libjansson-dev curl memcached libtool unzip freeglut3-dev libxi-dev libxmu-dev build-essential freeglut3-dev libxi-dev libxmu-dev mpich2 libdb-dev libminiupnpc-dev libboost-all-dev libdb++-dev git uthash* libgmp3-dev
sudo apt-get remove -y build-essential m4 libssl-dev libdb++-dev libboost-all-dev libminiupnpc-dev
sudo apt-get remove build-essential libssl-dev libboost-all-dev libdb5.3++-dev -y
sudo apt-get remove libgmp-dev

The screenshots of block finding on my site are from actual DO droplets ($5 and $20 ones - they have never crashed so far for me, been running for nearly a week now, and upgrading from hp2, hp3, hp4 to hp5 without OS resinstall).

Note: you must run everything exactly as my guide, if you change OS to something I haven't tested and I'm just a Linux newbie, so can't help much with other compiling problems on CentOS, etc.

ivanlabrie
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000



View Profile
July 20, 2013, 08:47:38 AM
 #60

Thanks guys...
I'm starting over.
Pages: « 1 2 [3] 4 5 6 7 8 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!