Pages:
Author

Topic: [XPM] Primecoin High Performance Linux Compilation Guide - page 6. (Read 43554 times)

hero member
Activity: 812
Merit: 1000
Thanks guys...
I'm starting over.
member
Activity: 112
Merit: 10
Independent Analyst
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.
sr. member
Activity: 301
Merit: 250
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.
sr. member
Activity: 280
Merit: 250
Thank you for this guide
hero member
Activity: 840
Merit: 1000
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.
hero member
Activity: 812
Merit: 1000
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?
sr. member
Activity: 301
Merit: 250
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?
hero member
Activity: 840
Merit: 1000
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.
sr. member
Activity: 301
Merit: 250
# 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.
sr. member
Activity: 301
Merit: 250
@eCoinomist

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See 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.
sr. member
Activity: 301
Merit: 250
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.
sr. member
Activity: 301
Merit: 250
@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
hero member
Activity: 812
Merit: 1000
@eCoinomist

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See 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.
sr. member
Activity: 294
Merit: 250
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 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
member
Activity: 112
Merit: 10
Independent Analyst
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):

hero member
Activity: 812
Merit: 1000
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)
newbie
Activity: 51
Merit: 0
Is there any way to set the sievesize parameter for the windows client?
hero member
Activity: 812
Merit: 1000
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?
hero member
Activity: 812
Merit: 1000
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.
hero member
Activity: 812
Merit: 1000
I've gotten that before, I reinstalled ubuntu after panicking lol
Pages:
Jump to: